Commit Graph

15867 Commits (31045d58c659858c6ee9524411716a3d2a5f515b)

Author SHA1 Message Date
jhawkesworth a3e2280e62 correct examples to match correct _password module parameter names (#23067) 8 years ago
Artem Zinenko a5da638d34 Fix #22126 (#22128) 8 years ago
Pavel Glushchak 097173c6f5 Added Virtuozzo distribution support
Virtuozzo Linux is based on CentOS sources. Thus OS family
should be recognized as 'RedHat'.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
8 years ago
Fabrizio Colonna 3765dc37ca Fixed issue #22996 and issue #22955.
(cherry picked from commit 4465171e89)
8 years ago
Victor Perron bc44175d8d paramiko_ssh: fix crash upon pass prompt in py3
The pass prompt expects an answer and compares a `str` to a binary buffer, thus crashing.

It's an obvious fix to help transitioning towards Python3 and hopes it does not need a specific test.
8 years ago
Jeremy L. Gaddis b52dbddc17 Update requirements for seboolean module (fixes #23028) 8 years ago
Ricardo Carrillo Cruz cc7e09451a Fall-back to show configuration on old IOSXR devices (#22900)
In old IOSXR versions, 'show commit changes diff' does not work.
Fall-back to 'show configuration' if that command fails so execution
can move forward.

Fixes #22235
8 years ago
Dag Wieers 521fa9b458 win_chocolatey: Fix state=latest when absent (#23041)
When using state=latest with the package not being installled, Ansible complains that the package is not installed and fails the task.
Whereas the expected behaviour is to install the package when it is missing.

This PR fixes this behaviour.
8 years ago
Matt Clay 0ed86775f0 Fix PEP 8 issues. 8 years ago
Dr Josef Karthauser 0752906ae5 Add --jail support to pkgng. (#22958)
* Add --jail support to pkgng.

* Bump the version number for the --jail argument.
8 years ago
Brian Coca 37cef2a9eb standarized role/plugin paths 8 years ago
Sloane Hertel 7720ef8ec1 [cloud][python3] bytes fix to make ec2_key work on python 3 (#23051) 8 years ago
Brian Coca ea7bff4a3f changed spec to options as per irc meeting 8 years ago
Toshio Kuratomi d3a1aea7c5 Fix a couple issues in synchronize with docker (#23047)
* Fix a couple issues in synchronize with docker

* Make the rsync_opts parse as a list using the same criteria as
  module_utils argumentspec parsing
* Do not quote arguments in the action plugin.  The module will quote as
  it knows whether it will invoke rsync with a shell or via exec.

Fixes #23046
8 years ago
Peter Sprygada 768cb437ab minor updates to network connection plugins (#23043)
* removes unused log() function in network_cli
* adds method comments to terminal plugin base
8 years ago
Brian Coca c0db6d79f6 minor correction to module path option docs 8 years ago
Brian Coca 99e298a2a6 removed bad ignore as host can override connection
also breaks testing network modules
8 years ago
Evgeni Golov 61579aebb2 cron: don't force changed=True when old crontab was empty
The cron module forces changed=True when there was no real change,
but the original crontab did not contain a final newline, which is
mandatory.

When the user has no crontab or the user does not exist at all,
crontab -l exits with 1 and the cron module correctly interprets
this as "no crontab" and stores the old crontab as "".

However this triggers changed=True, even if we're not going to
change anything, e.g. when removing a crontab entry from a user
who has no crontabs at all.

Let's special-case the fact that the old crontab is empty and not
force changed=True in that case.
8 years ago
Ricardo Carrillo Cruz 6fa3cb55e1 Fix dynamodb pep8 issues (#23032) 8 years ago
Miyurz 1ea1becf23 Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset… (#22502)
* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository

* #22455 Integration test for git module to test if it clones a repository with a file named origin

* Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml

* Removed the newly added target git and moved the code to test/integration/targets/git

* Reorganised code structure as per comments

* Fixed playbook name

* Added code that didn't make it to the playbook before.

* No longer need git.yml

* Remove non tasks specific code from tasks file and use existing variables

* Removed msg var from the vars.yml
8 years ago
nevotheless ab8578d343 Update netapp_e_amg_sync.py (#22693) 8 years ago
Corey Christous 34a3ab94d8 add tagging to dynamodb_table.py (#20946)
* add tagging to dynamodb_table.py

* fix doc syntax

* address PR comments

* add boto3 has tagging check
8 years ago
Ricardo Carrillo Cruz a5b12ff269 Introspect flag to use on 'show run' when using defaults in ios_config (#22903)
When the ios_config module has 'defaults' param it runs in the device the command
'show running-config all' but 'all' may not be available in older devices.
This change makes introspection by using the help command and run 'full' in case
'all' is not available.

Fixes #22747
8 years ago
Chris Houseknecht d2ea851d09 Adds k8s_common.py (#22899) 8 years ago
Mike Hume a4ae329465 Update __init__.py
Just guessin, but is this how it is supposed to read?
8 years ago
Hugo Chargois 1bc5527c69 Vault: Remove tmp decrypted file when experiencing error while writing (#14835)
* Vault edit: Erase tmp file if error while writing to it

* Close the FDs returned by mkstemp()
8 years ago
Jon "The Nice Guy" Spriggs 8e0c11ebc4 Add examples in os_server module showing userdata (#22997)
* Add examples in os_server module showing userdata

Added an example using Bash and also using Cloud-init. Also, showing using {% raw %} and {% endraw %} to provide a pointer to those hitting similar issues to the ones I had.

* Removed erronious whitespace
8 years ago
Nick Ball c8364d64d6 [cloud] New module: AWS lightsail (#19846)
* Add AWS lightsail module

* lightsail: fix doc error + badly formatted yaml

* lightsail: code style cleanup

* make requested lightsail changes

* fix imports and pep8

* fix metadata and version

fix yaml

fix RETURN section
8 years ago
Senthil Kumar Ganesan dd63dfcf1e Ansible 2.3 feature support for dellos9 and dellos10 (#22856)
* Ansible 2.3 feature support for dellos9 and dellos10
* Use Persistent Connection Manager

* Fix CI issue, revert the doc and metadata changes

* Reverted the meta_info (supported_by) to community from core

* Fixed the CI issues, use module_utisl.six and updated legacy-files
8 years ago
John R Barker f9b75d44e8 pep8 fixes (#23005) 8 years ago
John R Barker 58441869bd metadata_version, not version 8 years ago
Will Thames 7142e28423 [cloud] Default `encrypted` parameter on ec2_ami_copy to False (#22634)
Set encrypted to default False, rather than None

Otherwise you get:

```
Invalid type for parameter Encrypted, value: None, type: <type 'NoneType'>, valid types: <type 'bool'>)
```
8 years ago
Davis Phillips 36e24c53c6 Vmware resource pool first add (#21116)
* Adding first checkin of resource_pool module
* fixing length issues and indentation multipliers
* mend
* mend
* mend
* remove * import from modules
* Add space on variable assignments
* changing line 321 to less characters
* fixing pep8 issues
* mend
* cleaning up example section
* Add RETURN section
* adding spacing to list
* all spacing consistent now
* move imports as per CI
8 years ago
Peter Sprygada ab4b8cb104 removes unused code in eos action plugin (#22986) 8 years ago
Alex Lo ac74520b6f ec2_group: description property is immutable (#19790)
* update integration tests for updated boto exception message

* integration tests fail on both "test credential" test cases

exception bubbles out of module.  instead catch and wrap

* ec2_group does not support updating a security group's description

AWS security group descriptions are immutable.
if ec2_group finds a group that matches by name, but the descriptions do not match, the module does not support this case
previously it would check if the group was used, but would not do anything if it was

old behavior was erroneous because it could make a user expect that the description change of a group was fine when in fact it did not occur
also, it made an expensive check against all ec2 instances for no good reason

* comments not doc strings

* else must have pass w/o doc-string statement

* Catch specific BotoServerException, give context around error when fetching SGs

* python3 compatible exception blocks

* add traceback to fail_json

* two blank lines before first function
8 years ago
Peter Sprygada 3169cbd493 roll up of fixes for sros modules (#22972)
* fixes action handlers for sros
* fixes sros_config module execution to use AnsibleModule
* fixes sros_command module to use socket connection
* adds sros to constants
8 years ago
Peter Sprygada 33624fe96f fixes junos_package module to use junos_pyez (#22973)
This allows junos_package to use junos_pyez directly instead of the
persistent connection.  This is a workaround fix for 2.3
8 years ago
Gabriele 9b2bdf2df6 Fixing module behavior when route_target_both is used (#20076) 8 years ago
Peter Sprygada 6a414371a1 fixes issue where nxos module will fail due to KeyError (#22966)
Updates nxos action handler to handle deleting provider key if exists or
silently continuing if a  KeyError is raised.
8 years ago
Peter Sprygada e93cdecef1 fixes log message in junos action handler (#22965) 8 years ago
Toshio Kuratomi 9c9ef0d6ab Fix a few problems with the metadata extraction for docs (#22963)
* key is ANSIBLE_METADATA, not METADATA
* Need to check that the node is an ast.Dict, not a real dict.
* Need to convert the ast.Dict into a real dict via literal_eval.
8 years ago
ukaj db328a0f83 [cloud] Add support for running s3 module in check mode (#22188) 8 years ago
Brian Coca 9a05113daf pass params to validate against 8 years ago
Brian Coca 25de905c6e subspec protptype 8 years ago
scottb ed413f2b28 Update vault.py
Edit for conciseness and clarity.
8 years ago
Brian Coca 2a2e02aea4 .--. . .--. ---.. / .. ... / .- -. -. --- -.-- .. -. --. 8 years ago
Brian Coca 18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
8 years ago
Brian Coca b4c47ebf68 draft to generate man pages 8 years ago
Brian Coca 7b197d823e let user control "auto-de-vault" (#22739)
* added option to toggle off autodevaulting

* fixes per feedbazck
8 years ago
Toshio Kuratomi 29f623571e Handle the case where HTTPError.info() returns an object that aren't (#22894)
dict-like enough (can't be used with **).

This should give a better error message for #22872
8 years ago
Erwin Lang f7c9f44aab synchronize: Convert cmd to list and fix handling of the copy_links argument (#22573)
* synchronize: Convert cmd to list and fix handling of the copy_links argument

Converting cmd from str to list stops the pain of argument quoting/escaping.

* synchronize: Update imports according to #pullrequestreview-28758614
8 years ago
Toshio Kuratomi 65d9feea4f Revert "Quote ssh_args"
This reverts commit a9c3a452f0.
8 years ago
Toshio Kuratomi a9c3a452f0 Quote ssh_args
Fixes #22111
8 years ago
Alexander Gordeev 4b9b0a25c3 Add pvs info to linux hardware 'ansible_lvm' facts (#16773)
This change adds the information about physical volume to hardware
facts.
8 years ago
Miroslav Lichvar c1a766df98 Add PHC and timestamping info to network interface facts on Linux (#21767) 8 years ago
Adrian Likins 25be6aebc3 Add HDD serial numbers. (rebase/fixes of #9454) (#22852)
Add HDD serial numbers to linux hardware facts via 'sg_inq' tool
8 years ago
Matt Davis e084e8809e force Windows to always use preamble-free UTF8 input encoding (#22934)
* fixes #15770
* When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
8 years ago
Dhivyap cd662efd2b Fixes#21557-Handled dellos9_facts crash with IPV6 configs (#21652) 8 years ago
Dag Wieers 1cfaa5caab win_command/win_shell: Clean up and make coherent (#21371)
* win_command/win_shell: Clean up and make coherent

Changes include:
- Make win_command and win_shell more coherent
- Make condensed one-line more readable

* Revert to original formatting
8 years ago
Artem Zinenko f4b34a4c3b win_firewall_rule doesn't fail when profile is "any" or remoteip is IPv4 and the task runs more than once. (#22555)
* Fixed #22554

* Wrote tests for win_firewall_rule module

* Fixed #22786

* Fixed review comments

* Fixed #22799

* Added test when RemoteIP containt a netmask

* Revert comment
8 years ago
Gabriele d7d76f3aaf Fixing nxos_vrf_interface when interface name is not full (#22769) 8 years ago
Luis Rueda 0fe29f8eb1 Update netconf_config.py (#22429)
Fixes issue https://github.com/ansible/ansible/issues/22410
Fix trailing whitespace at the end of line 66
Fix version_added: "2.3" for allow_agent and look_for_keys
8 years ago
Dag Wieers ac43a1bbbc Windows: Use the correct newline sequence for the platform (#21846)
This change to the template action plugin make template use the
platform's native newline_sequence for Jinja.

We also added the option `newline_sequence` to change the newline
sequence using by Jinja if you need to use another newline sequence than
the platform default.

This was previously discussed in
https://github.com/ansible/ansible/issues/16255#issuecomment-278289414

And also relates to issue #21128
8 years ago
Peter Sprygada 866f67e213 fixes a number of issues with nxos_facts (#22923)
* updates command runs to return warning if command fails
* fixes variable issues from recent refactoring
* removes provider from return of module
8 years ago
Matt Davis 73f50b4f9f fix Windows env handling (#22927)
* fixes #22441
* fixes #22655
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
8 years ago
Jordan Borean f1ab879bb6 win_reg_stat change the module parameters for standardisation (#22732) 8 years ago
Jordan Borean 89b78cb5e8 win_share: tweaks after the caching mode changes (#22763)
* win_share: tweaks after the caching mode changes

* Re-added the Unknown option back in
8 years ago
Toshio Kuratomi 2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
8 years ago
Toshio Kuratomi c7c8481181 No need to specialcase comment characters
If the # is inside of quotes, it's a string.  If it's outside of quotes
then an exception will be raised which we'll catch and then send to the
to_text() call at the end of the function anyhow.

Fixes #22868
8 years ago
Toshio Kuratomi 589e217278 base64 functions must be given byte strings
The base64 stdlib functions require byte strings.  So we have to
transform the strings into bytes before handing to the stdlib and then
transform them back into text before handing back to ansible.

Fixes #22873
8 years ago
Toshio Kuratomi d0712b1ec7 Make yum's state=list obey disablerepo and enablerepo
Fixes #22876
8 years ago
Peter Sprygada cda3e001c6 fixes issue when host is defined in provider for junos (#22918)
The junos action handler was not honoring the host value in the provider
argument.  This patch will now use the provider host entry if it exists
and falls back to the inventory hostname
8 years ago
Matt Martz 0ced29c51b Don't skip action/__init__.py (#22911) 8 years ago
Matt Martz ed52d91249 Swap pep8 current to legacy (#22891) 8 years ago
Sloane Hertel 1ca4a42c0e include traceback in exception handling (#22807) 8 years ago
Adrian Likins 0bb3545333 Remove ununsed Connection.log method (#22837)
method referenced 'logger' which no longer exists.
8 years ago
Adrian Likins dfec69b9a1 Fix bad ref to AnsibleConnectionError -> AnsibleConnectionFailure (#22838) 8 years ago
Dustin Spicuzza 78de05e58d win_iis_webapppool: Use Get-AnsibleParam to retrieve parameter
- Fixes #22805
8 years ago
Adrian Likins ee478c4885 make netconf.py stylish (#22839)
(flake8 stuff)

netconf.py:22:1: F401 're' imported but unused
netconf.py:23:1: F401 'socket' imported but unused
netconf.py:24:1: F401 'json' imported but unused
netconf.py:25:1: F401 'signal' imported but unused
netconf.py:31:1: F401 'ansible.module_utils.six.moves.StringIO' imported but unused
8 years ago
Brian Coca 91a385b87d etcd doc tests 8 years ago
Brian Coca d14634ca21 uncommit the crime of extra spaces in docstring 8 years ago
Brian Coca 7839f70e36 Enable documentation in plugins
Made ansible-doc more plugin agnostic
We can have docs in lookup, callback, connectionm strategy, etc
Use first docstring and make pepizis happy
generalized module_docs to plugin_docs
documented cartesian, ssh, default, jsonfile, etc as examples
changed lack of docs to warning when listing
made smarter about bad docstrings
better blacklisting
added handling of options/config/envs/etc
move blacklist to find_plugins, only need once
8 years ago
Brian Coca d3115ae8f3 put cache base classes in __init__ (#22809)
* put cache base classes in __init__

* added placeholder
8 years ago
Brian Coca 97cb2016d8 keep ansible_local as top level var, always present 8 years ago
Evgeni Golov 7a00f28804 synchronize: explicitly set the executable for localhost
Otherwise the executable for the destination is also used on the local
machine and this might not exist.

Fixes: #22867
8 years ago
Matt Martz 3164e8b561 E501 fixes (#22879) 8 years ago
Glen Maetzig ac992eff1c Import camel_dict_to_snake_dict method to fix error when executing get_nat_gateways() method
(cherry picked from commit 223fc34ab9)
8 years ago
Shaun Brady cd24bbbc9c Missing purge_subnets parameter on function call
purge_subnets|routes were introduced recently.
ensure_subnet_associations now takes purge_subnets as a parameter.  A
call to this function was missed when introducing this feature.  With
out, results in a "got 5 expected 6" error.
8 years ago
mjfroehlich cc50b803df [cloud][route53_health_check] Consider port in identity test (#22762)
Allows to health-check two services on one host. Before, asking for 2 health checks being present for `http://myhost:8888` and `http://myhost:9999`  resulted in just a single health check, as this module considered the two specs as equal.

Bonus: route53_health_check now passes style guidelines
8 years ago
Brian Coca 052be86605 fix for loosing ungrouped hosts in ini
fixes #22861
8 years ago
Brian Coca 5e98be2e62 better handling of parsed
updated tests to match new result output
8 years ago
Brian Coca 9ad62a48ab prevent failure for meta: reset_connection
now plugins that don't explicitly support it give a warning.
8 years ago
Robin Schneider bbc6af6749 Fix use of unauthenticated connection examples in git module docs
Ref: https://git-scm.com/book/ch4-1.html#The-Git-Protocol
8 years ago
Ricardo Carrillo Cruz 98c98125f0 Fallback to show-run on ios_banner for devices where show banner does not work (#22793)
On switches 'show banner' command doesn't work, fallback to show run|begin banner
and extract the banner text in case that fails.
8 years ago
Matt Martz 02f66b9369 E1 legacy pep8 fixes (#21933)
* E1 pep8 fixes

* e111 fix for rds.py
8 years ago
Ted Timmons 887456ab8e Fix stderr false return value (#22845)
* ensure exit_json does not fail from stderr=False

- do a little bit of safety-checking in exit_json to not try to .splitlines() on a boolean
- remove the stderr=boolean from uri.py, this is the only spot that uses it (at least so obviously)
- add unit tests that call exit_json. These are useless because the stderr parsing is in _execute_module and is difficult to mock; deleting these tests after the commit.

* remove added unit tests per prev commit

exit_json doesn't do the param parsing, that is buried deep inside _execute_module.
8 years ago
Brian Coca 5beb27ef5e use namespaced facts 8 years ago
yuriy-z 40a1f20bea Add storage device WWN to facts for Linux (#16640)
World Wide Name (WWN) is unique identifier of device.
This patch adds this identifier to facts for Linux.
8 years ago
Johan Guldmyr 897201c4be add infiniband network type (#18833) 8 years ago
Christian Albrecht 66818050b0 Add perm_hwaddr on Linux bonding slave nics (#19071)
This patch will additionally report the `perm_hwaddr`
fact of a Linux bonding slave network interface.

Related to issue #19067
8 years ago
Brian Coca 455aff8436 ported fix from ansible-core #5639
From 3d09c94faeaa52075055f23744d8b52581c59bb2 Mon Sep 17 00:00:00 2001
Evan Kaufman <evan@digitalflophouse.com>
8 years ago
Brian Coca 2022fc162a fixed name to unit 8 years ago
Brian Coca b82aa41e31 removed deprecated config/env vars 8 years ago
Brian Coca 3f4b87f0c0 allow systemd to 'just' reload 8 years ago
Peter Sprygada d6787632c9 fixes return data structure (#22830)
The return was being re-written instead of updated so warnings were
lost.  This patch now updates the result instead of replacing it.
8 years ago
Joshua C. Randall e7fd38af78 Fix get_s3_connection (fixes #22317) (#22318)
* Fix get_s3_connection (fixes #22317)

Override aws_connect_kwargs rather than prepending to them. Should fix an issue in which `calling_format` is set twice in the kwargs passed to `boto.connect_s3` or `S3Connection` if a bucket name contains a `.`

* Revert "Fix get_s3_connection (fixes #22317)"

This reverts commit 7f61b8bebd.

* implements alternative way of fixing issue with aws_connect_kwargs for rgw and fakes3 (fixes 22317)

* add comment to explain why the keys are being removed from aws_connect_kwargs

* remove trailing whitespace on comment line
8 years ago
René Moser e3525d8df9 cloudstack: fix pep8 for loadbalancer modules (#22822) 8 years ago
Peter Sprygada e20ed8bc0c replaces logging with display for network connection plugins (#22819)
* updates network_cli and netconf connection plugins
* updates ansible-connection
8 years ago
Peter Sprygada ed7cace425 implements python logging for network connection plugin (#22817)
* enables logging for network_cli and paramiko
* enables logging for ansible-connection
* enabled logging for netconf connection
8 years ago
Joseph Price ed15ba1b3c CLI: unfrack --private-key path
Relative paths can break the synchronize plugin when the playbook
is not in the current working directory.

Fixes: ansible/ansible#22695
8 years ago
Brian Coca 07d9366ed8 added 'existing' back
fixes #22785
8 years ago
Tom Melendez 1c38cba7ca [GCE] Invalid zone reported through fail_json
* added new helper function for zones and regions.
* modified GCE module to use it

Fixes: ansible/ansible#20616
8 years ago
Peter Sprygada cdb4d350b4 removes unneeded exception 8 years ago
Ondra Machacek a46c55b2dd cloud: ovirt: Add sparsify option to ovirt_disks (#22560)
This patch fixes: https://github.com/ansible/ansible/issues/22348
8 years ago
René Moser 24c617766c cloudstack: fix load balancer idempotency if no zone given (#22768)
get_zone() is special, as it always returns a zone (default zone) even
if no zone param is given. This makes sense for many use cases.
8 years ago
David Baumann 634d6894e3 Add Missing default param for caching_mode (#22753)
Add Missing default param for caching_mode and Usage of new Ansible-Param Commant with default Value
8 years ago
Sloane Hertel 4749b75090 [cloud] ec2_eni: don't modify a network interface without eni_id - fixes #22401 (#22689)
* don't modify an eni without eni_id

fix pep8

remove ec2_eni from pep8 legacy files

remove a couple unused variables in main()

fix the documentation

* fix yaml
8 years ago
Sloane Hertel 8ccde6fbb0 [cloud] make docs for ec2_group rules more clear (#22701)
make ec2_group pep8

removed ec2_group from pep8 legacy files
8 years ago
Sloane Hertel a4552c11b3 allow groups parameter to be noticed as an empty list (#22707)
make iam.py pep8

remove iam.py from pep8 legacy files
8 years ago
Andrea Scarpino c80d696cec win_file: fix error when creating an existing dir (#19070)
If something else created the dir New-Item will throw an exception and
the task will fail. Check the existing file and as long as it's a dir,
we don't need to error out.
8 years ago
René Moser b90517caf9 cloudstack: implement config overloading and ENV vars for API auth (#22724)
* cloudstack: fix connection by ENV vars and configs overloading

* cloudstack: pep8 cloudstack module_utils

* cloudstack: allow api_url to be set in ini config

* docsite: explain ENV vars support as written in python-cs for ansible
8 years ago
Tom Melendez f5f6cf467e [GCE] Support default credentials (#22723)
Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.
8 years ago
Matt Davis ffa4f0c427 Suppress Windows Add-Type debug noise (#22722) 8 years ago
Andreas Mosti 1fa7a3db27 Added example of removing the standard website and port 80 binding (#22457) 8 years ago
Brian Coca c6dedea1a6 corrected docs 8 years ago
Jens Carl cd39ff9996 Add parameters to limit replace to certain section of the file
Add parameters 'after' and 'before' to limit the replacement/remove of
lines to a certain section of the file.
8 years ago
Brian Coca 4319ddd5de allow users to control group var merge order (#22580)
* allow users to control group var merge order

With ansible_group_priority var at each group will determine merge order with siblings,
falling back to sorted names when priority is equal as it did before.

Parent/children relationships still work as they did and have higher precedence than priority

* move priority setting to groups, sourc indep

* now both inventory and play group follow priority

* removed double exception handling
8 years ago
jralbert 5334814396 Cast syslogport value from getenv as int (#22664)
SysLogHandler requires an int for port, but getenv produces a string.
Cast return from getenv as int to overcome this mismatch.
8 years ago
Ilya Simonenko dba8edf735 cloud: docker: Fixes #22638 load image to memory when archive_path provided (#22642) 8 years ago
Brian Coca 4fb8b03f05 added docstring to get_hosts_left 8 years ago
Brian Coca 6a4039e169 readded !vault-encrypted for backwards compat
even though this was never documented someone might be using it
8 years ago
Brian Coca 6b46cc5c73 added new 'order' directive to sort hosts in play
fixes #10964
8 years ago
Ricardo Carrillo Cruz 6e56a61535 Add ios_banner module (#22687)
With unit and integration tests.
8 years ago
Dag Wieers 895664f539 vmware_guest: Fix "KeyError: 'changed'" (#22564)
Due to how the result-dictionary is being used, in some codepaths it would have an empty dictionary.
This then is problematic if the code expects the 'changed' key later on.

I also improved the docs a bit, by clearly marking the parameter names and URL in the documentation.
8 years ago
Ondra Machacek 7a3b6ca37c cloud: ovirt: fix ovirt_nics profile search (#22684) 8 years ago
Brian Coca dd8d699981 namespace facts (#18445)
* namespace facts

always namespace facts, make the polluting of 'main' conditional on config

* updated to 2.4

* Update intro_configuration.rst
8 years ago
Brian Coca 0c44959800 added new tests any and all (#22665)
* added new tests any and all

* updated code names
8 years ago
Brian Coca eb0b1e149d warn when failed to match host pattern
fixes #11934
8 years ago
Dylan Silva 9ffad27319 Changed supported_by from curated to community (#22654) 8 years ago
Dylan Silva 4c8da5ad49 changed supported_by from curated to community (#22656) 8 years ago
Dylan Silva 049946b26f Dropped openwrt module from curated to community (#22657) 8 years ago
Brian Coca 517cdbe22a better 'role detection' for dwim (#22513)
* better 'role detection' for dwim

possible fix for #21735

* fixed unmatched paren

* pep does not like the denting
8 years ago
Brian Coca 39ba55e5ac corrected host group ancestor management 8 years ago
Brian Coca 7b0f765a57 made error slightly more neutral in case of 'local' 8 years ago
Brian Coca 273786d0bd simplified pattern matching, fixed ungrouped (#22523)
* simplified pattern matching, fixed ungrouped

ungrouped was ignored for patterns, now it is usable again

* even simpler
8 years ago
John R Barker 08d9a5932f metadata_version 8 years ago
Sloane Hertel 5e67f86586 [cloud] fix ec2_vpc_route_table module documentation - Fixes #19344 (#22367)
* improve ec2_vpc_route_table documentation

* make pep8
8 years ago
Sloane Hertel 3aef028d42 [cloud] make ec2 module pep8 (#22421)
* making ec2 pep8

* remove ec2 from pep8 legacy files

* missed a couple

* fix imports and remove iteritems

* making group_id and group_name mutually exclusive and fixing whitespace
8 years ago
John R Barker 9857ce8ddb Fix render issue (#22650) 8 years ago
John R Barker f82239e1f7 [WIP] Network module docs 2.3 (#22454)
* Tidy up docs for network 2.3 modules

* Use suboptions

* Correct indentation

* more tidyup

* bulk updates

* more tidyup

* Bulk changes

* nxos_mtu is dead

* revert

* NXOS_mtu is dead, also better layout

* rebase

* rebase
8 years ago
James Cammarata 76f28fd2fc Bumping devel version to 2.4.0 8 years ago
Dag Wieers 72e7927dd5 win_scheduled_task: Added frequency: once and check_mode support (#22611)
* win_scheduled_task: Added frequency: once and check_mode support

This patch includes:
- Renamed `execute:` parameter to `executable:`
- Renamed `argument:` parameter to `arguments:`
- Implemented `frequency: once` support
- Implemented check_mode support
- Fix idempotency issue related to empty description
- Added integration tests

* Improve the integration test structure

I think this is a great way to test normal mode and check-mode from the same playbook.

* Small fixes after review
8 years ago
Ondra Machacek 699df5824d cloud: ovirt: fix update_params for ovirt module_utils (#22637) 8 years ago
Ondra Machacek bb7e7be71f cloud: ovirt: Fix disk image upload (#22557) 8 years ago
Dag Wieers 9755d2dbbc win_feature: Clean up and check-mode support (#21351)
* Clean up parameter handling and added check-mode support

Changes include:
- Remove trailing semi-colons
- Replaced PSObjects into normal hashes
- Make use of Get-AnsibleParam and types
- Added check-mode support

* Implemented -WhatIf:$check_mode support

* powershell.ps1: Ensure Fail-Json() works with Hashtables

Without this change a dictionary $result object would be emptied if it
is anything but a PSCustomObject. Now we also support Hashtables.

* Revert to original formatting
8 years ago
Dag Wieers 589c483cfc win_chocolatey: Add check-mode support (#22501)
This patch implements:
- check-mode support
- add state "reinstalled"
- cleanup of timeout parameter
8 years ago
Jordan Borean 6ce338d29c win_service Added -Force option and minor cleanup (#22598)
* win_service Added -Force option and minor cleanup

* Changed parameter and fixed typos
8 years ago
René Moser 0ee108bda0 cloudstack: cs_instance: revert VPC support (#22629)
Partly reverts 5374c7cd09
8 years ago
René Moser a2b6844858 cloudstack: cs_network: fix VPC support (#22627)
* cloudstack: cs_network: fix vpc support

* cloudstack: cs_network: fix pep8
8 years ago
René Moser 38b9f055d7 cloudstack: cs_staticnat: fix VPC support (#22626)
- Fix the VPC support by adding network to create and update methods
- Fix pep8
8 years ago
René Moser a227a4ebb4 cloudstack: cs_ip_address: fix vpc support (#22625)
* cloudstack: cs_ip_address: fix vpc support

* cloudstack: cs_ip_address: fix pep8
8 years ago
Matt Davis ce56da69b2 make windows async ... async (#22624)
Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
8 years ago
Sumit Kumar 994840447f Fix root volume security style options 8 years ago
Ricardo Carrillo Cruz 604a38cac1 Implement eos_banner for EAPI (#22609)
On EAPI, the multi-line commands are expected to be a dict,
with key/value pairs 'cmd'/'input' .
This change implements that behaviour and fixes the idempotency
on EAPI as well.

Fixes #22494
8 years ago
Ondra Machacek 38eb388154 ovirt: cloud: make the datacenter input compatible (#22483)
This patch makes sure that all inputs of datacenter are compatible. So
it's 'data_center' everywhere.
8 years ago
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
8 years ago
René Moser 2be3418a81 cloudstack: fix wrong vpc found by name (#22603)
Fail fast if more than one VPC found with given identifier.
8 years ago
Marc Mercer c5c0d9086e [cloud][docs] update ec2_tag documentation example (#22586)
Currently the documentation utilizes with_subelements, but it does not parse the results correctly.  By changing to with_items: and specifying the proper list, we are able to tag the instances as expected.
8 years ago
Peter Sprygada eed240797a adds connection established message to ansible-connection (#22492)
This will now print a log message that displays how long the ssh
connection took to establish to the remote device.  If the connection
established time is exceed it will also print a message to the log file
that the connection attempts have exceed.

Updates default connection retries to 30

fixes #22319
8 years ago
Matt Davis 07674a8446 prevent winrm Add-Type debug noise from polluting stderr (#22583) 8 years ago
Brian Coca 0897ec9938 warn when name is overloaded as both host and group
added small optimization to base group comparisson
fixes #6545
8 years ago
Ryan Brown 19511971ee Format ELBInfo call (#22383)
Move declaration of AWSRetry of get_all_load_balancers so it isn't redeclared for every page of data.
8 years ago
Robin Miller 6d8edfc35f Handle throttling and move BotoServerError handling to main. (#22383)
Unclear how useful it is to still be catching BotoServerError exceptions
generally, especially when we are now hopefully handling most instances
of throttling, but kept it as it was already in the code. Moved to main
as catching BotoServerErrors inside individual functions will bypass any
AWSRetry.backoff decorator.

Move additional imports to top.

Use python2.6 formatting

A bit of cleanup on imports

Make one more string interpolation Python 2.6 compatible.
8 years ago
Ricardo Carrillo Cruz 2553a37da5 Add no_log to all network module_utils provider argument (#22566)
The provider argument on the network modules argspec can contain
credentials.
Make sure we don't log it.

Fixes #21892
8 years ago
Chris Houseknecht b15ceee6bd Changes command and entrypoint to type list 8 years ago
Will Thames 4cc872669c [cloud] fix connection_draining idempotency in ec2_elb_lb (#21323)
* Fix connection_draining idempotency in ec2_elb_lb

Ensure connection_draining types are equivalent when comparing
whether or not connection_draining is being changed.

This means that running `ec2_elb_lb` with connection_draining
set a second time will now report `changed=False`

* ec2_elb_lb: fixed latest Ansible standards compliance

Update to current pep8 standards, fix module imports
and remove module from exclusion file
8 years ago
夏恺(Kai Xia) 5e40af0732 [cloud] change returned type of tag in ec2_snapshot_facts, fix #22431. (#22432)
Signed-off-by: Xia Kai(夏恺) <xiaket@gmail.com>
8 years ago
Ondra Machacek f5abcd9264 cloud: ovirt: Fix ovirt_tags documentation (#22569) 8 years ago
Will Thames 459724da6b [cloud] Convert nat gateway facts to ansible format (#20962)
Use camel_dict_to_snake_dict
8 years ago
Adrian Likins 3af6ad1687 Fix iptables TypeError if state/match/ctstate missing
Completely untested...

Fixes #22465
8 years ago
Alexander Gubin 06bcff8d92 Mark keystore_pass as 'no_log', to avoid leaking it 8 years ago
Joshua C. Randall 444b67ca0c s3_bucket: fixes #22464 without fully implementing support for ceph bucket update (#22538) 8 years ago
Ganesh Nalawade 8b6d786cff Fix junos prompt issue (#22536)
Need to handle junos shell prompt
that end's with '%'
8 years ago
Peter Sprygada 39c38bf30d fixes candidate var type in junos shared lib (#22551)
* candidate var can now be string, list or element
* fixes minor bug in junos_template for backup argument
* disabled invalid integration test for junos_template
8 years ago
Peter Sprygada b3004e19a5 Junos facts (#22550)
* Update metadata & docs

* basic facts add

* Start building facts

* Retrofit more junos_facts

* Reimplement facts again

* Hardware

* Hook up config

* Hook up interfaces

* updates junos_facts to use netconf

* updates default facts
* adds config facts
* updates hardware facts
* updates interface facts
8 years ago
Johannes Kohnen cc2eecc247 Enable path expansion in GCE modules
This is basically a replay of #16064 from `gce.py` to other pertinent
`gce_*.py` files. It enables expansions of paths in `gce.ini` like
`~/.project.json`
8 years ago
John R Barker 0d0c38400f eos_template is deprecated (#22549) 8 years ago
John R Barker d21c16d455 Remove invalid `type:` (#22548) 8 years ago
Peter Sprygada 2b2072a8c9 roll up of fixes and updates for junos modules (#22543)
* removes cli functions
* adds comment and confirm to arguments
* implements zeroize argument
* fixes get_diff function in junos shared lib to return diff
* lots of minor bug fixes in junos_config
* minor syntax fixes in junos_netconf
* updates netconf integration tests
8 years ago
Peter Sprygada 09c08e1939 minor clean up of junos_command (#22545)
* removes unneeded check_transport function
* removes unneeded global vars
* verifies all integration tests are passing
8 years ago
Peter Sprygada 995497129e updates junos_command to send commands over netconf (#22540)
* junos_command should send all cli commands over netconf
* task based credentials are now optional
* commands and rpcs are not mutually exclusive anymore
8 years ago
Peter Sprygada 3f0f7c4f4e updates junos shared lib and action handler (#22541)
* removes cli functions from shared lib
* adds cli functions to junos_netconf module
* statically pins junos_netconf to cli transport
* all other modules use netconf transport
* adds command rpc function to junos shared
8 years ago
Peter Sprygada 1825406e1e Junos fixes (#22423)
* Fixes for junos_config errors

* Check transport settings for core Junos

* Don't pop from the same list you iterate over

* use of persistent connections are now explicitly enabled in junos

* modules must now explicitly enable persistent connections
* adds rpc support to junos_command

fixes #22166
8 years ago
Peter Sprygada 17fc6832ca fixes mapping nxapi arguments for nxos action plugin (#22491)
The nxos action plugin does not properly map task arguments when using
provider.  This patch will fix the problem and properly map the
arguments
8 years ago
Peter Sprygada 027f5955cc correctly maps task arguments for eapi transport (#22490)
The provider arguments where not correctly being mapped in the action
plugin for eapi transport.  This will now correctly map existing
arguments as well as set the correct defaults for values.

fixes #22442
8 years ago
Pierre Templier ea0bae6bca Typo + rephrase (#22526) 8 years ago
THEBAULT Julien 374d491ba5 Check if file is not a directory with get_bin_path function (#13985) 8 years ago
Ricardo Carrillo Cruz 9173a7727c Fix issue on nxos modules when transport is passed via provider (#22488)
The nxos modules read the task level transport variable, thus if
the user pass it via provider the all fail with an UnboundLocalError.

Fixes #22355
8 years ago
Brian Coca 7ad6ce7ea1 moved network module magic from hardcoded to conf 8 years ago
Brian Coca 2d9bf88897 deal with other 'ungrouped' corner cases 8 years ago
Adrian Likins ae31634c23 Make vault encrypt/create/etc confirm pass again.
Make the 'write' modes of vault confirm a new password
before using, again.

This was unintentionally disabled in
309f54b709 previously.

Fixes #22438
8 years ago
Adam Hamsik 6cf8318468 Add simple module to import/delete ssl certificate from/to java keystore (#20274)
* Add simple module to import/delete ssl certificate from/to java keystore.

* add diff/check mode support, fix reported issues and simplify decision logic

* Fix build by adding new line at the end of file.

* Some updates to module requested PR review

* Add simple executable parameter

* Fix build error
8 years ago
John R Barker e5b990a55a Fix invalid fields in module DOCUMENATION (#22297)
* fix module doc fields

* More module docs corrections

* More module docs corrections

* More module docs corrections

* More module docs corrections

* correct aliases

* Review comments

* Must quote ':'

* More authors

* Use suboptions:

* restore type: bool

* type should be in the same place

* More tidyups

* authors

* Use suboptions

* revert

* remove duplicate author

* More issues post rebase
8 years ago
Dag Wieers 654e95ea49 wait_for_connection: Update the docs to implementation (#22400)
* Update the docs to conform to implementation

Somehow the docs were still mentioning a default timeout of 300 seconds.
Whereas the implementation defaults to 600 seconds.

* Improve examples even more
8 years ago
Ricardo Carrillo Cruz c57729944b Fix the eos_banner idempotency (#22413)
The map_config_to_obj calls the run_commands  helper function,
which returns a list of results.
However, the map_params_to_obj return a single string.
Therefore, the comparison between the two datasets could never be equal,
breaking idempotency.
Also, the 'no banner' command should be run on absent only if there's a banner
text set.

Fixes #22194
8 years ago
Tim Rupp 32146acf4e Actual attributes were being created and messing with the modules (#22424) 8 years ago
Brian Coca 78e116077a readd all.add_host as for loop uses diff data 8 years ago
Nicolas Braud-Santoni f689cca0b8 vault: Uniformize construction of cipher objects 8 years ago
Nicolas Braud-Santoni 680d61c609 vault: call is_encrypted directly in is_encrypted_file
Doing the conversion and checking for exceptions there is pointless
since is_encrypted already does it.
8 years ago
Brian Coca 385f1d82dc ensure all hosts in all
fixes #20252
8 years ago
Matt Clay 0b250016b0 Fix PEP 8 issue. 8 years ago
René Moser 6f426b9d06 cloudstack: cs_vpc: fix vpc in projects not found (#22416) 8 years ago
Dave Kasberg 8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
8 years ago
Hao 96a19a4521 iptables module: match=conntrack with ctstate not working (#21976) 8 years ago
Brian Coca 406505bfe5 fixes cache file modules with bad path permissions
now module will fail to load and report an error (turned into warning as this should not be fatal)
fixes #13093
8 years ago
Dag Wieers 770ab76ed0 win_region: Small changes to Add-AnsibleParam and docs (#22310) 8 years ago
Alex Chvatal f1d8d7ba13 include upgraded packages in pacman upgrade action (#20713)
* include upgraded packages in pacman upgrade action

* display upgraded packages as diff output for pacman upgrade

* document the packages return key

* add --diff support for installing, removing and checking packages

* include package versions in pacman diff output
8 years ago
René Moser 7f35220744 cloudstack: cs_firewall: fix pep8 and typo s/endpoint/endport/ (#22406) 8 years ago
Drew Russell 94f9bb962f Add a new module for Cisco Spark notifications (#19348)
* Add a new module for Cisco Spark notifications

* Added authentication validation to check mode

* Re-added description and removed Pylint references

* Moved the authentication test to the spark_message function

* removed duplicate fetch_url statements

* documentation formatting updates and if __name__ update

* recipient typo fix and added correct Formatting options to documentation options

* updated version added to 2.3
8 years ago
Dag Wieers c45f6905fc wakeonlan: Bugfix and small improvements (#22389)
- Close the socket after use
- Use proper parameter types
- Remove redundant parameter options
- Clean up docs
- Move module from network/ to remote_management/
- Add check-mode support
8 years ago
Tim Rupp a8910e78ca Using the wrong variable (#22386) 8 years ago
Tim Rupp 3c69cf6d7d Moved exception handler in a little bit (#22376)
It wasn't being caught in the previous indentation
8 years ago
Adrian Likins edcbef27ec Retain vault password as bytes in 2.2 (#22378)
* Retain vault password as bytes in 2.2

Prior to 2.2.1, the vault password was read in as byes and then remained
bytes all the way through the code.  A bug existed where bytes and text
were mixed, leading to a traceback with non-ascii passwords.  In devel,
this was fixed by changing the read in password to text type to match
with our overall strategy of converting at the borders.  This was
backported to stable-2.2 for the 2.2.1 release.

On reflection, this should not have been backported as it causes
passwords which were originally non-utf-8 to become utf-8.  People will
then have their working 2.2.x vault files become in-accessible.

this commit pipes bytes all the way through the system for vault
password.  That way if a password is read in as a non-utf-8 character
sequence, it will continue to work in 2.2.2+.  This change is only for
the 2.2 branch, not for 2.3 and beyond.

Why not everywhere?  The reason is that non-utf-8 passwords will cause
problems when vault files are shared between systems or users.  If the
password is read from the prompt and one user/machine has a latin1
encoded locale while a second one has utf-8, the non-ascii password
typed in won't match between machines.  Deal with this by making sure
that when we encrypt the data, we always use valid utf-8.

Fixes #20398

(cherry picked from commit 5dcce0666a)
8 years ago
Alex Lo 8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
8 years ago
René Moser e0d38fb137 composer: fix escape working_dir (#22363)
* composer: fix escaping of path working_dir

* composer: fix pep8
8 years ago
Brian Coca c71b15a696 Bad extra early (#22322)
* catch bad extra vars data earlier

* incoporated @alkins feedback
8 years ago
Toshio Kuratomi 1ea3313c90 Document synchronize limitations around become and connections (#22373)
* Document synchronize limitations around become and connections
8 years ago
Brian Coca c4cff44e77 fix 'ungrouped' issue with some inventory formats 8 years ago
Brian Coca 20bf02f6b9 rename return var to avoid conflicts
fixes #22323
8 years ago
Ricardo Carrillo Cruz fd6429fbd1 Idempotency fix for iosxr_config (#22365)
Multiple fixes to address idempotency issues, along with refactor of
module_utils iosxr to look like ios, for code consistency.

Fixes #22315
8 years ago
Kamil Cholewiński ec9582fd83 Fix invocations of module.fail_json with no msg=
Bonus: add missing % in cs_nic.py
8 years ago
Michael Scherer 91860b2423 Verify that the role specification is using a comma before warning
One way to trigger this is having this snippet in meta/main.yml:

dependencies:
  - role: foo
    when: "use_foo == True"

It shouldn't show a warning but since we assume that 'foo' is the old
style format, it always show one. So we should verify the
style before calling role_spec_parse.
8 years ago
Chris Alfonso 25827c85d2 Fixing issue #22193 - authorize argument is not deprecated for 2.3 for ios and eos (#22326) 8 years ago
Loïc Blot 792efbe3b6 virt.py: autostart VM attribute (#22208)
* virt.py: autostart VM attribute
autostart is now an idempotent VM attribute instead of a non idempotent forced autostart attribute set to True

* Make shippable happy

* Missing version added

* Fix some points

* Autostart default is now None

* Ident fix
8 years ago
Andrea Giardini 863c1ff38b Ec2_tag support for check mode (#21779) 8 years ago
John R Barker 8531547ec2 Correct `module:`, it should match filename (#22296)
* Validate module: matches filename

* remove testcase

* Revert module validation, move to different PR
8 years ago
Tim Rupp c2180888f7 I think for now I'll just not use dunder setter (#22336) 8 years ago
Ricardo Carrillo Cruz 5357a67607 Remove 'update' param from documentation examples (#22350)
The 'update' param is no longer supported, thus removing from docs.
8 years ago
Ryan Brown f0491b4261 [cloud] Fix ZeroDivisionError in ec2_elb_facts module (#22332) 8 years ago
Tim Rupp 6ff9bd0a33 Fixes baseclass for new f5 modules (#22333) 8 years ago
Lujeni d942196666 Use a dedicated directory for the mongodb modules (#22187)
* Use a dedicated directory for the mongodb modules
* Missing the RETURN documentation in mongodb_user
8 years ago
JimFicarra 2206b5e900 Fix Issue #20553 #15737 - merge with reg functionality #19443 (#20555) 8 years ago
Robin Miller 9c20182bdf [cloud] Avoid failures in RDS modyue due to throttling while waiting (#22271)
1. Check less aggressively for resources that take a long time to return
(some resources can take an hour or more).
2. Handle throttling when checking for resources, and back off quickly
when it occurs.
8 years ago
Ricardo Carrillo Cruz 43aef4e868 Do not pass filters to os_group get_group call (#22321)
As default is set to None, the get_group call doesn't find groups
on domain 'None'.
Only pass filters in case we pass domain_id value.
8 years ago
Dan Vaida 433829769e [cloud] Fix data types in ec2_elb_lb causing resource to be spuriously updated (#21906)
fixes broken idempotence caused by the idle_timeout and cross_az_load_balancing params. (#21906)
8 years ago
Brian Coca 516d61f1ae simplified if 8 years ago
Marius Gedminas 15c7288ab9 Show diff when file: state=link changes the symlink target (#22243)
* Show diff when file: state=link changes the symlink target

* Integration test for symlink target change

* Also check soft link idempotency
8 years ago
Michał Masłowski 228131d1cd lambda: Fix adding environment variables to functions previously not having any (#22313) 8 years ago
Valentyn Boginskey 2d10ad4a3e [cloud] allow ec2_lc to take user data from binary files w/ user_data_path (#20138)
* Add user_data_path parameter to ec2_lc module

* Improve user_data_path parameter documentation

- Specify mutual exclusivity
- Specify `version_added`
- Change module parameter type to `path`

* Use correct comparison for user_data result

* Include traceback on error and use with block

* Only hide user data if provided in file
8 years ago
John R Barker aa3fbb0d54 Restore extends_documentation_fragment: nxos (#22312)
* Restore extends_documentation_fragment: nxos

* Restore extends_documentation_fragment: nxos
8 years ago
Angus Williams 9be30f2eca Fixes idempotency issue when upgrading chocolatey packages (#21476) 8 years ago
Dhivyap 89cf8d83e4 dellos* modules- Documentation Update (#22306) 8 years ago
gaudenz 2772f9d9b0 cloudscale: Document SSH host key retrieval (#22299)
Document how the cloudscale_server module can be used to retrieve the
SSH host keys of the server.
8 years ago
René Moser c1730c21ce cloudstack: cs_sshkeypair: fix fingerprint not used as identifier (#22276)
* cloudstack: cs_sshkeypair: fix fingerprint not used as identifier

* remove from legacy

* fix for 2 keys, one with name and one with fingerprint
8 years ago
John R Barker 3afb67e9b2 Fix Docs build issues (#22295)
* restore network docs fragments

* Fix RST errors

* code-block formatting
8 years ago
John R Barker 0775d39a87 Add extends_documentation_fragment back (#22293) 8 years ago
John R Barker 284b3e42d1 timezone: Inline emphasis start-string without end-string (#22292)
Fixes
`docs/docsite/rst/timezone_module.rst:20: WARNING: Inline emphasis start-string without end-string.`
8 years ago
tchernomax f65661ab66 documentation: add important information about attributes parameter (#18732)
If the attributes aren't set in the right order the module always detect
an attributes change.
8 years ago
Adrian Likins 694c57de2e add python version info to --version (#22089)
* add python info to ansible --version
* Add unit tests for cli.CLI.version
8 years ago
Matt Davis d12c93ef2b fix azure_rm version checks (#22270)
* Use packaging.version.Version instead of LooseVersion for better support of prerelease tags (eg, 0.30.0 > 0.30.0rc6)
* Add explicit check/error for msrestazure package
8 years ago
Clemens Weiß 7018aa3316 Update expired keys (#21539)
If a key has expired it will not be added by this module, so check for "expired" in the list of keys.
Example output with expired key:

pub   1024D/5072E1F5 2003-02-03 [expired: 2017-02-16]
uid                  MySQL Release Engineering <mysql-build@oss.oracle.com>
8 years ago
Will Thames 274016101f ec2_vpc_subnet: cope with empty tags (#21813)
ensure_tags fails if `tags` is None rather than an empty
dict. Ensure that not passing `tags` parameter is equivalent
to passing an empty dict.

Fixes #21778
8 years ago
Will Thames 699f0e861c [cloud] Add supports_check_mode to ec2_ami_find (#22180)
ec2_ami_find is a facts module, and makes no
changes, so trivially supports check mode
8 years ago
Jean-Philippe Evrard 19b49a9224 [cloud][lxc] Prevent hostname to be set (#22246)
If the host .bashrc holds a var named HOSTNAME, the container
where the lxc_container module will attach to will inherit from
this var, potentially breaking some applications (like rabbitmqctl)
due to an incorrect $HOSTNAME reported in the container.
8 years ago
Brian Coca f53921093f respond with correct vaulting suggestion
fixes #22247
8 years ago
Viktor Fogelberg b9ed3454e4 Change comment to reflect the actual code 8 years ago
Andrea Giardini 04e990281e Add flag to Docker pull_image to know when the image is already latest (#21508)
* Add flag to Docker pull_image to know when the image is already latest

Whenever the flag pull is set to 'yes' the resource is always defined
as 'changed'. That is not true in case the image is already at the
latest version.

Related to ansible/ansible#19549

* Docker pull_image does not change status if the image is latest
8 years ago
Artem Zinenko 7decd10c76 Fixes #22136 (#22137) 8 years ago
Peter Sprygada 6c8025ce5c adds eos_system integration tests (#22214)
* adds integration test cases
* updates eos_system with minor bug fixes
8 years ago
James Cammarata a2599cab79 Fix variable precedence of INI/script vars to be in-line with docs.
This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/)
to provide us with another line of defense against precedence bugs going forward.

The precedence docs state that the INI vars have a lower precedence than group/host
vars files for inventory and playbooks, however that has not been the case since 2.0
was released. This change fixes that in one way, though not exactly as the docs say.
The rules are:

1) INI/script < inventory dir < playbook dir
2) "all" group vars < other group_vars < host_vars

So the new order will be (from the test script mentioned above):

8. pb_host_vars_file - var in playbook/host_vars/host
9. ini_host_vars_file - var in inventory/host_vars/host
10. ini_host - host var inside the ini
11. pb_group_vars_file_child - var in playbook/group_vars/child
12. ini_group_vars_file_child - var in inventory/group_vars/child
13. pb_group_vars_file_parent - var in playbook/group_vars/parent
14. ini_group_vars_file_parent - var in inventory/group_vars/parent
15. pb_group_vars_file_all - var in playbook/group_vars/all
16. ini_group_vars_file_all - var in inventory/group_vars/all
17. ini_child - child group var inside the ini
18. ini_parent - parent group var inside the ini
19. ini_all - all group var inside the ini

Fixes #21845
8 years ago
Matt Martz ff20ab7d44 Warn when jinja2 delimiters are found in a when statement (#20312)
* Warn when jinja2 delimiters are found in a when statement

* Use templar._clean_data to look for templating
8 years ago
Matt Martz 1fe67f9f43 Extend SSH Retry to put_file and fetch_file (#20187)
* Move retry logic into _ssh_retry decorator, and apply to exec_command, put_file and fetch_file

* Update tests to reflect change

* Move _ssh_retry to _run, and update tests to reflect

* piped should use exec_command instead of removed _exec_command

* Rework tests to support selectors instead of select.select
8 years ago
Peter Sprygada 911600acf9 update junos_command integration tests (#22213)
fixes integration test to check for full rpc-reply string when
converted from xml.  This is a change from 2.2 as the rpc-reply tag
is no longer stripped off
8 years ago
Robin Roth 3afc993f3a Fix git clone tag with depth=1
* Fixes #21316, add testcase based on this
* Add option `--branch NAME` to git clone command in case of branch or
tag in combination with depth=1
  * This option should work back to at least git 1.8 and thus on all
  supported distributions
* Provide better warning if depth is dropped
8 years ago
Peter Sprygada 7b2c013e5a returns xml as a display option to junos_command (#21833)
The display option xml as accidentially removed from the display
argument.  This patch adds xml back as an option.

fixes #21823
8 years ago
Peter Sprygada 8d76703a9d fix for handling commands that return no data or error (#22086)
This patch addresses a problem in nxos_facts where certain commands are
not supported or return no data, the module would raise an exception.
With this patch, the nxos_facts module will now print a warning for any
commands that return no data and not populate the facts.

fixes #22001
8 years ago
Dag Wieers 237411613d Ensure that filenames from archives are not expanded
This fixes #21795
8 years ago
Brian Coca 7966beb6c9 minor fixes to apt
fixes #22124
8 years ago
John R Barker 456b4ace7b Move cnos_backup. to correct dir (#22207) 8 years ago
Ivan Bojer 8b2ca79507 panos new module used for security policy creation (#20778)
* - new module used for security policy creation

* - added support for API key authentication
- added support for Panorama

* documentation changes

* documentation update

* minor doc changes based on review comments

* move ANSIBLE_METADATA

* changes to docs per reviewer comments
8 years ago
Ivan Bojer 563a0aea83 new module that allows for address service object creation (#20660)
* new module that allows for address service object creation

* added missing check for external library

* doc changes per review

* fixed choices string

* doc changes based on reviewer comments

* - changes per reviewer comments
8 years ago
Dave Kasberg 3c44644c08 New module: cnos_vlag (#21535)
* VLAG module and tests

* Correct the link in the description of the module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 9258b62707 New module: cnos_conditional_template (#21794)
* Initial commit of cnos_conditional_template

* fix compile error in module, change module short description, move roles to integration/roles

* fix line length

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 059a0d07a4 New module: cnos_condition_command (#21793)
* Initial commit of cnos_condition_command

* fix pep8 error of line too long

* fix pep8 tab/space issue

* Move roles to integration/roles directory and remove aliases file.

* Update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 2f126829bf Initial cnos_image commit (#21789)
* Initial cnos_image commit

* corrected required/default values in documentaiton

* fixed choices for imgtype

* removed a colon

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 70af90436a New module: cnos_rollback (#21788)
* Initial commit for cnos_rollback

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 267cc0edfc New module: cnos_backup (#21787)
* Initial commit of cnos_backup

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change import cnos statement
8 years ago
Dave Kasberg 6549c70091 New module: cnos_template (#21786)
* Initial cnos_template commit

* fix compile errs, update short description, move roles to integration/roles

* now commit the module

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg c112539538 New module: cnos_command (#21785)
* Initial commit for cnos_command

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg d96aa55d4c New module: cnos_save (#21754)
* initial comment of cnos_save

* Move roles to integration/roles directory and remove aliases file.

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 1b3e3407d8 New module: cnos_reload (#21753)
* initial commit of cnos_reload

* add parens to options

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 2e6df415b6 New module: cnos_showrun (#21752)
* initial commit of cnos_showrun

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg e5ceb3a99c Fix for cnos.py utility file for Python3.5 (#21750)
* fix in cnos.py utility file

* fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles

* corrections in readme

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 709b03d1c8 New module: cnos_facts (#21743)
* cnos_facts module commit

* fix options string

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg c4d73b6765 New module: cnos_factory (#21740)
* Commit cnos_factory

* fix options {} issue

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 4bf20fb174 New module: cnos_interface (#21613)
* initial commit

* fix tab/space issue

* fix space issue in vars/main.yml

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change module directory name to Lenovo and change import cnos statement
8 years ago
Dave Kasberg 14c2c787cb New module: cnos_portchannel (#21589)
* cnos_portchannel initial commit

* Fix line length issue in module

* fix whitespace on line 90

* correct yamllint space issue

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 3ed34032cd New module: cnos_bgp (#21587)
* cnos_bgp module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Brian Coca 30c6a77045 moved any_errors_fatal to base (#21585) 8 years ago
Pierre-Louis Bonicoli fb8aa5637a systemd: return an error when systemctl command isn't available 8 years ago