Commit graph

10122 commits

Author SHA1 Message Date
GGabriele
b4d69262ed Adding nxos_get_facts 2016-12-08 11:24:21 -05:00
GGabriele
95992b91bd Addng nxos_feature 2016-12-08 11:24:21 -05:00
jedelman8
6ae109630e add nxos_vlan 2016-12-08 11:24:21 -05:00
jedelman8
5ef3a6430a add nxos_switchport 2016-12-08 11:24:21 -05:00
Peter Sprygada
a9b664c796 add support for netconf to junos_config
The junos_config module now supports the netconf transport.
2016-12-08 11:24:21 -05:00
Peter Sprygada
abb008dca7 fixes docstring format in junos_command 2016-12-08 11:24:21 -05:00
Peter Sprygada
89ebc8b066 adds config_format argument to the facts module
this change adds config_format argument with choices of xml, set or text to
specify the desired format of the config returned from the remote device.  The
default value is text
2016-12-08 11:24:21 -05:00
Peter Sprygada
9d521aa7e0 Merge pull request #9 from dgarros/junos_modules
Add support for xml, set and text format for config
2016-12-08 11:24:21 -05:00
Guido Falsi
582a5bccc8 Make FreeBSD subclass respect the sleep option. 2016-12-08 11:24:20 -05:00
Michael Scherer
5b32a299a5 Change home and ssh_key_file to 'path' in user module 2016-12-08 11:24:20 -05:00
Darek Kaczyński
08ad68984c Fix for 'cannot unmarshal array into Go value of type string' error about HostConfig Binds (#3496) 2016-12-08 11:24:20 -05:00
Peter Sprygada
1985115e55 adds new module junos_netconf used for configuring netconf services
This module allows playbook operators to configure the netconf service in
junos for use with other juniper modules.
2016-12-08 11:24:20 -05:00
Peter Sprygada
2072922875 adds new junos_facts module
The junos_facts module will collect basic system inforamtion about remote
devices running the Junos operating system
2016-12-08 11:24:20 -05:00
Sumit Roy
b8204774dd Support tagging ELBs using boto 2.0. (#2844) 2016-12-08 11:24:20 -05:00
Peter Sprygada
871e586ce3 add support for netconf to junos_template
This commit adds support for sending full syntanx junos configurations using
junos_template and netconf
2016-12-08 11:24:20 -05:00
Peter Sprygada
923974e3c0 add support to junos_command module for netconf transport
This adds support for using netconf to the junos_command option and removes
the use of cli as a transport
2016-12-08 11:24:20 -05:00
jctanner
56f5ca37af Fix status check on get_url with file schemas and update the examples. (#3512)
Addresses #3511
2016-12-08 11:24:20 -05:00
Brian Coca
4e08f94a34 corrected return docs sample 2016-12-08 11:24:20 -05:00
nitzmahone
bc4510b0d4 docs for win_reboot action 2016-12-08 11:24:20 -05:00
vaupelt
ae464c5b5e exclude_hosts does not work as expected with state=drained
There are established connections for a service. The service is bound to a ipv4-mapped ipv6 address. Wait_for wrongly waits for clients listed in exclude_hosts.
2016-12-08 11:24:20 -05:00
Michael Scherer
001ceb8dc6 Remove old test on SELinux (#3510)
since all is done in modules_utils/basic.py, no need to make
the same test here, especially since that's unused later
2016-12-08 11:24:20 -05:00
Robin Roth
281398fdc2 fix git switch branches in combination with depth on old git versions (#3492)
* fix git switch branches in combination with depth

* the old implementation is correct, but relies on git working correctly
  (as only newer versions do)
* with some older git version (e.g. 1.8.3), git fetch remote branch does
  not work, if the branch does not yet exist locally
* this patch works around that without explicitly checking the git version
* future refactoring is needed to reduce the number of fetches to a
  minimum; but this patch makes the code "correct"

* add git version requirements to doc

* replace set-branches with git 1.7.1 compatible version
2016-12-08 11:24:20 -05:00
ThomasSteinbach
a90fd67c7e docker: fix type issue (#3491)
* fix type issue

* fix type issue for 'volumes-from'
2016-12-08 11:24:20 -05:00
Rene Moser
885b8dc4d0 git: fix status to use porcelain, ignore user configuration
From the git status doc:

    --porcelain

        Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details.

User configuration can break the git module from working as expected.
2016-12-08 11:24:20 -05:00
Dreamcat4
eeabebdd6c fix: win_get_url - fixes for strict-mode 2016-12-08 11:24:20 -05:00
Dreamcat4
c85a82ad00 fix: win_stat - fixes for strict-mode 2016-12-08 11:24:19 -05:00
Adrian Likins
4141cc5548 improve redhat_subscription documentation (#3348)
* add subscription-manager's --type, --consumerid, --name option support

* redhat_subscription: More docs on consumerid
2016-12-08 11:24:19 -05:00
Michael Scherer
69f2b3d727 Fix error reporting for fetch_key (#2662)
Since fetch_url already take care of the exception, the try/except
clause is no longer working, so replace it with proper status
checking, thus permitting to remove urlib2 from the import list.
2016-12-08 11:24:19 -05:00
Constantin
404f07af8e Added improvements and documented return structure (#2320) 2016-12-08 11:24:19 -05:00
jjshoe
87946920d8 Fix an issue where by a call to ec2.get_image wasn't wrapped in a try/except, and would occasionally throw an exception in the wild. Also greatly simplifies two of the ugliest known loops to man down into a single loop. (#2554) 2016-12-08 11:24:19 -05:00
Brian Coca
34a3bc043a removed usless default doc 2016-12-08 11:24:19 -05:00
Justin Kennedy
ab4b8e0847 Updating examples to include required fields (#3242)
Updated examples to include required fields (host, username).  Also updated src option to be listed as required.
2016-12-08 11:24:19 -05:00
Brian Coca
6a309ee6ab added missing version_added 2016-12-08 11:24:19 -05:00
Pål Nilsen
7e18da79c3 Add optional force parameter for apache2_module (#3251)
* Add optional force parameter for apache2_module

Fixes #2499

* Add documentation for the force parameter

* Clarify in description that -f(orce) is a Debian parameter
2016-12-08 11:24:19 -05:00
Jan Hutař
d91f803897 Add support for Satellite/Spacewalk which have slightly different API to Hosted (#3289) 2016-12-08 11:24:19 -05:00
Michael Scherer
edc0752395 Suggest using uri if curl is detected
Some people use the command module to run curl not to
download file, but to interact with remote HTTP api, and the
get_url suggestion is not suitable. So adding uri in the warning
would give a more meaningful warning.

Suggested by Tahvok on #ansible irc channel.
2016-12-08 11:24:19 -05:00
Dennis Conrad
70b0891f95 Fix UnboundLocalError if 'access_key_ids' not supplied
'key_ids' is referenced before it is assigned, causing the module to fail with a UnboundLocalError instead of failing gracefully with a helpful error message.  This very small patch moves the assignment of 'key_ids' to before the variable is referenced.
2016-12-08 11:24:19 -05:00
Toshio Kuratomi
9e9b6a24f4 Fix apt module needing another format character 2016-12-08 11:24:19 -05:00
Robin Roth
c7cb1b28cd fall back to full clone if version is hash
if version is not a branch or tag (i.e. a hash), we need a full checkout to be able to switch to it
2016-12-08 11:24:19 -05:00
Robin Roth
8e5e5108d1 with depth only fetch actual version
* don't use refs/heads/branchname for branches
* for tags it's needed thou
* fixes #3456
2016-12-08 11:24:19 -05:00
Jeroen Geusebroek
54e62c2022 Allow an empty password when adding a new MySQL user. (#3445) 2016-12-08 11:24:19 -05:00
Kyle Dyroff
58f30646ed Log git error stdout/stderr to fail_json (#3022) 2016-12-08 11:24:18 -05:00
Dag Wieers
a26188e55d Making unarchive idempotent (#3307)
* WIP: Making unarchive idempotent

Currently unarchive is not idempotent and has many rough edges and bugs.
The current release is a workable improvement on many fronts:

- zip support is now idempotent (but gtar lacks check-mode)
- New option `exclude` to exclude specific paths/files
- New option `keep_newer` to exclude newer files on target
- New option `extra_opts` to influence unzip/gtar (like synchronize module)

The following items are still ongoing:

- Implement CRC32 support for .zip files
- Re-implement the zip support using native zipfile module
- Re-implement the gtar support using native tarfile/gzip/bz2 modules (lzma external)
- Implement check-mode (works in gzip, but fails using gtar)
- Implement diff-mode (discuss an appropriate output model, like synchronize module)

The re-implementation of unzip/gtar support using native python modules will not only simplify the codebase, additional functionality can be implemented correctly and identically, which is currently not possible. (Other archives could be implemented using native modules equally, incl. options)

* Assorted fixes to zip support (during quality checks)

- Support both rw---- and rwx--- permstr
- Better file type support (more qa needed)
- Symlink support
- Include fix from #3229

* Implement zip diff-mode (itemized change) and avoid changes permissions every time (!)

This commit implements:
- rsync-compatible itemized-change output in diff-mode (using zip)
- no longer changing permissions unconditionally (when idempotent)

* Small fixes to itemized change output

* Fixes to user/group ownership changes

- The implementation of user/group ownership is a bit more complex for idempotency
- We report when a ZIP file incorrectly tags a directory as a file/link
- We only offer diff output when there is a change

* Fix the handling of includes and excludes for unzip

* Remove test output from output (confuses easily)

* Logic and performance improvements to ownership handling, and umask fix

* Handle special files (type '?')

* Make exceptions compatible with python 2.4

* Implement CRC32 support

* Revert some unintended/unknown changes ?

* Taking over maintenance as offered by current maintainer

* Fix support for white-spaces in filenames

* Remove/rename incorrect regex

* Ensure that fat executables end up with execute permission

* Remove check_result from output when unchanged

* When unarchiving as a user, or when owner/group/mode is supplied --diff is insufficient

Only way to be sure is to check request with what is on disk (as we do for zip).
Leave this up to set_fs_attributes_if_different() instead of inducing a (false) change

* By default, don't send confusing check_results in verbose output

This fixes #74.
2016-12-08 11:24:18 -05:00
NielsH
1b94aa2d43 Resolve idempotency issue with virtual apt package (#3449)
Virtual packages were always marked as upgradable which caused the changed-state even though nothing changed.
2016-12-08 11:24:18 -05:00
Tobias Wolf
fb5a91d9d1 Add diff to apt.py (#2944)
for install, remove, deb_install, and upgrade.

Since apt has very commonly familiar output, just use the normal output
from apt-get or aptitude -- trimmed to the interesting parts -- to show
to the user if she specified --diff on the CLI.

Uses the recent support for the `diff['prepared]` key.

Fixes ansible/ansible#10239
2016-12-08 11:24:18 -05:00
Oleg Senin
7ceaafbbd2 Correct misspell (#3454) 2016-12-08 11:24:18 -05:00
Kei Nohguchi
fc5ade4020 ops_template.py: Taking care of the JSON src variable (#3313)
* ops_template.py: Taking care of the JSON src variable

* ops_template.py: Specify type='str' for src argument to be explicit
2016-12-08 11:24:18 -05:00
Marcin
c3ebc84689 rebase for #2477, ready_for_review (#2581) 2016-12-08 11:24:18 -05:00
Michael Fenn
add1a342fe Support altering the virtual cdrom when state == reconfigured (#2394)
This allows a user to modify the state of the virtual cdrom in a VM
by using the state == reconfigured action.  This is useful for
provisioning VMs from templates which do not have ISO images connected.
2016-12-08 11:24:18 -05:00
Alexey Wasilyev
4971c7fe82 docker: support polling image by digest (#2932) 2016-12-08 11:24:18 -05:00
Joel Thompson
1db444cdc2 Add exponential backoff retries to ec2_elb_lb (#3379)
ec2_elb_lb doesn't react well to AWS API throttling errors. This
implements an exponential backoff operation around some of the AWS API
calls (with random jitter, in line with AWS recommendations) to make
this more resilient.
2016-12-08 11:24:18 -05:00
Patrick Ogenstad
d4d86b4bc6 Fix documentation example, missing ")" 2016-12-08 11:24:18 -05:00
Donovan Jones
8274f55818 Make remote_group handle name and id in cloud/openstack/os_security_group_rule.py
* Make remote_group handle name and id

* fix regression breaking os_security_group_rule with no remote_group
2016-12-08 11:24:18 -05:00
Robin Roth
b9e55a0877 make git updates respect depth (#3254)
* make git updates respect depth

until now `fetch` gets all tags and heads at full depth, this change
* uses `depth` argument for `fetch`
* only get the specified `version` in `fetch`

* fixes #14954

* treat combination of refspec and depth correctly

* be more conservative for non-depth fetch
2016-12-08 11:24:18 -05:00
jjshoe
d3623c8148 Give encoding examples (#3436) 2016-12-08 11:24:18 -05:00
yarick123
87fe4a2f0c ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol
* ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol

* ini_file: noextraspaces, python 2.4 compatibility

* ini_file: noextraspaces - yes/no => true/false

* ini_file: noextraspaces - added 'version_added' option

* ini_file: noextraspaces => no_extra_spaces
2016-12-08 11:24:18 -05:00
hyperized
51e2813ae4 Set --quick to True by default and make it selectable (#3418)
As indicated by @jmainguy in eb1cb94380 (commitcomment-17077470), this will allow the user to set the option quick, which is True by default (as it was before).

This is in reference to: https://github.com/ansible/ansible-modules-core/pull/3402
2016-12-08 11:24:18 -05:00
Michael Moussa
0494dced3a Fixes read replica create BC break (#3365) 2016-12-08 11:24:17 -05:00
William Holroyd
42d784c24b Added ap-northeast-2 region (#2849) 2016-12-08 11:24:17 -05:00
Rob
5a48a2e93e Fix to ensure youngest snapshot is retrieved rather than oldest (#3115) 2016-12-08 11:24:17 -05:00
jjshoe
5b8d209b7e Speed up AMI code by not attempting to create the AMI without checkin… (#2551)
* Speed up AMI code by not attempting to create the AMI without checking on the name first. Also simplifies code for reporting errors from AMI creation, greatly.

* remove sys.exit
2016-12-08 11:24:17 -05:00
Joshua Kugler
15ae8c8e0b Fix mount's handling of passno 2016-12-08 11:24:17 -05:00
Petrox
c050776f9e Missing documentation fix (#2516)
Extending the documentation to state, that this module does not handle externals well.
2016-12-08 11:24:17 -05:00
Marcin
ea57d8b005 Check if identifier is specified for geo,weighted or failover routing. Don't fail if record set already exist. Set choices for failover - capital PRIMARY and SECONDARY. (#2470) 2016-12-08 11:24:17 -05:00
Fabian von Feilitzsch
32c744e82a make binds a list instead of a dict (to prevent overwriting when copying the same file to two places) (#2294) 2016-12-08 11:24:17 -05:00
Mengdi Gao
165f48717a Improve doc accuracy of template module 2016-12-08 11:24:17 -05:00
John Barker
d531eb146d Replace BOOLEANS with true/false 2016-12-08 11:24:17 -05:00
John Barker
b3bc4bc97f Add copyright notice for James Laska 2016-12-08 11:24:17 -05:00
Ricardo Carrillo Cruz
682d97b765 Create subnet by domain
A cloud/domain admin should be able to create a subnet on any
project it is granted on.
This change adds the 'project' parameter that accepts either
a name (admin-only) or id.
2016-12-08 11:24:17 -05:00
Ricardo Carrillo Cruz
eecceaef6e Add project parameter to os_network
A cloud/domain admin should be able to create a network on any project
it is granted to.
This changes adds the possibility to pass either a project ID or
project name.
2016-12-08 11:24:17 -05:00
Adrian Likins
2a7324a385 Update redhat_subscriptions 'server_insecure' docs (#3373)
'server_insecure' maps to the subscription-manager config
(/etc/rhsm/rhsm.conf) value for 'insecure' key in the
'server' stanza. The 'insecure' configures if the https connection
to 'server_hostname' is verified as having been issued by
a CA in 'ca_cert_dir' trust store.

Previous documentation indicating it disables https and
enables http was inaccurate. Connection to server_hostname
always uses https.
2016-12-08 11:24:17 -05:00
Robin Roth
ee06cd27b2 use custom ismount function in mount module (#2737)
* based on cpython os.path.ismount
* includes patch from http://bugs.python.org/issue2466
* fixes #2186
* when the upstream bug is fixed this should be removed/rewritten
* use ismount from module_utils
2016-12-08 11:24:17 -05:00
hyperized
075edf7bb2 Add single_transaction and quick options to MySQL DB module (#3402) 2016-12-08 11:24:16 -05:00
Michael Scherer
8b125f8c2c Mark path as type='path', do not leak login_password by error (#3396) 2016-12-08 11:24:16 -05:00
Michael Scherer
c0179330c9 Update the type of some arguments in mysql_db module (#3285)
login_password should not be logged, so mark it as 'no_log'
the others arguments are path to file, and so should be type='path',
which permit to remove the line handling '~' and shell variables.
2016-12-08 11:24:16 -05:00
Tom Paine
7422ada2c8 Update mysql_db.py
* Update mysql_db.py

Resubmission of https://github.com/ansible/ansible-modules-core/pull/2961 in single commit.

* Update mysql_db.py
2016-12-08 11:24:16 -05:00
Rene Moser
aa32ae65a6 openstack: doc fix, add version_added
see #3388
2016-12-08 11:24:16 -05:00
Matt Martz
c26c17aa28 overwrite option was added for 2.1 2016-12-08 11:24:16 -05:00
peter.jang
f7fb5e31c2 added rsync protocol support (#1999)
* added rsync protocol support

* correction for example document(add example for push on delegate)

* use startswith method for safety
2016-12-08 11:24:16 -05:00
nitzmahone
64cd7903f2 fix win_user type checking
Fixed type checking to be more idiomatic powershell, also fixes a slew of StrictMode issues and gets error handling back to originally-intended behavior.
2016-12-08 11:24:16 -05:00
Toshio Kuratomi
40948cfcc4 git still needs to have abspath applied to dest 2016-12-08 11:24:16 -05:00
David Shrewsbury
dcbbd72cfd Wrap calls to main() with if check
A change was merged to the main Ansible core code that can cause

a potential hang if any libraries are called that use threading.

This change was:

  4b0aa1214c

This affected the os_object module by causing a hang on the shade

create_object() API call (which in turn calls swiftclient which

uses threading). The fix is to make sure all modules have a main()

that is wrapped with an "if __name__ == '__main__'" check.
2016-12-08 11:24:16 -05:00
Peter Sprygada
ef8b59f430 handles config replace properly in eos_template
fixes 3366
2016-12-08 11:24:16 -05:00
Michael Scherer
2ae3dbcc6a Set the locales to avoid issue with screenscrapping
See https://github.com/ansible/ansible-modules-core/pull/2462 for

details on why this could happen
2016-12-08 11:24:16 -05:00
Thomas Quinot
a5ec00f89f Reset all locale environment variables before running svn commands
We screenscrape the output of svn(1), so better ensure it is using the

C locale.

Fixes #3255
2016-12-08 11:24:16 -05:00
Kalle Lehtonen
02f737cdee Fix and add more error handling for role policies
In case role policy was deleted, we did not handle at all if there

was authorization issue to do the deletion. Also add message when

role is not found and the policy is skipped.
2016-12-08 11:24:16 -05:00
Peter Sprygada
8210ede9b4 refactor iosxr_template module to remove old diff functions
this replaces the old diff functions with the netcfg shared module for
handling configuration diffs between running and candidate
2016-12-08 11:24:16 -05:00
Peter Sprygada
bba38d2cf8 refactor iosxr_config module to remove old diff functions
this replaces the old diff functions with the netcfg lib for handling
configuration diffs between running and candidate configurations
2016-12-08 11:24:16 -05:00
Peter Sprygada
c2c8d51ba2 cleanup iosxr_command module to be consistent with other network modules
this cleans up some of the function calls and output keys to be consistent
with other command modules
2016-12-08 11:24:15 -05:00
Ricardo Carrillo Cruz
1b5288b703 Only check default_project on resource creation
The default_project is checked at the beginning of the module.
This raises an exception if the project passed does not exist.
This logic only makes sense on resource creation, if a user
puts state=absent the module fails, even though the default
project is not relevant
2016-12-08 11:24:15 -05:00
Peter Sprygada
834bc225c9 refactors nxos_template and removes diff functions
replaces the diff functions with the netcfg shared module for handling
configuration diff
2016-12-08 11:24:15 -05:00
Peter Sprygada
5a61909b4a refactors nxos_config and removes diff functions
this refactors the nxos_config module removing the diff functions and
replacing with the netcfg shared module
2016-12-08 11:24:15 -05:00
Peter Sprygada
19119a2759 cleans up nxos_command and adds some additonal info on exception
This cleans up some of the nxos_command module code function names to
be more consistent and adds additional information of failures
2016-12-08 11:24:15 -05:00
Peter Sprygada
a4bb4ee146 refactors eos_template to remove diff functions
replaces functions with netcfg shared library for handling configuration
diffs
2016-12-08 11:24:15 -05:00
Peter Sprygada
f77bb0ac28 refactors eos_config to remove config diff functions
replaces with netcfg shared library for handling configuration diffs
2016-12-08 11:24:15 -05:00
Peter Sprygada
006c11cf34 refactors the ios_template module to use netcfg diff
removes the functions for performing configuration diffs to use the
netcfg shared lib
2016-12-08 11:24:15 -05:00
Peter Sprygada
ff928d0829 refactor ios_config to use netcfg diff shared lib
Move the configuration diff code from the module to the shared lib
2016-12-08 11:24:15 -05:00
Toshio Kuratomi
708d49777d Allow async to not need an args file since new-style modules have args embedded 2016-12-08 11:24:15 -05:00
Brian Coca
ff755da1e5 fixed doc quoting 2016-12-08 11:24:15 -05:00
Brian Coca
37513ca8bb corrected required docs as only boolean is allowed
these complex values were not displayed and would always show the fields as requried
2016-12-08 11:24:15 -05:00