Commit graph

19098 commits

Author SHA1 Message Date
Yaacov Zamir
2fc1d6618f fix the handeling of empty auth_key (#31753) 2017-10-15 19:30:34 -04:00
Fabian von Feilitzsch
b058b8e653 Update k8s_common.py 2017-10-15 14:52:39 -04:00
Fabian von Feilitzsch
20d2a83e13 use to_str instead of json.dumps when serializing k8s object for logging 2017-10-15 14:52:39 -04:00
Tim Rupp
6e6a6ff36b Fixes an fqdn error (#31745)
the pool module was not correctly interpreting the partitions
in the monitors list vs the partition at the task level. This patch
fixes that.
2017-10-14 15:39:18 -07:00
Tim Rupp
02cd881697 Refactors bigip_selfip (#31732)
In this refactor we moved to the most recent coding standards for
both F5 and Ansible. Many bugs were fixed and some features were
also added (such as ipv6 support).
2017-10-13 23:31:32 -07:00
Tim Rupp
0610f09dab Adds various provision fixes (#31731)
* vcmp provisioning support
* documentation fixes
* fixes for python3 causing an exception
2017-10-13 22:19:46 -07:00
Tim Rupp
53445ded84 Fixes documentation related bugs (#31730)
New conventions for ansible warrant fixes to accomodate those
in bigip_partition.

This patch also includes an import fix that can raise an error when
Ansible unit tests run
2017-10-13 22:06:19 -07:00
Tim Rupp
a969a529ab Fixes various gtm pool issues (#31728)
Various formatting related fixes. Also fixed an idempotency problem
with the 'disabled' state
2017-10-13 21:51:28 -07:00
René Moser
8b8d5aaca7 cs_instance: remove CloudStackException dep (#31724)
- fixes dep
- fix docs
2017-10-14 00:09:57 +02:00
Adrian Likins
297dfb1d50 Vault secrets script client inc new 'keyring' client (#27669)
This adds a new type of vault-password script  (a 'client') that takes advantage of and enhances the 
multiple vault password support.

If a vault password script basename ends with the name '-client', consider it a vault password script client. 

A vault password script 'client' just means that the script will take a '--vault-id' command line arg.

The previous vault password script (as invoked by --vault-password-file pointing to an executable) takes
no args and returns the password on stdout. But it doesnt know anything about --vault-id or multiple vault
passwords.

The new 'protocol' of the vault password script takes a cli arg ('--vault-id') so that it can lookup that specific
vault-id and return it's password.

Since existing vault password scripts don't know the new 'protocol', a way to distinguish password scripts
that do understand the protocol was needed.  The convention now is to consider password scripts that are
named like 'something-client.py' (and executable) to be vault password client scripts.

The new client scripts get invoked with the '--vault-id' they were requested for. An example:

     ansible-playbook --vault-id my_vault_id@contrib/vault/vault-keyring-client.py some_playbook.yml

That will cause the 'contrib/vault/vault-keyring-client.py' script to be invoked as:

     contrib/vault/vault-keyring-client.py --vault-id my_vault_id

The previous vault-keyring.py password script was extended to become vault-keyring-client.py. It uses
the python 'keyring' module to request secrets from various backends. The plain 'vault-keyring.py' script
would determine which key id and keyring name to use based on values that had to be set in ansible.cfg.
So it was also limited to one keyring name.

The new vault-keyring-client.py will request the secret for the vault id provided via the '--vault-id' option.
The script can be used without config and can be used for multiple keyring ids (and keyrings).

On success, a vault password client script will print the password to stdout and exit with a return code of 0.
If the 'client' script can't find a secret for the --vault-id, the script will exit with return code of 2 and print an error to stderr.
2017-10-13 15:23:08 -04:00
Sloane Hertel
53e476ad4e [cloud] Only enforce state (running/stopped/etc) in EC2 "exact_count" when state is specified (#31648)
fix issue in ec2 module where exact count would create new instances if the instane state is stopped or terminated
2017-10-13 14:11:07 -04:00
Sloane Hertel
90b6178e61 [cloud] Don't try to deregister an instance that isn't in the load balancer (#31660) 2017-10-13 13:59:24 -04:00
Sloane Hertel
34e2019251 [cloud] Require src parameter when aws_s3 is used with mode 'put' (#31657) 2017-10-13 13:57:40 -04:00
Sloane Hertel
e26955fc9a [cloud] Document alias for aws_s3 'overwrite' option. (#31638) 2017-10-13 13:55:24 -04:00
Kenny Gillen
1234a79349 Fix gender pronouns and the odd typo (#31709) 2017-10-13 13:52:38 -04:00
Tim Rupp
ecee475a3a This patch fixes a number of outstanding bugs and code convention problems. (#31618)
* documentation was not inline with other Ansible modules
* Python 3 specific imports were missing
* monitor_type is no longer required when creating a new pool; it is now the default.
* A new monitor_type choice of "single" was added for a more intuitive way to specify "a single monitor". It uses "and_list" underneath, but provides additional checks to ensure that you are specifying only a single monitor.
* host and port arguments have been deprecated for now. Please use bigip_pool_member instead.
* 'partition' field was missing from documentation.
* A note that "python 2.7 or greater is required" has been added for those who were not aware that this applies for ALL F5 modules.
* Unit tests were fixed to support the above module
2017-10-13 09:47:49 -07:00
Ganesh Nalawade
89428a40b3 Validate parse_cli filter inputs (#31293)
* Validate parse_cli filter inputs

Fixes #30517

*  Add check to validate input is of type string
*  Add check to confirm template file exist

* Update error message for parse_cli_textfsm invalid template path

* Add input validation for parse_cli_textfsm filter
2017-10-13 21:26:24 +05:30
Katerina Koukiou
8d4c059275 cloud: ovirt: Add ovirt_disk_facts module (#30422) 2017-10-13 10:32:41 -04:00
Abhijeet Kasurde
a047fe0e4c Correct usage for shutil.rmtree (#31541)
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
2017-10-13 10:30:15 -04:00
James Molet
42deaf2c71 updating argument validation for activation keys to match subscription-manager command line, fixes #27283 (#30236) 2017-10-13 08:59:49 -04:00
Kevin Burke
434e9e1d8f Un-nest nested if statements (#19190)
Easier and clearer to write

if a and b:
    foo()

than

if a:
    if b:
        foo()
2017-10-13 08:32:59 -04:00
Clemens Weiß
2a987f59d2 Update Zabbix maintenance if it already exists to set new period, hosts etc. (#24371)
* Update Zabbix maintenance if it already exists to set new period, hosts etc.

* Whitespace
2017-10-13 13:30:15 +02:00
Lujeni
91ab88dac7 pip: Use chdir directive in the venv path (fixes #25122) (#26865) 2017-10-13 12:39:47 +02:00
rahushen
046d430a26 Fixes #31056 (#31057) 2017-10-13 10:38:44 +05:30
Ryan Brown
e0c2b6bbb4 Rename ssm_parameter_store module and ssm lookup to be prefixed with aws (#31662) 2017-10-13 13:52:10 +10:00
Tim Rupp
381b18fd80 Adds a refactored bigip_monitor_http module. (#30998)
This patch refactors the bigip_monitor_http module to use REST
instead of SOAP. It additionally adds unit tests and current F5
code conventions.

Integration tests can be found here
* https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_monitor_http.yaml
* https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_monitor_http/tasks
2017-10-12 17:02:05 -07:00
Brian Coca
12c8dd1893 config tests
also a couple of fixes to manager
2017-10-12 19:26:39 -04:00
James Mighion
50052b3d70 Adding a cli transport option for the bigip_command module. (#30391)
* Adding a cli transport option for the bigip_command module.

* Fixing keyerror when using other f5 modules. Adding version_added for new option in bigip_command.

* Removing local connection check because the F5 tasks can be delegated to any host that has the libraries for REST.

* Using the network_common load_provider.

* Adding unit test to cover cli transport and updating previous unit test to ensure cli was not called.
2017-10-12 15:07:15 -07:00
Samprita Hegde
6d16739926 [cloud] Support changeset_name parameter on CloudFormation stack create (#31436) 2017-10-12 15:44:06 -04:00
Ted Timmons
bc1e3d22c2 [cloud][docs] Document default/required 'state' in CloudFormation module (#31642)
* fix documentation to match default/required status of 'state'

* add 'choices'
2017-10-12 15:31:42 -04:00
Brian Coca
341db894f5 update delegated var fetching for new 'loop' (#31588)
* update delegated var fetching for new 'loop'

* mixed loop/terms
2017-10-12 14:57:38 -04:00
Pilou
840a57a4ed s3_sync: fix broken import (#31460) 2017-10-12 20:48:05 +02:00
Brian Coca
83dec70ad8 validate that existing dest is valid directory 2017-10-12 14:19:58 -04:00
Ondra Machacek
8dd1267e6b ovirt: Add new api facts module (#28875)
* ovirt: Add new api facts module

* Simplify boilerplate and add Python 3 import
2017-10-12 13:57:33 -04:00
Brian Coca
1bf09a7d84 warn on bad keys in group 2017-10-12 12:02:11 -04:00
Kairo Araujo
8415d2e60a new module: AIX rootvg backup image using mksysb (#30460)
* new module: AIX rootvg backup image using mksysb

This module is simple but very useful for AIX system
administrators. Easy to construct playbooks to generate
and manage rootvg backups using mksysb tool.

* added module_check, pep8, non-written convention

- implemented module_check;
- fixed some pep8 and non-written convention

* removed parameters as global variables and doc

Moved global variables parameters to inside main()
Better doc format for mentioned files
2017-10-12 11:58:43 -04:00
sethp-nr
402b095841 wait_for: treat broken connections as "unready" (#28839)
* wait_for: treat broken connections as "unready"

We have observed the following condition while waiting for hosts:

```
Traceback (most recent call last):
  File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 585, in <module>
    main()
  File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 535, in main
    s.shutdown(socket.SHUT_RDWR)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 57] Socket is not connected
```

This appears to happen while the host is still starting; we believe something is
accepting our connection but immediately resetting it. In these cases, we'd
prefer to continue waiting instead of immediately failing the play.

This patch has been applied locally for some time, and we have seen no adverse
effects.

* wait_for: fixup change

We were missing an import and a space after the `#`
2017-10-12 11:37:20 -04:00
Mihai Moldovanu
79f2cfbcf9 etcd.py module improved . added posibility to configure from playbook… (#18580)
* etcd.py module improved . added posibility to configure from playbook etcd server to query

* Update playbooks_lookups.rst

documented etcd lookups

* Update playbooks_lookups.rst

* Update playbooks_lookups.rst

* Update playbooks_lookups.rst

* Update playbooks_lookups.rst

* Update playbooks_lookups.rst

* Fixed errors reported by ansibot

* Update playbooks_lookups.rst

* Update playbooks_lookups.rst

* Copy edits.
2017-10-12 15:55:59 +01:00
Zubair Lutfullah Kakakhel
4034630625 vmware_vm_facts: Add error check for config.vm (#31629)
Add a simple check to see if vm.config exists before looking for
vm.config.hardware
2017-10-12 10:32:06 -04:00
Brian Coca
b68fe2cd23 highlight dynamic parts of error msg 2017-10-12 10:00:06 -04:00
Ondra Machacek
f5c0e2895b ovirt_vms: Wait for VM disks when adding VM (#31468)
Fixes: https://github.com/ansible/ansible/issues/30515
2017-10-12 08:56:13 -04:00
Ondra Machacek
e5c0958dbb ovirt_templates: Fix exlusive parameter (#31470) 2017-10-12 08:49:38 -04:00
Ondra Machacek
23c47a65c1 ovirt_networks: Add label to network (#31517) 2017-10-12 08:49:30 -04:00
Ondra Machacek
c71394a13a ovirt_clusters: add alias performance_preset for memory_policy (#31523) 2017-10-12 08:49:22 -04:00
Anil Kumar Muraleedharan
de53e280f1 Adding enos/__init__.py (#31580)
##### SUMMARY
Creating the modules for enos from Lenovo.

##### ISSUE TYPE
- New Module Pull Request

##### COMPONENT NAME
<!--- Name of the module/plugin/module/task -->
lib/ansible/modules/network/enos/__init__.py

##### ANSIBLE VERSION
ansible 2.5.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location =
/usr/local/lib/python2.7/dist-packages/ansible-2.5.0-py2.7.egg/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]

##### ADDITIONAL INFORMATION

This is an effort to create modules for enos based switches from Lenovo.
2017-10-12 13:34:36 +01:00
Anil Kumar Muraleedharan
1c85ff0e68 Update base.yml to add enos from lenovo (#31565)
* Update base.yml to add enos from lenovo

* Update base.yml
2017-10-12 13:34:08 +01:00
Anil Kumar Muraleedharan
295a0e9225 Create document fragment for enos modules (#31512) 2017-10-12 13:33:04 +01:00
Anil Kumar Muraleedharan
ead00e9cae create terminal plugin for enos modules (#31510) 2017-10-12 13:32:27 +01:00
Anil Kumar Muraleedharan
fa9421ef98 create cliconf plugin for enos - enos.py (#31509) 2017-10-12 13:31:57 +01:00
Anil Kumar Muraleedharan
34cc563727 Create action file enos.py (#31508)
* Create action file enos_facts.py

* Update and rename enos_facts.py to enos.py

* Taking chances on Dealing with Unstable issues

* Removing blank space/ white line
2017-10-12 13:31:23 +01:00
Trishna Guha
c002b47a79 fix nxos_vlan unexpected deprecation warning (#31624)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-12 12:00:35 +05:30
Abhijeet Kasurde
9d811a34c4 pep8 fixes for vmware modules (#31537)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-12 07:50:05 +02:00
René Moser
540d53327d cs_instance_facts: fix pep8 (#31606) 2017-10-12 14:00:14 +10:00
Prasad Katti
03ec3cd572 [aws_s3] different fail msg depending on whether version is specified (#31598) 2017-10-12 12:12:55 +10:00
James Cammarata
3ef4f7e847 Fix static determination for include_tasks
An incorrect removal of a conditional resulted in include_tasks falling
through to the old static detection mechanism incorrectly. This restores
the previous conditional check.

Fixes #31593
2017-10-11 17:30:45 -07:00
Jacob Floyd
0371d0deda Fix Inventory Plugin Loading (#31605)
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting.
Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory,
as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
2017-10-11 17:28:11 -07:00
Colin Nolan
30822e5f91 Corrects examples in the find module. (#31522) 2017-10-12 09:43:18 +10:00
Toshio Kuratomi
f38b8d9997 Remove boundary_meter module as the hosted service it configured has been removed. (#31506)
References #29387
2017-10-12 09:12:37 +10:00
Ondra Machacek
0bce693046 ovirt_templates: Add seal parameter (#31482) 2017-10-12 09:04:26 +10:00
René Moser
e872763877 cs_portforward: remove CloudStackException dep (#31610)
- fixes pep8
- fixes doc
2017-10-12 00:25:01 +02:00
Jordan Borean
7fce636c2b windows: removed #Requires from PS pipelines as it causes STDERR false positives (#31558) 2017-10-11 14:16:58 -07:00
Stefan Schatz
dc48d6879d zabbix_host: added zabbix host property (description) (#25969)
* zabbix_host: added zabbix host property (description)

* zabbix_host: fixed error E309 version_added for new option (description) should be 2.4

* zabbix_host: deleted unwanted else for update description

* lib/ansible/modules/monitoring/zabbix_host.py: increased version_added to 2.5 for option description

* lib/ansible/modules/monitoring/zabbix_host.py: allow to change the description

* lib/ansible/modules/monitoring/zabbix_host.py: added new lines back to fix pep8 issues
2017-10-11 22:26:43 +02:00
René Moser
c1121dd5fb cs_securitygroup_rule: remove CloudStackException dependency (#31603)
- fixes pep8
- fixes docs
2017-10-11 22:23:00 +02:00
René Moser
af6e89fbc8 cs_securitygroup: remove CloudStackException dep (#31597)
- fixes pep8
- fixes docs
2017-10-11 20:58:08 +02:00
Rene Moser
4dc3874176 cs_snapshot_policy: fix VM not found in non-default zone 2017-10-11 18:35:54 +02:00
Rene Moser
d6e1f02990 cs_snapshot_policy: remove CloudStackException dependency 2017-10-11 18:35:54 +02:00
voipmeister
865a38bb8d Changed src_intf and dst_intf to list type (#31479) 2017-10-11 14:21:02 +01:00
Philippe Dellaert
9580a6569e Fix #21112 : Adding support for configuring a CD-rom iso image (#28155)
* Initial CD-ROM support

* create cdrom bugfix

* Improving CDROM change detection and fixing template creation bug
Running MarkAsTemplate on an existing template will fail with an error

* Better change detection for guest ID
Should only mark a change in case it actually changes

* Adding integration tests

* Pep8 compliance fixes

* Adding CDROM support, including iso, client and none types

* Updating added release version for CDROM option
2017-10-11 14:29:13 +02:00
sookido
748adf7a8e New module: Add monitoring/zabbix_template module. (#25566)
* Implements zabbix_template module.

* Fixes formatting

* Fixes formatting2

* Add templates_clear

* fix some bug

* Fixes formatting

* update ansible 2.5
2017-10-11 12:59:30 +02:00
rahushen
025386c56b Fix nxos_banner removal idempotence issue in N1 images (#31259)
* Fix nxos_banner removal idempotence issue in N1 images

* handle pep8 error
2017-10-11 16:26:17 +05:30
Ganesh Nalawade
88da95bb77 Fix rollback in junos_config (#31424)
* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
2017-10-11 10:25:56 +05:30
Brian Coca
2ed46e04f4 more updates to plugin/config generation (#30787)
* fixed module generation

added missing lookup page
point to plugins when plugins
made modules singular
add display for verbose an debug messages
nicer templating, changed generation order for ref
corrected links
moved most of lookup docs to plugin section

* Copy edits
* Fixed typos
* Clarified wording
2017-10-11 00:15:25 -04:00
Brian Coca
3886f80e44 fix paths to actually be config file relative (#31533)
* fix paths to actually be config file relative

also allow to unfrack paths for 'not cwd'
only use -i 'localhost,' for adhoc in pull
2017-10-10 19:17:17 -07:00
Matt Davis
a4ceb4c35f improve become/runas error messaging on bogus/missing username (#31551) 2017-10-10 16:53:21 -07:00
Brian Coca
d84df2405d move from with_<lookup>: to loop:
- old functionality is still available direct lookup use, the following are equivalent

  with_nested: [[1,2,3], ['a','b','c']]

  loop: "{{lookup('nested', [1,2,3], ['a','b','c'])}}"

- avoid squashing with 'loop:'
- fixed test to use new intenal attributes
- removed most of 'lookup docs' as these now reside in the plugins
2017-10-10 15:43:49 -04:00
Martin Krizek
24c360287e yum: fix crashes installing from file/url 2017-10-10 11:39:47 -07:00
Sloane Hertel
89d09bae21 [cloud] Fix ec2_group when security group lacks a VPC (#31526) 2017-10-10 13:15:11 -04:00
Sloane Hertel
6fee6f71f7 aws_s3: fix upload_file's ExtraArgs - fixes #31232 (#31487)
* Module option metadata are extra arguments rather than S3 object metadata: update ExtraArgs variable.

* Remove hyphens from ExtraArgs to maintain backwards compatibility

* Map lowercase extra args to CamelCase

* Maintain backwards compatibility by guessing at content type rather than always defaulting to binary/octet-stream.

* Fix ExtraArgs for non-hyphenated options

* Simplify logic
2017-10-10 13:12:58 -04:00
Sam Doran
2610b521bc Remove sysctl entries when state=absent (#31486)
* Remove sysctl entry when state=absent
* Cleanup sysctl integration test syntax
* Correct grammar on error message
* Add sysctl integration test for state=absent
2017-10-10 09:01:33 -07:00
arnonki
a48532de5f Use default values for object returned from aws to prevent TypeError (#31455)
* Use default values for object returned from aws to prevent TypeError
NoneType exception fixes #31454
2017-10-10 10:08:06 -04:00
Brian Coca
9a8055a8e5 add note on how to avoid service start in apt 2017-10-10 09:24:09 -04:00
Lukas Bednar
5ccc1072ea [rpm_key] Fix to import first key on the system (#31514)
* [rpm_key] Fix to import first key on the system

Fixes: #31483

* [rpm_key] removed unsafe_shell and "throwaway" underscore

* [rpm_key] adding test to add the first key on system
2017-10-10 13:31:20 +02:00
Mike Klebolt
ada6159ece first path check missing forward slash between dcpath and datacenter (#31481)
* fixed folder path logic

* fixed folder path logic

* fixed folder path logic
2017-10-10 03:14:12 -04:00
Artem Zinenko
2b63ae61f2 minor updates + tests to win_firewall_rule as per jborean93 review (#29148)
* Added warning for 'force' option

* Changed 'profiles' type to list

* Changed 'interfacetypes' type to list

* Added deprecation warning and fixed doc

* updated force parameter
2017-10-10 16:23:08 +10:00
Toshio Kuratomi
4cad720b22 Remove wildcard imports from cloudstack modules.
Also add boilerplate.
2017-10-09 21:41:02 -07:00
Toshio Kuratomi
2f8831c787 Fix get_exception and wildcard imports for nxos modules 2017-10-09 21:41:02 -07:00
Toshio Kuratomi
75eed6a51a Port arg specs from type='str' to type='path' 2017-10-09 21:15:56 -07:00
Brian Coca
dc69af50dc clarified inventory_dir changes for 2.4 (#31484)
* clarified inventory_dir changes for 2.4

added example on how to restore (mostly) old behaviour for add_hosts

fixes #30901
2017-10-09 20:56:32 -07:00
Brian Coca
74107ff7cc better message for unsupported include/imports
adhoc cannot currently execute these actions
2017-10-09 20:49:11 -07:00
François Scala
aade5234a9 Fix urlparse import for Python3 (#31240)
* Fix urlparse import for Python3 in

* contrib/inventory/consul_io.py
* contrib/inventory/rudder.py
* contrib/inventory/windows_azure.py
* lib/ansible/module_utils/known_hosts.py
* lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
* lib/ansible/modules/cloud/docker/_docker.py
* lib/ansible/modules/cloud/ovirt/ovirt_disk.py
* lib/ansible/plugins/action/ce_template.py
2017-10-09 20:18:09 -07:00
Jordan Borean
82fa922491 win_become: Added support to become a service user (#30407)
* win_become: Added support to become a service user

* fixes for linting

* changes to get local and network service working

* fixed linting issues again

* pleasing pepe
2017-10-09 17:58:29 -07:00
Brian Coca
4e22677e7d revert namespaced facts changes to package/service
fixes #31485
2017-10-09 16:31:58 -07:00
Prasad Katti
0c64bbcd6f Document return values for aws_s3 (#31158)
* Document return values for aws_s3
2017-10-10 09:26:42 +10:00
Bill Wang
91a36faddb New module: Add module for Amazon Systems Manager Parameter Store (cloud/amazon/ssm_parameter_store) (#23460)
- new module: ssm_parameter_store
- new lookup: ssm

* lookup module ssm - adjust error message

* Pacify pylint erroring on botocore not found

* adjust to version 2.5
2017-10-10 09:04:40 +10:00
Jordan Borean
f2bc89a880 win_copy: added decrypt option (#31291) 2017-10-10 08:21:25 +10:00
Rob
1353aae456 [cloud] Fix #31271 - cast all tag values as strings (#31272)
* Fix #31271 - cast all tag values as strings

* Replace `str` with `to_native`
2017-10-09 17:10:54 -04:00
Ryan Fitzpatrick
2ba5998c94 [cloud] Ensure absence of public_dns_name doesn't halt ec2 module (#31476) 2017-10-09 17:04:25 -04:00
Tim Rupp
75c5d0fedc Adds the bigip_remote_syslog module
This patchs add a remote-syslog module that can be used by people
to manage their (basic, not HSL) syslog configuration
2017-10-09 13:21:16 -07:00
Vyronas Tsingaras
5bf9f271b3 win_copy: Add missing check_mode fix (#31469)
* Add missing check_mode fix

* Refactor conditional to use the one embedded in Remove-Item
2017-10-09 20:37:33 +02:00
Pilou
1c9bffe248 pip module: fix TypeError (#31395)
* pip: add test: an error occurs when pip not found
* pip: fix TypeError exception when pip executable isn't found
2017-10-09 10:01:21 -07:00
Toshio Kuratomi
5e9384300d Add boilerplate and remove wildcard imports for openstack modules (#31461)
* Add boilerplate and remove wildcard imports for openstack modules
* Remove openstack files that are now pep8 compliant from the legacy list
2017-10-09 09:56:26 -07:00
James Cammarata
e609618274 Template role_name when statically including via include_role (#31463)
Also trims out code which was incorrectly setting is_static=True for
include_role.

Fixes #30700
2017-10-09 11:39:29 -05:00
Brian Coca
7d49b27218 added toggle to control vars plugin behviour
this should allow user to control how they want the playbook dirs inspected
for additional vars, default now reverts to 2.3 behaviour (top).
corrected paths order
minor doc reword
2017-10-09 12:31:15 -04:00
Brian Coca
adcd185273 version is string and should be 2.9 2017-10-09 12:15:56 -04:00
Sebastien Boyron
6b34dc788a [feat] module apt: add warning on deprecated states 2017-10-09 12:14:36 -04:00
Ryan Brown
958ad7726a Properly handle user selection of None as vars_files (#31313)
* Properly handle user selection of `None` as vars_files

In a playbook, if a user has a playbook like:

```
- hosts: localhost
  connection: local
  vars_files:
  tasks:
  - ....
```

Then `vars_files` will be none, and cause a `TypeError` in vars-manager when it
tries to iterate over them. To avoid this, I changed the getter to either send
back the vars files from the user, or an empty list when the user passed
`None`.

* Only replace None with an empty list, not all falsey values

* Catch error when vars_files isn't iterable

* Move whole `for` loop into try/except and catch TypeError

* Line length
2017-10-09 11:27:50 -04:00
Sofiane Medjkoune
ef72eda172 Adding doc for the description argument of lxd_profile module 2017-10-09 11:11:58 -04:00
Toshio Kuratomi
9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
2017-10-09 07:38:41 -07:00
Matthew Martin
63e59a9825 maven_artifact: Add classifier to default dest (#24518) 2017-10-09 07:56:33 -06:00
Pilou
870974e0be ec2_vpc_route_table: fix broken import (#31459) 2017-10-09 20:20:31 +10:00
Martin Krizek
13631ececa yum: check if env groups are installed (#31182) 2017-10-09 06:01:34 -04:00
Andreas Olsson
d025aca66f Add optional port parameter to nsupdate module (#31446)
An example of when it's useful to be able to specify a custom port
number is when one is using an (ssh) tunnel to update a hidden master.
2017-10-09 05:51:17 -04:00
Pilou
0be8ac6797 ec2_vpc_igw: fix broken import (#31458) 2017-10-09 15:36:12 +10:00
Dag Wieers
ae5d8e5ebb modprobe: PEP8 compliancy and doc fixes (#31255)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
- Make module a bit more consistent with existing practices
2017-10-08 09:21:58 -04:00
Toshio Kuratomi
4804e99b44 Change ping docs to refer to win_ping (#31444) 2017-10-08 08:33:51 +01:00
Brian Coca
a9942353fe revert ocalhost getting 'all' vars (#31425)
back to previous implicit localhost behaviour

fixes #31420
2017-10-06 19:11:00 -04:00
Brian Coca
e4c61ea9a1 fix 'return false' from parse
this was abandoned early on the manger side  but seems like we left behind on plugin side.
more flexible extensions with yaml plugin
validate data correctly for yaml/constructed
fixed issue with only adding one child to keyed, the group only got the host that forced it's creation

fixes #31382
fixes #31365
2017-10-06 13:25:06 -04:00
Brian Coca
f2ade09dce use configured ansible_shell_executable
refine args/shell/executable hanlding
2017-10-06 08:56:21 -04:00
rahushen
48f4643a66 nxos_snmp_* fixes : Fixes #30997, #30999 (#31000)
* add codeblock to handle 5K platform for nxos_snmp_host

* fix get_snmp_traps for 5K platform

* Make shippable happy
2017-10-06 18:21:59 +05:30
rahushen
0218fdcd80 Fixes #30846 (#30862) 2017-10-06 17:10:03 +05:30
Eike Frost
9a1b495894 Fix idempotency if zabbix_host when visible_hostname is not set (#31388) 2017-10-06 03:28:17 -04:00
Jordan Borean
c4b51009f0 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors
2017-10-06 15:23:37 +10:00
Prasad Katti
14b9a6b350 Add example showing how to add host to multiple groups (#31152)
* Add example of how to add host to multiple groups

* use 'name' task keyword for comments
2017-10-06 01:02:53 -04:00
Kaz Cheng
044dd699c2 Addition of TCP protocol to ELB target group (#31228)
* Addition of TCP protocol to ELB target group as target groups support HTTP/S and TCP now

* Fixup stickiness type so that it checks if the current_tg has the stickiness_type key in the dict, as TCP ones do not
2017-10-06 00:27:30 -04:00
Jean-Frédéric
d332367018 Allow an Elastic IP to be re-associated in ec2_eip (#27389)
Trying to associate an already-associated ElasticIP was failing.

This is however supported by the `boto` method that is used
under the hood, `associate_address`:

To quote `boto` documentation:
```
This option to allow an Elastic IP address that is already
associated with another networkinterface or instance to be
re-associated with the specified instance or interface.
```

This defaults to False, both per backwards-compatibility
and to mirror the boto default value.

Fixes #27385
2017-10-06 09:51:36 +10:00
Brian Coca
a6e27a903a better chown errors 2017-10-05 18:40:41 -04:00
Strahinja Kustudic
7417282d37 Do not run systemctl daemon-reload in check mode 2017-10-05 18:40:02 -04:00
Michael Vermaes
fad3a4dc83 Fix typo in vault decrypt error message (#31335) 2017-10-05 18:09:22 -04:00
Dusan Matejka
336723d293 Allow zabbix_host to change proxy to no proxy, fixes #24735 (#29123) 2017-10-05 17:51:37 -04:00
Matt Davis
13e89b17cc remove explicit provider reg from azure_rm (#31369)
* now that it's handled automatically as of msrest > 0.4.9
2017-10-05 12:48:13 -07:00
Sloane Hertel
efe3c94b1b [cloud] ec2.py: warn that removing a public ipv4 address is not permitted - fixes #30679 (#30952)
* Add a warning to ec2.py if assign_public_ip is different from the matching instance(s) since it isn't a modifiable attribute.

* remove comments
2017-10-05 15:32:52 -04:00
Bradford Dabbs
f219d6b96d [cloud] EC2_ASG Set desired capacity to min_size if no instances exist (#30987)
* Set desired capacity to min_size if no instances exist

* Improve readability of if/then clause

* Only update null desired_capacity to min_size on initial create

Any future updates to the ASG will be able to reference the existing
capacity.
2017-10-05 14:56:46 -04:00
John R Barker
e859d0da9c data should be redacted in docker_secret (#31366) 2017-10-05 14:07:23 -04:00
Sam Doran
e7902d888c Make ansible_selinux facts a consistent type (#31065)
* Make ansible_selinux facts a consistent type

Rather than returning a bool if the Python library is missing, return a dict with one key containing a message explaining there is no way to tell the status of SELinux on the system becasue the Python library is not present.

* Fix unit test
2017-10-05 09:19:08 -04:00
Eduardo Suarez-Santana
4337b7a777 Fix rpm_key absent. (#31045)
When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
2017-10-05 14:45:14 +02:00
Ganesh Nalawade
2e4dcc9dda Fix nxos terminal regex to parse xml response (#31283)
Fixes #26130

Modify nxos terminal regex to parse a xml response.
2017-10-05 15:32:43 +05:30
rahushen
266c2f5831 fixes #31080 (#31081) 2017-10-05 14:33:59 +05:30
Trishna Guha
9f72b32c5d nxos_config intended_config docfix (#31337)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-05 14:25:50 +05:30
Brian Coca
bed7cd8b11 restore connection options from cli
fixes #30720
2017-10-04 23:14:26 -07:00
Toshio Kuratomi
52497920fa We want the ini and env vars to both override in the same order
There's an ssh version and a generic version.  We want the ssh version
to override the generic version in both cases.
2017-10-04 13:06:56 -07:00
Brian Coca
6459bacb6b Revert "fix git wrapper (#29069)"
This reverts commit f8005d2737.

fix needs to be rethought as it applies to only newer git versions
and use of env shell breaks with non 'bourne compatible' shells
2017-10-04 12:55:57 -07:00
Sloane Hertel
aa658c64ec Allow any_errors_fatal to be set in playbook - fixes #30691 (#30839)
* Allow any_errors_fatal to be set in playbook.
* Default to the config file value for any_errors_fatal only if it isn't already provided.
* add _get_attr method
2017-10-04 12:52:27 -07:00
Tim Rupp
f3f0ba87ce Corrects Copyrights and License headers (#31324)
The format has changed for these in the dev_guide. This corrects
them for the F5 modules
2017-10-04 20:16:17 +01:00
Brian Coca
8aa33419c9 check type to avoid typeerror tb
fixes #31290 by giving more meaningful message
2017-10-04 15:14:10 -04:00
Martin Krizek
115b4fdc9b yum: fix name parsing out of envra (#31247) 2017-10-04 20:48:00 +02:00
Tim Rupp
3717ff64cf Adds the bigip_monitor_https module (#31205)
This patch adds the https_monitor module which allows people
to create and manage HTTPS monitors.
2017-10-04 17:18:59 +01:00
Brian Coca
dbae704d3c correctd inventory_file to return full path
fixes #31294
2017-10-04 11:53:25 -04:00
Brian Coca
f00d47fac0 dont follow symlinks for inventories
now symlink dir is checked for locality of group/host_vars

fixes #31195
2017-10-04 11:04:32 -04:00
Brian Coca
852d457549 turn all inventory cache 'off by default' 2017-10-04 10:51:39 -04:00
Brian Coca
46621a3ddd updated constructed docs to clarify use of ext 2017-10-04 08:44:45 -04:00
Katerina Koukiou
54ca841611 cloud:ovirt:ovirt_storage_domains.py: Don't require extra params when state==absent (#30337)
Make sure that example in docs is usable:

 # Remove storage domain
 - ovirt_storage_domains:
     state: absent
     name: mystorage_domain
    format: true

Without this PR data_center and host parameters where required when we wanted to
remove some storage domain.

Also fixes a regression when trying to remove a detached
storage domain.
2017-10-04 05:27:25 -04:00
maorlipchuk
65749bd432 Return None for DC in case of detached storage domain (#29175)
The following patch fixes a regression when trying to remove a detached
storage domain.
As part of the remove process the ovirt_storage_domains module first
tries to move the domain to maintenance and detach it.
In case of removing a detached storage domain with no DC attached to it
The maintenace process will fail with 404 (not exists) exception when
trying to fetch the DC using empty Guid.
The fix proposes a solution to return None value in case of a detached
storage domain.
2017-10-04 04:43:42 -04:00
Ondra Machacek
5e3177e29d ovirt_clusters: Fix fencing and kuma comparision (#30302) 2017-10-04 04:43:35 -04:00
Ondra Machacek
70f221d57a ovirt_vms: Raise proper error when template isn't found (#30306) 2017-10-04 04:43:28 -04:00
Katerina Koukiou
04f0b5adca cloud: ovirt_datacenter.py: Add 'force' parameter for removing dc (#30352) 2017-10-04 04:43:20 -04:00
Ondra Machacek
47e9353a31 ovirt_hosts: print error when host for iscsi login not found (#30928) 2017-10-04 04:33:45 -04:00
Ondra Machacek
3978baf32f ovirt_vms: Support to specify VM id (#31253)
Fixes: https://github.com/ansible/ansible/issues/30873
2017-10-04 04:32:49 -04:00
Stephen
9c6ad3d076 Add update_only parameter for yum module (#22206)
* Add update_only parameter for yum module

When using latest, `update_only: yes` will ensure that only existing
packages are updated and no additional packages are installed.

* Update yum.py

Update version added for `update_only` parameter to 2.5

* add unit tests for update_only flag in yum module
2017-10-04 10:25:13 +02:00
rahushen
1378861fe7 Fixes nxos_igmp_interface idempotence issue for N1 images (#31220) 2017-10-04 12:53:44 +05:30
Sam Doran
00df1fda10 Correctly write SELinux config file (#31251)
* Add new lines to end of config file lines

* Properly write out selinux config file

Change module behavior to not always report a change but warn if a reboot is needed and return reboot_required.

Improve the output messages.

Add strip parameter to get_file_lines utility to help with parsing the selinux config file.

* Add return documentation

* Add integration tests for selinux module

* Use consistent capitalization for SELinux

* Use atomic_move in selinux module

* Don't copy the config file initially

There's no need to make a copy just for reading.

* Put message after set_config_policy in case the change fails

* Add aliases to selinux tests
2017-10-03 23:38:58 -04:00
Brian Coca
aa4b3f14c5 corrected version added 2017-10-03 21:50:13 -04:00
Jordan Borean
e61c2799ff win_become: move error handling to Ansible outside of shell (#31227)
* win_become: move error handling to Ansible outside of shell

* trimmed the output so double newlines don't get set

* added test for non-zero exit code

* missed issue URL on test

* changed exit to SetShouldExit
2017-10-03 21:42:27 -04:00
Daniel Roberts
34878926ca fix monit version check
it was erroneously checking > 3.18 instead of > 5.18

Fixes #30614
2017-10-03 15:18:29 -07:00
Brian Coca
9c6d7ddeb5 report extra info in verbose and if needed 2017-10-03 16:48:21 -04:00
Dustin Spicuzza
8f62be7b7c win_reg_stat actually sets properties to be a dictionary, not a list (#31252) 2017-10-04 07:19:32 +11:00
Jordan Borean
bba941cd5b win_copy: fix for copying encrypted file without pass (#31084)
* win_copy: fix for copying encrypted file without pass

* fix pep8 issue

* reduced the diff and fixed some minor issues
2017-10-03 12:51:57 -07:00
Adrian Likins
65393e4747 Fix ansible_distribution on Ubuntu 10.04 (#31108)
The /etc/os-release based distro detection doesn't
seem to work for Ubuntu 10.04 (no /etc/os-release?).

So it was testing the next case which was /etc/lsb-release to
see if it is 'Mandriva'. Since the check for existence of
(/etc/lsb-release, Mandrive) was the first non-empty dist
file match, 'ansible_distribution' was being set to 'Mandriva'
expecting to be corrected by the data from the dist file content.

But since the dist file parsing for Mandriva didn't match for
Ubuntu 10.04 /etc/lsb-release _and_ there is no Debian specific
lsb-release check, 'ansible_distribution' stayed at 'Mandriva'
and the dist file checking loop keeps going and eventually off
the end of the list before finding a better match.

Adding a debian/ubuntu specific check for /etc/lsb-release after
the debian os-release sets the info correctly and stops further
checking of dist files.

Fixes #30693
2017-10-03 15:32:33 -04:00
Michael Scherer
6caac2743a Add support for LVM to filesystem module (#21620)
And since LVM2_member is not a very userfiendly name, add
a mechanism for more user friendly names.
2017-10-03 15:26:25 -04:00
Brian Coca
2d70dc7f21 make pipelining actually backwards compatible
restore ssh specific setting the global, in the future these will be separate.
2017-10-03 14:35:05 -04:00
Adrian Likins
235d139e5d Fixes for facts distribution.py (#31110)
'distribution' facts were being set after checking
the existence of the dist file, and then being set
again with more detail after they were succesfully parsed.

But if the dist file was not succesfully parsed and
matched the required names, the loop continues
without resetting the earlier set facts. This is
how 'Mandriva' would end up being the 'distribution'
file for unrelated cases (it would find /etc/lsb-release,
set distro to 'Mandriva', then fail to parse/match and
continue the loop. If no other checks worked, 'Mandriva'
would stick).

* parse_dist_file_NA should check 'name' not distro for NA

parse_distribution_file_NA was checking the incoming
'distribution' fact to be 'NA', but the fact itself can
be specific at that point ('KDE Neon', for ex) but the
check is really if the 'name' it was passed is NA.

* for matches on OS_RELEASE_ALIAS (ie, 'Archlinux') do
not continue if the dist file content doesn't match. Previously
it had to because of the 'Mandriva' bug mentioned above.

This is a more general fix for #30693 than #30723

Fixes  #30693
Related to #30600
2017-10-03 14:01:40 -04:00
Adrian Likins
dae0ad1ce6 Fix flush_cache on redis cache
Fix a del on non existent self.cache.

Fixes #31148
2017-10-03 12:54:26 -04:00
Adrian Likins
278ff19bea Handle vault decrypt --output=- (#31066)
In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
2017-10-03 12:02:16 -04:00
Brian Coca
cf3414d7d7 set _hosts on access if None (#31111)
set _hosts on access if None to bpyass srlz10n issues to fix #30903
2017-10-03 08:59:05 -07:00
Brian Coca
101377768b remove unused ssh pipelining setters
fixes #31125
2017-10-03 09:22:01 -04:00
David Moreau-Simard
9b693235f0 Fix backwards compatibility of constants.get_config
get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.
2017-10-03 09:19:04 -04:00
rahushen
a12a05c219 Fixes #30769 - nxos_vtp_version errors out on N1 images. (#30770)
* Fixes #30769

* add the same fix for 2 more vtp modules
2017-10-03 17:24:14 +05:30
Dag Wieers
17fbeeb2f0 rhn_channel: PEP8 compliancy and doc fixes (#30912)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-03 09:50:44 +02:00
Dag Wieers
4a358b5396 foreman: PEP8 compliancy and doc fixes (#30910)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-03 09:50:27 +02:00
Abhishek Shukla
d0c003ab0f BugFix code breaks, if include_vars dir is file instead of directory (#31157) 2017-10-03 00:00:51 -04:00
Carsten Clasohm
89799bbb98 add https_proxy (#31062)
* add https_proxy

* fix indentation

* use http.nonProxyHosts
2017-10-03 00:12:50 +02:00
Yeuk Hon Wong
ef25367353 Fixes #30073: Remove 'Consider hg command' warning. (#31159)
This PR addresses two issues:

1. The hg module was added to command module's check_command list,
so if someone runs hg directly from the command module, the command
module would warn the user "Consider using hg module rather than running hg".

We address this by removing hg from the list.

2. We added a new note to tell users push feature will be addressed
in issue #31156.
2017-10-02 23:33:13 +02:00
Rob
2804a2663a [cloud] Only get rules if listener in elb_application_lb been identified in compare_rules (#30604)
* Only get rules if listener has been identified in compare_rules

* Always cast the listener port to an integer.
2017-10-02 16:57:41 -04:00
Felipe Garcia Bulsoni
46fd083138 LogicalInterconnectGroupFactsModule for HPE OneView (#28847)
* Added support to retrieving LIG resources in HPE OneView

* Fixing copyright header according to review

* Swapping out config for full credentials in parameter for documentation
2017-10-02 16:35:27 -04:00
Jordan Borean
12a4dca447 win_dotnet_ngen: fix after broken in 2.4 (#31076)
* win_dotnet_ngen: fix after broken in 2.4

* added description to return values
2017-10-03 07:34:00 +11:00
Felipe Garcia Bulsoni
7d74c126a9 EnclosureFactsModule for HPE OneView (#28852)
* Added support to retrieving Enclosures in HPE OneView

- Added unit tests

* Updated version_added to 2.5

* Changing return type of enclosure_script to string

* Fixing copyright header according to review

* Replaced config for credentials in parameters for documentation
2017-10-02 16:32:36 -04:00
Jordan Borean
67fd98da09 win_msg: added doc about msg limit and included an explicit check for better error handling (#31078) 2017-10-03 07:32:30 +11:00
Pilou
44f5b2bd25 ansible_tower: fix broken import, reuse tower_argument_spec and documentation fragment (#29115)
* module_utils/ansible_tower: fix broken import

* tower_*: use tower_argument_spec & doc fragment

* tower doc fragment: Ansible requires Python 2.6+

* tower_job_wait: fix broken import (Py3 compat)
2017-10-02 16:21:24 -04:00
Sebastien Boyron
af3e8950d6 [fix] issue #30516 : take care about autoremove in upgrade function 2017-10-02 16:19:55 -04:00
Dag Wieers
1241d0a3f4 pip: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-02 16:18:56 -04:00
Dave Grochowski
a7229df469 [cloud] Fix handling of encrypt option in aws_s3 module (#30822) 2017-10-02 13:18:47 -04:00
Abhijeet Kasurde
02b5c7a8a3 New module - vmware_guest_powerstate
Fix adds a new module 'vmware_guest_powerstate' to manage
power states of virtual machine.

Fixes: #30371

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-02 18:57:44 +02:00
James Tanner
eca4897a08 Include the top level folder for esxi in the break condition 2017-10-02 12:31:51 -04:00
James Tanner
8c368b25cd Implement second change from #30826 2017-10-02 12:31:51 -04:00
James Tanner
1c1c89927d Get the moid in a more failsafe manner 2017-10-02 12:31:51 -04:00
Andrew Lihonosov
4c0889e8fc docker_service build command respects the "pull: no" parameter
Fixes #30296.
2017-10-02 11:11:48 -04:00
Artem Bolshakov
fb4d065654 Fix running docker container with not readable logging driver. Fixes #27278 2017-10-02 11:00:16 -04:00
Brian Coca
44d2f21e02 corrected yaml extensions ini setting 2017-10-02 10:02:47 -04:00
Prasad Katti
3b1376ad09 [cloud] add boto3 requirement to cloudformation module docs (#31135) 2017-10-02 09:25:12 -04:00
Julien Palard
5802ec04bf yaml inventory: Better error reporting on typo. fixes (#31118) 2017-10-02 09:22:21 -04:00
n0trax
ba99e44b42 Catch AttributeError if regex is not found. (#30990) 2017-10-01 07:19:34 -04:00
maorlipchuk
0f39536c5c Avoid calling maintenace or detach on destroy storage domain. (#28962)
As part of the absent state of ovirt_storage_domains module,
the pre_remove method tries to move the stoage domain to
maintenance and detach it.

In case a destroy of a storage domain is being called there is no need
for those operations since the destroy might be merely a DB operation.
2017-10-01 05:13:19 -04:00
Prasad Katti
4b62e555df Added quotes to start and end samples 2017-09-30 19:57:02 +02:00
Dag Wieers
3749ba6ee1 Small changes. 2017-09-30 19:57:02 +02:00
Prasad Katti
b7fbc57227 Document return values for command module 2017-09-30 19:57:02 +02:00
Abhijeet Kasurde
afa3206205 Make vm_username and vm_password required params
vm_username and vm_password are required parameters in
vmware_vm_shell. Fix adds changes to documentation as well.

Fixes: #28266

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-30 14:50:44 +02:00
Brian Coca
ac9278ff0f remove action plugin only fields from 'file' calls (#31047)
* remove action plugin only fields from 'file' calls

fixes #30556

* Add a test for #30556
2017-09-29 17:13:32 -07:00
Damian Zaremba
92f777e815 module_utils.urls - Encode the proxy connect as binary (#30811)
* module_utils.urls - Encode the proxy connect as binary

Under Python3 the sendall method expects binary not a string.

Prior to this change the below exception was being thrown;
Traceback (most recent call last):
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 1044, in fetch_url
    client_key=client_key, cookies=cookies)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 951, in open_url
    r = urllib_request.urlopen(*urlopen_args)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 524, in open
    req = meth(req)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 729, in http_request
    s.sendall((self.CONNECT_COMMAND % (self.hostname, self.port)).decode())
AttributeError: 'str' object has no attribute 'decode'

Encoding the value is inline with the lines below (Proxy-Authorization etc) which are being sent as binary.
2017-09-29 14:32:29 -07:00
Brian Coca
43cbcbcc75 removed typo from dig docs 2017-09-29 11:23:58 -04:00
Kedar K
916e6be888 - Fix to return error message back to the module. (#31035) 2017-09-29 17:06:30 +05:30
Dag Wieers
bedfd0a5a4 atomic: PEP8 compliancy and doc fixes (#30918)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-29 13:17:29 +02:00
yaacov
3ffc62b43b change be to exist in the docs 2017-09-29 12:54:48 +02:00
yaacov
19f4120c89 make the list of tags more meaningful 2017-09-29 12:54:48 +02:00
yaacov
4db133e725 add a state list option 2017-09-29 12:54:48 +02:00
yaacov
8b9c4de3b0 inline trivial calc url method 2017-09-29 12:54:48 +02:00
yaacov
b70845bb40 use the is_changed? paradigm, following example from other modules 2017-09-29 12:54:48 +02:00
yaacov
bf780c709d move manageiq_entities to module utils 2017-09-29 12:54:48 +02:00
yaacov
26a70f41ce Add new module manageiq_tags 2017-09-29 12:54:48 +02:00
jhawkesworth
04afacc2ee win_chocolately document improvedments, mention win_hotfix and use of become (#31085) 2017-09-29 05:47:38 -04:00
Rene Moser
d7fa3ab487 cloudstack: cs_template: remove dependency to CloudStackException
* fixes docs
* fixes pep8
2017-09-29 11:11:22 +02:00
Dag Wieers
fde4244d04 kubernetes: PEP8 compliancy and doc fixes (#30914)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-29 01:51:23 -04:00
jonjozwiak
74f950936a Fix ec2_win_password to allow blank key_passphrase (#28791) 2017-09-28 21:21:59 -04:00
Brian Coca
057eec94ee fixed winrm to use proper task vars (#31072)
it avoids hitting hostvars templating issue and ignoring exception
fixes #30911

also normal var precedence should work for ansible_winrm vars
2017-09-29 11:12:56 +10:00
jctanner
32cf69c00a Use the group-d1 moId instead of i8ln based names to identify the root folder. (#31077)
Addresses #29043
2017-09-28 20:36:54 -04:00
Toshio Kuratomi
5f22b4f8ad Reduce chance of mistakes with unsafe_shell check during refactor
Code like this:

if cond1 and cond2:
    pass
elif cond1:
    pass

Has a hidden dependency on the order that the conditions are checked.
This makes them fragile and subject to breakage during refactors.
Rewrite the code like this:

if cond1:
    if cond2:
        pass
    else:
        pass

The nested structure makes the ordering explicit and less likely for
someone to break the code when they refactor.
2017-09-28 16:48:22 -07:00
Alberto Murillo
3e7b240696 os_keystone_endpoint.py (#29031)
* Add os_keystone_service_endpoint

This patch adds a new Ansible module which allows a user to create
an endpoint to a service with Keystone.

Fixes #23909

* os_keystone_endpoint: Fix style and messages

Fix comments, pep8, version, metadata, license header
and imports according to the Contributing Modules Checklist

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Fix return values

- Change type of 'endpoint' return value from dictionary to complex
  in order to get validate_module checks passed.

- Remove 'id' from the return data since it is included inside the
  'endpoint' value wich is already being returned.

- Rename 'service' field to 'service_id' which is the correct name
  for the service id field returned in json.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Update shade version

Update minimum shade version to 1.11.0

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Make region optional

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Validate service exists before using service.id

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Fix documentation for service to accept name or id

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Pass the full service object to create_endpoint()

We already have the service object retrieved in code, by passing service.id to
create_endpoint, the shade librarie queries the api again to get the full service
object.

By Passing the already rerieved service object to create_endpoint() we save one
request to the API.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Make type explicit in module arguments.

Althoug type is default to str when not specified in module arguments
this commit explicitly defines type='str' for better readability.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2017-09-28 23:05:44 +02:00
Will Thames
371c6dba8b Fix aws_s3 connection exception handling (#30955)
`ProfileNotFound` does not have a `response` attribute, and
`NoCredentialsError` does not occur at connection creation time.
2017-09-28 16:20:10 -04:00
Adrian Likins
95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
2017-09-28 10:36:22 -04:00
Will Thames
c5971047a4 [cloud] Support reuse of unallocated Elastic IP's. (#30322)
* Return correct changed status when EIP is reused

When reusing an existing EIP, the changed status
should be False, not True.

* If public_ip is given and it exists, return it

Ensure EIP allocation returns existing public_ip correctly
2017-09-28 10:29:51 -04:00
Gustavo Maia
4f67e855ed Added ecs_taskdefinition_facts module (#30752)
* Added ecs_taskdefinition_facts module

* Expanding documentation
Now includes all possible return values

* Fixed boto dependency

* Converting results to snake case.

* Remove EcsTaskManager class, move to main()
Remove unnecessary `except` block

* Change botocore import method
Also make Profile exception message less redundant

* Changing case conversion of the results
Now converts only the root level keys
Commented is a version that would not convert only container_definitions
2017-09-28 08:48:57 -04:00
Ganesh Nalawade
97858d91ac Add alias to command option in telnet (#30825)
*  Add commands alias to telnet option
2017-09-28 18:07:37 +05:30
Dag Wieers
2b0e52b15c I am officially done with the unarchive module
I'll leave it up to someone else to try and talk to a bunch of unhappy people.
Good luck to whoever wants to maintain this !
2017-09-28 10:58:57 +02:00
Ganesh Nalawade
879ea24a74 Fix documentation issue for nxos_snmp_user module (#31029)
*  Change auth to authentication in module document
   to be in sync with module params
2017-09-28 13:04:20 +05:30
Jordan Borean
a41077df20 fix for webapppool when specifying an attribute that holds a collection (#30729)
* fix for webapppool when specifying an attribute that holds a collection

* re-add always block on test
2017-09-28 16:15:55 +10:00
James Mighion
2837200aea Adding new stdout regex to allow local password changes. Adding stderr regex to catch more errors. (#30994) 2017-09-28 10:05:14 +05:30
Will Thames
5900fee67a Fix ec2_snapshot_facts for python3
Avoid the following seen when running ec2_ami tests on python3,
presumably because the return type of `map` is different between
python2 and python3.

```
Traceback (most recent call last):
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 242, in <module>
    main()
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 238, in main
    list_ec2_snapshots(connection, module)
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 193, in list_ec2_snapshots
    snapshots = connection.describe_snapshots(SnapshotIds=snapshot_ids, OwnerIds=owner_ids, RestorableByUserIds=restorable_by_user_ids, Filters=filters)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 575, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 630, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python3.5/dist-packages/botocore/validate.py", line 291, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter OwnerIds, value: <map object at 0x7ff577511048>, type: <class 'map'>, valid types: <class 'list'>, <class 'tuple'>
```

https://github.com/ansible/ansible/pull/30435#issuecomment-330750498
2017-09-27 20:38:39 -07:00
bit
0a114436fc lxc_container: open files as text, fixes #30571 (#30572)
call to_text on full config file

fixes issue #30571
2017-09-27 20:32:45 -07:00
Christian Albrecht
0b0348d81c Fix sensu_silence module boolean parameter declaration (#30971) 2017-09-28 13:12:21 +10:00
Dag Wieers
4832b9a2d2 yum: doc fixes (#30897)
This PR includes:
- Documentation fixes
2017-09-28 12:57:21 +10:00
Dag Wieers
0ef87c849f virt: PEP8 compliancy and doc fixes (#30917)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 22:37:54 -04:00
Brian Coca
54d7c384b6 clarified dig module uses dnspython 2017-09-27 20:59:03 -04:00
Brian Coca
bb874e5029 fixed lookup dig docs 2017-09-27 20:05:21 -04:00
Brian Coca
dea872e4a6 avoid include_Xs conflating vars with options (#30954)
* avoid include_Xs conflating vars with options

* avoid frozenset so serialization wont complain

* dded missing set

* updated as per feedback
2017-09-27 19:53:10 -04:00
Brian Coca
fc745920c7 fixed pull's ansible/git invocation options (#30938)
* fixed ansible/git invocation options

now falls back to using localhost as 'all' does not include implicit accidentally anymore

fixes #30636

* better fix

* qfq9
2017-09-27 19:50:36 -04:00
jctanner
0dd3a61a75 vmware_guest: tests for createvm+modifyvm tasks (#30959)
* Save the serialized values instead of their types
* Add tests for creating and modifying VMs without using a template
* Remove blank line
* Add tests for vm deletion
2017-09-27 18:10:08 -04:00
Brian Coca
4291edd820 remove 'new internal vars' from dumps
fixes #30924
2017-09-27 16:10:42 -04:00
Felipe Bulsoni
5c3bbd4620 Improvements on documentation and removing unneeded quotes from yaml 2017-09-27 21:21:03 +02:00
Felipe Garcia Bulsoni
637571abfb Added new module for managing LIGs in HPE OneView 2017-09-27 21:21:03 +02:00
Jonathan Piron
54859a2132 Fix crypttab python3 compatibility issue (#30457)
In python2 str gives byte string. In Python3 it gives unicode string so it
can't be written in a binary mode opened file.
Use to_bytes helper function to ensure content being written will be
properly encoded in both python2 and python3.
2017-09-27 11:58:02 -07:00
Brian Coca
82de2e1865 rmeove ext requirement for yaml inventory plugin
returns to the state before 2.4 made it a requirement
fixes #30855
2017-09-27 14:28:07 -04:00
bbomgardner
c2af15ce74 Remove extra space in string comp
Fixes [30983](https://github.com/ansible/ansible/issues/30983)
2017-09-27 20:27:42 +02:00
René Moser
b444332412 fix pep8 for cloudscale_server (#30974) 2017-09-27 11:39:02 -04:00
Will Thames
56fe9499d1 [cloud] Improve boto3_tag_list_to_ansible_dict backward compatibility (#30622)
Default to trying both `key` and `Key`, and corresponding
`value`/`Value`.

Alternative to #30542
2017-09-27 11:27:26 -04:00
Thomas Steen Rasmussen
22fda12ac1 Remove stray " and replace include: with import_tasks: 2017-09-27 10:02:43 -04:00
Thomas Krahn
adc8d60764 ipa_sudorule: Fix issue #25863 (#26285) 2017-09-27 03:51:59 -04:00
Dag Wieers
fd91da7297 pacman: PEP8 compliancy and doc fixes (#30913)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 03:13:18 -04:00
Fran Fitzpatrick
c7760f3ea8 Adds ipa_dnszone module (#28790)
* Adds ipa_dnszone

* Use new copyright/gpl notice

* Update metadata version

* Use native error handling

* Fix boilerplate

* Remove default false

* Use localhost

* Should be 2.5
2017-09-27 03:04:59 -04:00
Martin Krizek
55739c1e46 redhat_subscription: replace deprecated autosubscribe (#30927) 2017-09-27 02:33:00 -04:00
Dag Wieers
91bb211922 redis: PEP8 compliancy and doc fixes (#30920)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 02:12:06 -04:00
Dag Wieers
125c4b135d mount: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 01:56:08 +02:00
Prasad Katti
b672fd1f45 ec2_instance_facts: requires boto3 and botocore 2017-09-27 09:12:46 +10:00
Brian Coca
17f094bb6a corrected import_play into to import_playbook (#30853)
* corrected import_play into to import_playbook

fixes #30744
2017-09-26 17:27:21 -04:00
Brian Coca
8378ac30b3 fix for slack callback breaks in 2.4 (#30932)
* fix for slack callback breaks in 2.4

fixes #30838
2017-09-26 17:18:59 -04:00
Peter Sprygada
909100bd2c fixes issue where filter wouldn't error on undefined var (#30921)
The filter will now correctly error on an undefined variable when trying
to template the key `value`
2017-09-26 11:50:57 -07:00
James Tanner
932f62ab57 Move resource pool login to a separate function and fix undefined var reference 2017-09-26 14:41:33 -04:00
James Tanner
0bb3c4379c device operations are recursive if serialized 2017-09-26 14:41:33 -04:00
Will Thames
ce2f5d26ab Improve cloudwatchevent_rule exception handling (#30823)
* Fix cloudwatchevent_rule exception handling

Where it is currently present, this change fixes the exception handling.
However, there are many places that it is lacking.

Fixes #30806

* Add new exception handling for cloudwatchevent_rule

Ensure all API calls are wrapped with exception handling

* PEP8 tidy up

* Remove unnecessary HAS_BOTO3 import and checks

Tidy up documentation so that NO_QA can be removed
2017-09-26 12:47:24 -04:00
Adrian Likins
a14d0f3586 Use vault_id when encrypted via vault-edit (#30772)
* Use vault_id when encrypted via vault-edit

On the encryption stage of
'ansible-vault edit --vault-id=someid@passfile somefile',
the vault id was not being passed to encrypt() so the files were
always saved with the default vault id in the 1.1 version format.

When trying to edit that file a second time, also with a --vault-id,
the file would be decrypted with the secret associated with the
provided vault-id, but since the encrypted file had no vault id
in the envelope there would be no match for 'default' secrets.
(Only the --vault-id was included in the potential matches, so
the vault id actually used to decrypt was not).

If that list was empty, there would be an IndexError when trying
to encrypted the changed file. This would result in the displayed
error:

ERROR! Unexpected Exception, this is probably a bug: list index out of range

Fix is two parts:

1) use the vault id when encrypting from edit

2) when matching the secret to use for encrypting after edit,
include the vault id that was used for decryption and not just
the vault id (or lack of vault id) from the envelope.

add unit tests for #30575 and intg tests for 'ansible-vault edit'

Fixes #30575
2017-09-26 12:28:31 -04:00
Kedar K
4c21563ac6 - Adds sub-interface support for nxos_interface and nxos_ip_interface (#30830)
- Support dot1 encapsulation on routed sub-interface
2017-09-26 21:34:51 +05:30
Will Thames
4553ec5cc5 [cloud] Ensure target group ARNs are passed as a list in ec2_asg (#30905)
While sets are useful for comparing whether target groups
need modifying, the AWS API expects a list or tuple, not a set
2017-09-26 10:25:49 -04:00
Will Thames
b863d072c2 [cloud] Don't remove profile, security_token by default in aws_s3 (#30902)
Comment above suggests only removing it for non-S3 services,
so let's actually enforce that.
2017-09-26 10:18:30 -04:00
Will Thames
ef56f9a44c Remove print statements from play_context
Caused spurious output, particularly obvious when in `become` mode
2017-09-26 10:15:14 -04:00
Dag Wieers
c3707aaf37 linode: PEP8 compliancy and doc fixes (#30922)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-26 09:48:08 -04:00
Ivan Pepelnjak
9aa1da23f0 Add one-versus-many-matches logic to network filter plugin (#30511)
* Add one-versus-many-matches logic

* Fixed indentation (tabs ==> spaces)
2017-09-26 05:44:07 -07:00
Stefan Bieler
ef1189304d Fix documentation of "state" param 2017-09-26 12:36:31 +02:00
Indrajit Raychaudhuri
90e2def72a timezone: Add support for macOS (#23447)
* timezone: Add support for macOS

On macOS, preferred way of managing timezone is via `systemsetup(8)`.
Thus, we use this command instead of relying on directly modifying
`/etc/localtime` as in other *BSDs.

* timezone: Use % instead of .format() in strings

This ensures better compatibility across different versions of Python.
2017-09-26 00:08:20 -04:00
Sebastien Boyron
cb5f2c7ac3 [fix] issue #29886 - it misses oom_killer in host_config_params (#30712)
so it was never passed to docker API.
2017-09-25 20:42:02 -04:00
Dag Wieers
4647713be9 cron: PEP8 compliancy and doc fixes (#30884)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-25 19:48:22 -04:00
Toshio Kuratomi
863fcb5ace Remove example of using params for the url_password
params could be logged so never use it for passwords.

Also add code to raise an error if passwords are used in that field.

References #30874
2017-09-25 16:42:45 -07:00
Dag Wieers
5175bd8ebd replace: PEP8 compliancy, pylint and docs (#30856)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 17:55:45 -04:00
MarkusTeufelberger
acf99085b5 openssl_certificate: compare bytes with bytes on python3 (#30522)
* compare bytes with bytes on python3
2017-09-25 12:13:50 -07:00
Adrian Likins
3eab636b3f Fix 'distribution' fact for ArchLinux (#30723)
* Fix 'distribution' fact for ArchLinux

Allow empty wasn't breaking out of the process_dist_files
loop, so a empty /etc/arch-release would continue searching
and eventually try /etc/os-release. The os-release parsing
works, but the distro name there is 'Arch Linux' which does
not match the 2.3 behavior of 'Archlinux'

Add a OS_RELEASE_ALIAS map for the cases where we need to get
the distro name from os-release but use an alias.

We can't include 'Archlinux' in SEARCH_STRING because a name match on its keys
but without a match on the content causes a fallback to using the first
whitespace seperated item from the file content as the name.
For os-release, that is in form 'NAME=Arch Linux'

With os-release returning the right name, this also supports the
case where there is no /etc/arch-release, but there is a /etc/os-release

Fixes #30600

* pep8 and comment cleanup
2017-09-25 15:00:31 -04:00
Dag Wieers
989bd1f829 xattr: PEP8 compliancy, pylint and docs (#30861)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 12:21:18 -04:00
Dag Wieers
04b5c17578 ini_file: PEP8 compliancy, pylint and docs (#30851)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 11:39:46 -04:00
Dag Wieers
5646d9960f xml: pylint fixes and docs
This PR includes;
- pylint fixes
- Documentation updates
2017-09-25 17:13:26 +02:00
jctanner
ada404d0ac vmware_guest: refactor spec serialization (#30819)
* Refactor spec serialization so that native types are evaluated last.
* Remove redundant type checks

Fixes #30818
2017-09-25 09:24:57 -04:00
Jose A. Rivera
e4c9ffa7e6 Set default value for Do-Until loop retries.
Fixes #17695
2017-09-25 09:57:25 +10:00
Beni Cherniavsky-Paskin
60d32f26d7 Followup tweaks to module EXAMPLES, per comments in #29039 (#30248)
* Drop hosts: tasks: boilerplate from EXAMPLES string

Should be just individual tasks
https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#examples-block

* Demonstrate url with port in one of the EXAMPLES
2017-09-24 04:55:19 -04:00
Brian Coca
b233f3f296 updated plugin docs (#30490)
* updated  docs

- for devs:
  - added inventory/vars section
  - made some updates to general section and other plugin types
- for users:
 - added 'user' plugin section to start describing the plugins
 - docs on types, what they are and how to use

- removed ref to deleted AUTHORS file
- corrected several typos/headers
- added descriptions to config.rst template
- ignore generated files for cli/plugins and config
- remove new generated files on `make clean`
- moved details from devguid and intro doc to plugin specific pages
- pretied up lookup notes
- changed precedence ref to not conflict config
- removed duplicate config data, as config is autogenerated and up to date
- put new plugins under playbooks
- added `pass` cause rst/python dislikes fractions
- removed dupe in .gitignore, alpha sorted to avoid moar dupes
- added try cause rst/python freaks out

* generate plugins into their own dir

only do plugins that support docs
use toctree from main plugins page
2017-09-22 23:19:50 -04:00
Brian Coca
7a312b6cf7 add ability to set default tags in config 2017-09-22 19:21:13 -04:00
Brian Coca
3f9a885b83 use set to quicken group host membership 2017-09-22 19:07:37 -04:00
Brian Coca
a819cfcad7 dont validate group names in yaml plugin 2017-09-22 19:05:32 -04:00
Toshio Kuratomi
86d8a4ff50 Fix encoding error with path to ssh
As reported on the mailing list, if ssh_executable (from a config
setting) contains nonascii characters then we could get a UnicodeError
here.  Transform into bytes before passing to subprocess so that
subprocess doesn't transform to bytes for us.
2017-09-22 15:31:21 -07:00
Anatoly Pugachev
e93ecac0da facts: fix SPARC cpu count on linux (#30261)
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor',
as a result "ansible_processor_vcpus" is always 1.
Add check element "ncpus active" to fix the issue.
2017-09-22 14:48:00 -04:00
Abhijeet Kasurde
e1dcfda172 Add processor_vcpu fact for Darwin (#30708)
Fix adds fact related to vcpu in Darwin's setup.

Fixes: #30688

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-22 14:32:59 -04:00
Adrian Likins
12404f470a Fix pkg_mgr fact on OpenBSD (#30725)
* Fix pkg_mgr fact on OpenBSD

Add a OpenBSDPkgMgrFactCollector that hardcodes pkg_mgr
to 'openbsd_pkg'. The ansible collector will choose the
OpenBSD collector if the system is OpenBSD and the 'Generic'
one otherwise.

This removes PkgMgrFactCollectors depenency on the
'system' fact being in collected_facts, which also
avoids ordering issues (if the pkg mgr fact is collected
before the system fact...)

Fixes #30623
2017-09-22 14:22:05 -04:00
jagmeetsingh91
d122a693d1 Feature to Specify AZURE blob storage type (#30660)
* Feature to Specify AZURE blob storage type

* Feature to Specify AZURE blob storage type

* Feature to Specify AZURE blob storage type

* Revert "Feature to Specify AZURE blob storage type"

This reverts commit 1d33997769ef3763a2eb434404c918134761635f.

	modified:   lib/ansible/module_utils/azure_rm_common.py

* Feature to Specify AZURE blob storage type
2017-09-22 10:17:00 -07:00
Hervé Beraud
cddff32792 [fix] pylint errors on modules packaging language (#30748)
* cleaning pylint errors for module packaging/language/*
2017-09-22 10:11:11 -07:00
Martin Krizek
8b416abb49 Allow for creating yum repo based on metalink only (#30736) 2017-09-22 13:44:26 +02:00
Abhijeet Kasurde
320e915a27 Add update_dns option for ipa_host module (#30646)
Fix adds update_dns option for ipa_host module.This option will
update DNS records of the host which is managed by FreeIPA DNS server.

Fixes: #30627

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-22 06:42:39 -04:00
Ganesh Nalawade
c86b945a7c Remove check_args for vyos modules (#30739)
*  With addition of provider sub option validation check_args()
   is no longer required.
2017-09-22 15:56:23 +05:30
Ganesh Nalawade
6d3307e472 Fix command argument typo in telnet module docs (#30731) 2017-09-22 12:13:58 +05:30
Ganesh Nalawade
d72eb08902 Fix nxos provider transport warning issue (#30610)
* Fix nxos provider transport warning issue

*  Add default value of transport arg in provider spec
*  Remove default value if transport arg in top level spec
   This ensure deprecation warning is seen only in case transport
   is given as a top level arg in task
*  Refactor nxos modules to reference transport value from provider
   spec

* Fix unit test

* Remove transport arg assignment in nxos action plugin

* As assigning transport value is handled in provider spec
  top level task arg assignment is no longer required
2017-09-22 10:32:25 +05:30
Sebastien Boyron
901bc2cffe Clean code, fd.close not required since open as fd if used; remove get_redirected_output from cleanup_redirection_tempfiles since output is not used
(cherry picked from commit ef51f00bbc9f24485915040b863c9d034d3c272c)
2017-09-21 20:01:13 -07:00
Toshio Kuratomi
f66c74915c Fix docker_service python3 incompatibility
Looks like this is supposed to operate on native strings so there's no
need to encode or decode at all here

Fixes #30354
2017-09-21 19:50:54 -07:00
Serge Nikalaichyk
dc8aedb274 Fix OS version check in win_power_plan (#30538)
* Fixed win_power_plan OS version check

* Original error message case
2017-09-22 06:23:02 +10:00
Jordan Borean
fb628acb6e win_domain_membership: added better error handling and basic tests (#30674) 2017-09-22 05:59:42 +10:00
Jordan Borean
59187358ee win_scheduled_task_stat: add new module to get stat on scheduled tasks (#30602)
* win_scheduled_task_stat: add new module to get stat on scheduled tasks

* fixed up linting errors and aliases file

* I should learn how to spell

* removing URI from test

* added state information for the task

* removed argument so task stays running
2017-09-22 05:59:06 +10:00
Dag Wieers
13bc5314ce win_shortcut: Add hotkeys examples to documentation (#30694)
This fixes #29110
2017-09-22 05:37:15 +10:00
Martin Krizek
cca4f94736 Mention all yum list options in docs (#30706) 2017-09-21 19:11:53 +02:00
Jiri Tyr
962528f511 Make clear the file must not contain .repo (fixes #30644) (#30656) 2017-09-21 19:11:07 +02:00
Reid Wahl
a22d7513a7 Remove invalid e.response from BotoCoreErrors in ec2_asg.py (#30121) (#30495) 2017-09-21 13:10:05 -04:00
Toshio Kuratomi
46e5c48f03 Split ec2_elb_* modules in service of rename/interface changes (#30532)
* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb
2017-09-21 13:06:14 -04:00
Brian Coca
236d13ac3a become flags are primary
with new configuration the sudo flags are always set and become cannot override,
switching to simle 'or' will result in become_flags working.

also sudo_flags are deprecated.
also changed from YAML null causing a 'None' str

fixes #30629
2017-09-21 10:00:52 -04:00
Tim Rupp
0eb0d96286 Adds module which allows users to manage partitions on a BIG-IP (#30577) 2017-09-21 14:48:51 +01:00
David Mahler
05ec0c9b8d Minor typo on deprecation warning (#30615) 2017-09-21 15:33:23 +05:30
Dag Wieers
2392934f48 More PEP8 fixes
Not sure why it missed those.
2017-09-21 05:16:49 +02:00
Dag Wieers
63c6afeaee Fix PEP8 issue 2017-09-21 05:07:49 +02:00
Dag Wieers
57b85198fe Add support for loop-tasks and improved output
This PR includes:
- Support for loop-tasks with proper subject/error content
- Improved output (and proper indentation)
- Complex data structures are now pretty printed
- Better selection of mail subject
2017-09-21 04:54:26 +02:00
Toshio Kuratomi
72bdf7aa7e Fix python3 and nonascii handling in inventory plugins
Fixes #30663
2017-09-20 19:39:15 -07:00
Brian Coca
f12c6e0946 moved from eval to templating + literal_eval 2017-09-20 21:35:02 -04:00
Dag Wieers
31e7d735a3 win_environment: Make this the Windows reference module
As discussed before we selected win_environment to the documentation,
and point to win_uri for a more advanced module.

If we want to make this the reference module, we have to get this one
absolutely right in every possible way.

This PR cleans up both win_environment and win_uri, and makes the
required changes to the windows module development section.
2017-09-21 03:20:17 +02:00
Brian Coca
9f4d73b699 fixed credstash docs 2017-09-20 20:52:52 -04:00
Hervé Beraud
b8e21bca46 [fix] sanity check errors on pylint 2017-09-20 17:38:55 -07:00
Reid Wahl
5f90169d73 modules/system/user.py: Change createhome to create_home (#30179) 2017-09-20 17:34:49 -07:00
Dag Wieers
f5dded59c2 mail: Fix charset encoding issue
This PR includes:
- An important fix to charset encoding of from address
- Documentation and examples cleanup
- PEP8 fixes
- Warning on insecure access
- Strict parameter typing
- More modern interface (using lists rather than comma, space or pipe-delimited strings)
- Warn on failure to send mail to some recipients
  ```
   [WARNING]: Failed to send mail to 'foobar': 550 5.1.1 <foobar>:
Recipient address rejected: User unknown in local recipient table
  ```
- Warn on failure to parse some headers
  ```
  [WARNING]: Skipping header 'Foobar', unable to parse
  ```
- Return failed recipients as return value
- Changed default encoding to utf-8
2017-09-21 01:07:53 +02:00
Brian Coca
c3ba579f6b constants as tuples instead of lists/sets 2017-09-20 16:57:45 -04:00
Will Thames
685267df73 Improve error handling for IdempotentParamaterMismatch (#30324)
Ensure all the return variables are correctly populated
and return more info in the error message
2017-09-20 16:42:13 -04:00
Brian Coca
d3e85bd045 dont override previous ini entries with defaults
corrected setting example, quotes mess up the regex
fixes #30633
2017-09-20 16:38:11 -04:00
Brian Coca
131d417c7a made callbacks backwards compatible (#30625)
* made callbacks backwards compatible

This fixes #30597 for those that were not inheriting from base.

Added deprecation notice so those callbacks get updated.

Callback must either inherit from base (directly or indirectly),
which already implements this or implement set_options themselves.

* added note about porting guide
2017-09-20 15:20:19 -04:00
Vladimir Utenkov
875153d503 [cloud][py3] Fix AttributeError in iam_policy on python3 (#30551) 2017-09-20 15:14:09 -04:00
Will Thames
d871964aca Ensure region is set in ec2_vpc_subnet_facts (#30399)
Make requested change in #30370
2017-09-20 11:23:48 -04:00
Adrian Likins
174cb1f33c Check number of vault secrets after setup. (#30520)
This is to catch vault secrets from config and
cli. Previously vault_password_file in config was
missed since it was added by setup_vault_secrets,
so check after setup_vault_secrets.
2017-09-20 10:31:36 -04:00
Will Thames
18582295e3 Fix broken LimitExceeded check in iam_managed_policy (#30537)
When policy versions exceed 5, we hit LimitExceeded. However,
the exception checking should use `e.response['Error']['Code']`
2017-09-20 09:27:45 -04:00
Patrick Ogenstad
d74c871559 Restore correct coloring to selective callback (#30528)
* Restore correct coloring to selective callback

This fixes the bug raised in #30506

* Fix format issues for Python 2.6 & indent

Removed the zero length fields to support format under Python 2.6

Fixed E128 continuation line under-indented for visual indent issue
2017-09-20 09:14:59 -04:00
dteach
ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
2017-09-20 12:43:07 +05:30
David Mahler
d395166ae0 Vyos correction (#30605) 2017-09-20 11:57:18 +05:30
Laurent Coustet
17995f0e48 Remove unused variable in git module. (#28464) 2017-09-20 02:24:03 -04:00
Jordan Borean
a940eb1e80 CamelConverter - more fixes picked up in testing (#30601) 2017-09-20 15:17:26 +10:00
Willem van Ketwich
92426840d6 fix for unrequired parameter 2017-09-19 21:37:42 -07:00
Trishna Guha
ae044f507f fix nxos_reboot command format (#30549)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-20 10:06:57 +05:30
Trishna Guha
e308176f3e fix write_on_file nxos_snapshot (#30545)
* fix write_on_file nxos_snapshot

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* some more logic

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-20 10:06:38 +05:30
s-hertel
b3273223db Previously to use the modes put or get the object had to be specified with a leading /. Since the boto call doesn't take an object like that this was overlooked and removed. Added a check to remove that leading character. 2017-09-19 21:21:02 -07:00
Jordan Borean
1ea0293878 CamelConversion: fix to not convert string values (#30595) 2017-09-20 13:03:45 +10:00
Jordan Borean
838f39e76a win_scheduled_task: rewrite (#28995)
* win_scheduled_task: rewrite for additionality functionality and bug fixes

* fixes for docs and os version differences

* started with the testing

* doc fix

* added more tests

* added principals tests

* finished tests for win_scheduled_task rewrite

* feedback from PR

* change to fail when both new and deprecated args are set

* change diff variable to match new standard and update doc sentance
2017-09-20 10:28:03 +10:00
Will Thames
31daeb4b85 New module for querying ACM certificates (#29430)
Not using AnsibleAWSModule so that it can be dropped into
a module library of Ansible 2.3
2017-09-19 19:10:39 -04:00
Martin Krizek
32d6b1d0e0 user: fix default non-system user's shell on macOS 2017-09-19 18:11:22 -04:00
Adrian Likins
307be59092 Don't ask for password confirm on 'ansible-vault edit' (#30514)
* Don't ask for password confirm on 'ansible-vault edit'

This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491
2017-09-19 17:39:51 -04:00
Brian Coca
71cc906ec8 fixed password lookup docs 2017-09-19 16:33:15 -04:00
Chrrrles Paul
e3ef80f5d6 oc module- Fixing description & removing example command (#30257)
* Fixing description & removing oc/adm example

Noticed formatting errors on http://docs.ansible.com/ansible/latest/oc_module.html -- also removing oc/oadm command examples

* Trailing whitespace..
2017-09-19 15:09:22 -04:00
Brian Coca
b9120dfd97 fixed decreption
(cherry picked from commit 1cee81375386a7f3ac3d1893342b9323983f00c9)
2017-09-19 11:43:36 -04:00
Brian Coca
24d4787b2d Lookup docs (#30280)
* finalize lookup documentation
* minor fixes to ansible-doc
 - actually show which file caused error on when listing plugins
 - removed redundant display of type and name
* smart quote fixes from toshio
2017-09-19 10:49:07 -04:00
Dag Wieers
2ef8c5a03d Fix typo
And also clean up Copyright/License statements when we're at it.
2017-09-19 16:10:21 +02:00
Joel Diaz
6c7d46a9e3 add default role of 'prometheus_alerts' for alerts (#29111)
Currently, MIQ only supports an alert type of 'prometheus', so rather than have the caller of manageiq_provider pass this info, just set it as the default.
2017-09-19 09:32:59 -04:00
Joel Diaz
79d034b088 update miq compare_user group comparison (#29063)
When calling manageiq_user to an already existing user (but leaving out the password so that it doesn't automatically 're-create' the user), the module fails with:

fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 324, in <module>\r\n    main()\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 315, in main\r\n    res_args = manageiq_user.edit_user(user, name, group, password, email)\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 229, in edit_user\r\n    if self.compare_user(user, name, group_id, password, email):\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 189, in compare_user\r\n    (group_id and user['group']['id'] != group_id)\r\nKeyError: 'group'\r\n", "msg": "MODULE FAILURE", "rc": 0}

The 'group' field turns out to be 'current_group_id' (at least with ManageIQ 4.6). Update the comparison accordingly.
2017-09-19 09:10:21 -04:00
Joel Diaz
99f6f0ccc2 add 'update_password' param to manageiq_user (#29093)
* add 'update_password' param to manageiq_user

Currently with the manageiq_user module, if you call it repeatedly while passing the 'password' parameter, it will always run the task and mark it as 'changed'.

Following the pattern of the AWS IAM module, add an 'update_password' parameter that takes 'always' (default) or 'on_create'. This will let you set an initial password when creating a user, but allow the user to modify their password and not stomp over their password changes if you re-run the playbook/task that created the user.

* don't stomp password when other fields change

Handle case where user fields change, but we don't want to stomp on a potentially user-changed password. Previously, if a non-password field changed, and the password param was passed in, it would ignore the 'update_password': 'on_create' setting (ie it would update/modify the password even if the user already exists).

Add trailing ',' to list of params.
2017-09-19 09:10:12 -04:00
Ondra Machacek
0aebdb4aca ovirt_vms: Fix the logout condition (#30410) 2017-09-19 08:27:09 +02:00
Matt Clay
7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
2017-09-18 23:20:32 -07:00
Jordan Borean
01563ccd5d windows: fix list type in legacy module utils (#30483)
* windows: fix list type in legacy module utils

* only change the return for the list type instead of affecting it all

* additional null check when using an array
2017-09-18 21:18:52 -07:00
jctanner
5aebcd4f7f Remove redundant check for group membership in add_host (#30530) 2017-09-18 20:22:30 -04:00
Wolfgang Felbermeier
f3865e370c Fix tags in ec2_instance_facts (#30333)
* Fix tags in ec2_instance_facts
The method boto3_tag_list_to_ansible_dict in module_utils/ec2.py changed
and does no longer check whether the returned result of boto3 uses
"key" or "Key" as the tag key identifier.
This fixes ec2_instance_facts to make this check in its own, since boto3
may return "key" instead of "Key"

* Since the indices for the tags are already formatted to lowercase
by the snaking, we can assume, that the index for the tags are already
formatted
2017-09-19 10:09:56 +10:00
Toshio Kuratomi
c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 2017-09-18 16:49:16 -07:00
Shinichi TAMURA
934ae28365 Timezone modeule: Better env choice for Linux (#28229)
* timezone module: fixed platform decision rule for Linux
— For better handling of environments where timedatectl is unavailable

* timezone module: allow absence of configuration files if specific commands are available

* timezone module: remove duplicated line

* timezone module: fixed docs to clarify returned diff

* timezone module: fixed “undefined variable err”

* Revert "timezone module: fixed docs to clarify returned diff"

This reverts commit 4b783227f7.

* timezone module: revert platform decision rule; just warn instead of futher command checks

* timezone module: [NosystemdTimezone] enhanced error message
2017-09-18 19:04:58 -04:00
Dag Wieers
229a86c952 win_file: Fix check-mode issue removing dirs (#30475)
This fixed #30442
2017-09-19 06:43:49 +10:00
Scott Buchanan
4617be3085 clarify documentation of import_role 2017-09-18 16:17:58 -04:00
Brian Coca
314e6d0d8a start of 'is chroot' fact
probably missing cornercases for some linux/bsd setups and other OSs
2017-09-18 16:16:41 -04:00
hiddenicon
33b8d7069f Add _ and . to regex (#30396)
Adding underscore and period to the nxos regex for determining the prompt for hostnames with underscores and periods in the hostname.
2017-09-18 14:59:11 +05:30
Toshio Kuratomi
47d303e255 Update the bundled six library to 1.11.0 2017-09-17 22:00:02 -07:00
Brian Coca
6e857468a2 expose soem options as vars (#30379)
* expose some useful options as vars for plays and plugins
2017-09-17 12:25:56 -04:00
Miouge1
96ebfd78af os_image: Add checksum based glance image manipulation (#27107)
* Add checksum based glance image manipulation

* Update os_image.py

* Move to 2.5
2017-09-17 15:19:58 +02:00
Brian Coca
ae29245e05 decelerate! (#30160)
removed accelerate code
removed keyczar dep for accelerate
2017-09-16 23:35:50 -04:00
Anil Kumar Muraleedharan
1921eaf096 Resolving bug on CNOS Image download on multiple devices. 2017-09-16 10:53:21 -07:00
Marko Stanković
85649876d0 Add a note about the limitations of a namespace check 2017-09-16 17:37:12 +02:00
Marko Stanković
16ca412bd7 xml module: Improve error message for missing namespaces 2017-09-16 17:37:12 +02:00
Matt Davis
0e70057f56 CommandUtil C# API tweaks (#30453)
* changed RunCommand result from Tuple to CommandResult for easier future extensibility
* moved Win32 Dictionary->multi-null-string environment munging into C#
2017-09-15 23:09:15 -07:00
Matt Davis
c12c7a72ed Various fixes to azure_rm_virtualmachine for managed disks and allocated. (#30450)
* fixes #30194
* fixes #30193
* fixes #29662
* fixes #28859
2017-09-15 20:55:23 -07:00
Matt Davis
6b5b465125 azure_rm_dnsrecordset rewrite (#30449)
As-merged, had several issues that prevented idempotent usage. Some args were defined at the wrong UI level. Dual-state args didn't match up with typical Ansible UI.
2017-09-15 18:12:46 -07:00
Matt Clay
61dd5517c3 Fix PEP 8 issue. 2017-09-15 14:44:21 -07:00
Brian Coca
8799038a89 deprecated include
added docs for new actions that take over include duties
2017-09-15 13:20:32 -07:00
Brian Coca
fc9b44e021 clear correct cache when reconcile is invoked
moved it to ensure all callers get the correct hosts after
2017-09-15 12:58:40 -07:00
Nathaniel Case
7dc60c3f24 nxos_install_os install_state fix 2017-09-15 15:34:32 -04:00
Matt Clay
4ce13e983a Command module bug fix, tests and cleanup. (#30432)
* Add more command integration tests.
* Remove unnecessary command test debug tasks.
* Fix traceback in command module for empty args.
* Remove unreachable code.
2017-09-15 11:57:50 -07:00
René Moser
f128796782 cs_volume: fix CloudStackException dependency (#30389)
fixes pep8
2017-09-15 20:40:28 +02:00
Kedar K
ff84fc969c Fixes nxos_pim_rp_address module idempotence (#29620)
* Fixes nxos_pim_rp_address module idempotence

*  * Adds a note in header comment to indicate no support for absent state
2017-09-15 14:21:34 -04:00
Brian Coca
81fd67c10f fixed issue with default callback inheritance (#30427)
* fixed issue with default callback inheritance

 - callbacks need to document same options as callbacks they inherit from to get them configured
 - since default is also used by many 3rd party callbacks for inheritance, making the code 'tolerate' the missing docs
   and fallback to using the direct constant to configure it's options.
2017-09-15 11:14:47 -07:00
Nathaniel Case
5d404af76e Raise an error if ansible_network_os is not specified (#30429) 2017-09-15 13:56:05 -04:00
Brian Coca
f87d0b3502 typo fix 2017-09-15 13:13:41 -04:00
Ganesh Nalawade
11310b8c4a Update removed_in_version to 2.9 for network module top level cred args (#30416)
* Update removed_in_version to 2.9 for network module top level credential args

* Add documentation
2017-09-15 21:20:07 +05:30
Moshe Shitrit
7da69a23e6 Added nopackages option and Fix #24997 (#28831)
* Added nopackages option and Fix #24997
Adding a new option - nopackages.
This enables the option to add the --nopackages flag while registering a new node to RHN Satellite. We are not uploading the rpm data on our nodes and since we started utilizing ansible for nodes registration, I figures it would be useful for others as well.
Also-
Fixes #24997 (verified in my lab)

* Fixed documentation

* Documentation changes:
- typo fix in "default"
- Added "version_added" and set to 2.4

* Documentation changes:
- Removed trailing whitespaces in nopackages['version_added']

* This change is unrelated for this feature pull request and shouldn't be here (and also seems wrong, see #25079).

* Changed "version_added" to 2.5 in the module docs
2017-09-15 10:50:47 -04:00
Mike Wiebe
9af6dc4751 Fix nxos_snmp_community idempotence issue (#30388)
* Fix nxos_snmp_community idempotence issue

* Use passed in name to filter

* Test updates and remove unused method
2017-09-15 07:45:51 -07:00
Abhijit Menon-Sen
0addd53926 Don't expect (postgres) SERVER_VERSION to be M.N (#30417)
It could be something like '10beta4', which StrictVersion() would
reject. When Postgres 10 is released, it will be '10', which
StrictVersion() would STILL reject.

Fortunately, psycopg2 has a 'server_version' connection attribute that
is guaranteed to be an integer like 90605 for version 9.6.5, or 100000
for version 10. We can safely use this for version-specific code.
2017-09-15 18:03:06 +05:30
KrdLab
a6c8978b74 Fix RETURN section document in lambda.py (#28333)
* Fix RETURN section document in lambda.py

* Fix typo
2017-09-15 05:08:15 -04:00
Sloane Hertel
bdbe5337c6 s3 integration tests (#28396)
* Replace pause in integration tests with until.

Use resource prefix instead of generating a random number

Only try to delete keys if they exist

* Add alias to tests
2017-09-15 05:08:09 -04:00
KrdLab
e0a5b7d7ea Fix RETURN section document in iam_role.py (#28430) 2017-09-15 04:21:27 -04:00
Stepan Stipl
4ec91491e2 Pass region and ec2_url to boto3 connection (#30370)
fixes ansible/ansible#30368
2017-09-15 13:54:29 +10:00
Brian Coca
f8005d2737 fix git wrapper (#29069)
* fix git wrapper

* fallback to bin/sh

* Use percent formatting as per sivel's review
2017-09-14 23:27:55 -04:00
James Cammarata
cd2774af78 Fixing two bugs with import_role (#30398)
1) import_role was never resulting in a static inclusion of the role
   tasks due to a logic error.
2) no error was raised when import_role tried to use a with loop, resulting
   in a strange error down the execution path.
2017-09-14 22:04:20 -05:00
Brian Coca
c027ad943e remove dupe deprecation on config (#30364)
* remove dupe deprecation on config

also move failed typing to same place to use 'standard' display vs hack.
2017-09-14 16:56:52 -04:00
James Cammarata
6730f81024 Correctly create include_role blocks when using loops (#30372)
Also fixes instances where conditionals or other variables may result in
hosts executing lists of tasks of differing sizes.

Fixes #18748
2017-09-14 15:56:12 -05:00
Mike Wiebe
173c41aefe Rel240/fix nxos pim interface (#29885)
* fix nxos_pim_interface

* Add integration test coverage and fix unit test

* Add clarifying comments

* Make ansibot happy
2017-09-14 13:36:32 -07:00
Toshio Kuratomi
8a2f069468 Document boolean default value treatment (#30062)
* Consistency and document treatment of default bool values

* Document that default bool values can be any Ansible recognized bool.
  choose the one that reads better in context
* For fragments used by the copy module, make bool types use type=bool and not choices

* Edit for clarity
2017-09-14 13:27:16 -07:00
Brian Coca
7a12314d54 fixed 'typing' for deprecated get_config 2017-09-14 13:20:55 -07:00
Ganesh B. Nalawade
8c3bf20a13 Use safe_load to load yaml
Replad `yaml.load` with `yaml.safe_load`
2017-09-14 11:19:00 -07:00
Pierre-Louis Bonicoli
e9d202f944 module_utils/avi.py: fix broken import 2017-09-14 10:59:25 -07:00
Mike Wiebe
3faba93a2b Fix nxos_interface error for nxapi and idempotence problem (#29136)
* Fix nxos_interface nxapi error and idempotence

* Make shippable happy
2017-09-14 10:25:35 -07:00
Patrick Ogenstad
58088e836e Fix import error. Was pointing to the wrong module (#30293) 2017-09-14 10:24:28 -07:00
rahushen
37f68bffc0 fixes #27177 - nxos_aaa_server_host multiple issues (#29103) 2017-09-14 09:29:53 -07:00
mwellmeyer
8749894ebc add possibility for log messages via log_prefix (#30358) 2017-09-14 12:12:26 -04:00
Yanis Guenane
0648e339a7 openssl: remove static dict for keyUsage (#30339)
keyUsage and extendedKeyUsage are currently statically limited via a
static dict defined in modules_utils/crypto.py. If one specify a value
that isn't in there, idempotency won't work.

Instead of having static dict, we uses keyUsage and extendedKyeUsage
values OpenSSL NID and compare those rather than comparing strings.

Fixes: https://github.com/ansible/ansible/issues/30316
2017-09-14 12:03:00 -04:00
Brian Coca
1950bcc14e better error on bad playbook encoding 2017-09-14 08:53:15 -07:00
Mark Goddard
ac69fcccdc Fix Dell OS network module timeout (#30355)
The dellos action plugins should add the remote address of the switch
provider to the play context. This was fixed in issue #23589 in an
almost identical manner for the eos, ios, iosxr, and vyos action
plugins.

Fixes: #30350
2017-09-14 15:40:50 +01:00
Yanis Guenane
3e4a306a42 openssl_certificate: Correctly set the version (#30314)
Current openssl_certificate is mistakenly taking its derivating its
version number from the csr version number.

Thos two fields are completly unrelated and hence the version number of
the certificate should be able to be directly specified (via
selfsigned_version parameter).
2017-09-14 15:21:32 +02:00
Abhijit Menon-Sen
524c5dcfef Avoid KeyError when subnet['Tags'] doesn't exist (#30349)
The problem was introduced in 2cdf31d3.
2017-09-14 21:30:09 +10:00
John R Barker
4c9ad00c50 Specify default delay (DOCUMENTATION only change) (#30344)
* Specify default delay

Also clarify that tx_rate is in bps

* aggregates -> aggregate
2017-09-14 11:42:20 +01:00
ethackal
4980ebf064 Fixes verify_ssl option when False in ansible_tower module util (#30308)
* Fixes verify_ssl option when False in ansible_tower module util

* fixed comparison to None per PEP-8 standards
2017-09-14 12:03:33 +02:00
Ganesh Nalawade
3ff527b1d2 Fixes #30281 eos_banner integration test failure (#30283)
* Fixes #30281 Configure login prompt for eos_banner

* Fix unit test

* Fix pep8 issue
2017-09-14 13:56:32 +05:30
Matt Clay
ec59650528 Fix logic error in nxos get_config. 2017-09-13 23:48:15 -07:00
Toshio Kuratomi
62f49120cd Fix regression in format of lvm facts (#30326)
lvm information should not have leading whitespace in the key names

Fixes #30006
2017-09-14 13:50:47 +10:00
Abhijeet Kasurde
b3cba957e0 Correct sl_vm documentation (#29433)
Fix corrects sl_vm documentation from wait_timeout to wait_time

Fixes: #29395

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-14 09:21:32 +10:00
David Critch
e462e3bb3f Support one to many A records in nsupdate module (#25620)
* Updating the nsupdate module to accept a list for 'value' instead
of a string. This is to allow manipulating 1:many DNS records.

A string can still be supplied so it should be backwards compatible.

Addresses issue #25554

* Update nsupdate.py

* Update nsupdate.py

* Update nsupdate.py
2017-09-13 18:21:48 -04:00
MarkusTeufelberger
2186b04934 Add simple integration test for openssl_certificate (#29038)
* openssl_certificate: Fix parameter assertion in Python3

Parameter assertion in Python3 is broken. pyOpenSSL get_X() functions
returns b'' type string and tries to compare it with '' string, leading
to failure.

The error mentionned above has been fixed by sanitizing the inputs from
a user to the assert only backend.

Also, this error was hidden by the fact that the improper check method
was called in the generate() functions.

* Add simple integration test for openssl_certificate

* remove subject == issuer assertion

* run integration tests only on supported hosts

* change min supported version to 0.15.x

* Add test for more CSR fields

* also convert dict members to bytes

* fix version_compare

* openssl_{csr, certificate}: Fail if pyOpenSSL <= 0.15

Previous 0.13 pyOpenSSL was a C-binding, and required the parameter
passed to add_extention to be in ASN.1. This has changed with the move
to 0.14 and it is now all pythong and string based.

Previous the 0.15 release, the `get_extensions()` method didn't exist,
since the modules rely heavily on it we ensure pyOpenSSL version is at
last 0.15.0.

* check pyopenssl version in openssl_csr integration test
2017-09-13 14:39:32 -07:00
Marek Hulan
9ad90de4bc Fix sending facts to Foreman 2017-09-13 13:58:45 -07:00
Felipe Garcia Bulsoni
4f682e8896 Updated version_added to 2.5 2017-09-13 13:13:19 -07:00
Felipe Garcia Bulsoni
18707136e2 Added support to retrieving SAN Manager resources in HPE OneView
- Added unit tests
- Added _main_ function to oneview unit tests which were missing it
2017-09-13 13:13:19 -07:00
Will Thames
fd18d7ebb5 [cloud] Don't alter dictionary during iteration in elb_target_group_facts, avoiding RuntimeError (#30247)
Don't update the target_group_attributes dict
while iterating over it.

Fixes #30190
2017-09-13 14:34:26 -04:00
Sloane Hertel
4bc4abfe1b [cloud] ec2_group: Handle duplicate names between EC2 classic and VPC groups (#28931)
* ec2_group: Handle name conflict with empty vpc_id.

If several groups exist with the same name (and vpc_id is None) then
treat the group outside the vpc as preferred (same as it would for a vpc
group with vpc_id specified). Also don't run the egress rules code in
that case.

* Handle lack of `IpPermissionsEgress` attribute on EC2 classic groups

In EC2 classic groups, the `while True` loop checking for egress
permissions will continue infinitely.

* Handle incompatible combinations of EC2 Classic + VPC groups

* Fix integration tests in accounts lacking EC2 classic

This change checks against the security group created, instead of the
module parameters, for VPC ID. This means that new accounts with a
default VPC will still wait properly for the first egress rule to
populate.

* Fix conditional for storing described groups with preference for matching VPC IDs

* Revert `vpc_id is None` on conditional to allow for default VPCs
2017-09-13 14:19:05 -04:00
saichint
4e32c92166 nxos_udld_interface: improve interface detection (#28682)
* fix for nxos_udld_interface

* Tested Note added back
2017-09-13 11:06:56 -07:00
Jordan Borean
6d196eaa98 windows command changed to use CreateProcess (#30253)
* windows command changed to use CreateProcess

* change to get become to work
2017-09-13 09:58:49 -07:00
Andrea Tartaglia
ea8af15dfe Updated Display.do_var_prompt to use to_native on prompt ( Fixes #30265 ) (#30285)
* Updated Display.prompt to use the normalized prompt message.
2017-09-13 09:58:28 -07:00
James Cammarata
b38f746604 Fix conditional inheritance on dynamic includes (tasks and roles) (#30178)
Per the new style of execution, for dynamic tasks conditionals are expected
to only affect the include task itself and should not be inherited by child
tasks. This patch brings the behavior inline with this expectation.

Fixes #27845
2017-09-13 11:33:43 -05:00
Adrian Likins
b2ac60cfd7 Remove some non-ascii chars from strings
quote some unwieldy strings, etc.
2017-09-13 09:23:53 -07:00
Nathaniel Case
8c03609e54 nxos_snmp cleanup (#28922)
* Clean up nxos_snmp_contact & nxos_snmp_location

* Bring nxos_snmp_community in line

* Bring nxos_snmp_host in line

* And I would have gotten away with it too,

if it weren't for those meddling sanity tests

* Bring nxos_snmp_traps & nxos_snmp_user in line

* Appease Shippable
2017-09-13 08:23:36 -07:00
rahushen
1a266e29a7 Fixes #28793, #27484 (#29745) 2017-09-13 08:08:22 -07:00
rahushen
169fbc4c94 Fixes #28493 (#29061) 2017-09-13 08:00:13 -07:00
MarkusTeufelberger
2f06d572ba Add extended key usages to module_utils/crypto.py (#30128)
* Add extended key usages
2017-09-13 07:49:52 -07:00
rahushen
5537218c94 fixes #27066 - nxos_acl errors when there are 0 or 1 access lists configured (#29076)
* fixes #27066

* replace type() with isinstance()
2017-09-13 18:07:06 +05:30
rahushen
f1cc5a928c Fixes #27336 - nxos_gir_profile_management issue while creating profile (#29151)
* Fixes #27336

* Correct documentation errors
2017-09-13 17:54:35 +05:30
Mike Wiebe
7292dd20ed Fix nxos_overlay_global networking modules (#28943) 2017-09-13 17:33:06 +05:30
aperigault
3622801ad4 Use ansible network env vars to authentication on fortigates (#29499) 2017-09-13 12:44:41 +01:00
rahushen
bc6e015a86 Fixes #27138 (#29064) 2017-09-13 17:11:00 +05:30
Trishna Guha
578ae3b238 fix nxos_file_copy and provider getting set to None when transport is cli (#30262)
* nxos_file_copy bug fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* provider gets set to None in module level when transport is cli

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-13 16:36:41 +05:30
Ganesh Nalawade
d8371cec91 Fix ios_system lookup enable issue (#30263)
Fixes #29974

Add `None` check while comparing module parameter values (want) with the actual
configuration present on device (have).
2017-09-13 15:19:09 +05:30
follower
8489e298ca doc: Typo fix: "accesability" --> "accessibility" (#30251) 2017-09-13 11:17:29 +02:00
Christian Pointner
1fe5171f1a openssl_certificate: make subject-alt-name identifier conistent with openssl_csr (#30151) 2017-09-13 05:06:23 -04:00
Matt Clay
442af3744e Miscellaneous pylint fixes.
The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
2017-09-13 01:53:08 -07:00
Jordan Borean
77b2aca5a2 fixed become to show the stdout and stderr streams instead of the StreamReader (#30254) 2017-09-13 17:35:12 +10:00
Mike Wiebe
cef7ed0310 Fix nxos_mtu nxapi failure (#30153) 2017-09-13 10:51:46 +05:30
Daniel Shepherd
2cdf31d3a2 Update ec2_vpc_subnet_facts to use Boto3 (#25374)
* update ec2_vpc_subnet_facts module to use boto3 and support gathering updated fact items from AWS API

add version_added to new parameter

added return docs and other requested changes

removed errant extra blank line

updates per review

* update per review: fix AWSRetry backoff implementation and fix example that was not correct
2017-09-13 10:17:17 +10:00
Pavel Zagalsky
779e365639 Modified yaml examples (#29039)
Additional fields

Another change

Lint fix

Removed "valid" option from documentation

Checking without cert example

Added fake cert
2017-09-12 18:48:00 -04:00
Jacob McGill
2489eeece0 ACI EPG TO DOMAIN: Add vm_provider docstring and add support for micr… (#29114)
* ACI EPG TO DOMAIN: Add vm_provider docstring and add support for microsoft and openstack

* Fix typo

* Fix whitespace
2017-09-12 22:53:17 +01:00
Matt Davis
212bb76326 deprecated azure classic module (#30241) 2017-09-12 14:49:59 -07:00
Mike Wiebe
f973f93963 Fix nxos_smu error (#30157) 2017-09-12 22:17:07 +01:00
Martin Krizek
59702318e1 yum: fallback to epoch=0 if not available 2017-09-12 13:30:35 -07:00
Michael Price
fd8b1e5f34 Refactor E-Series Storage-Pool to use module_utils (#20900)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
2017-09-12 16:17:42 -04:00
Jordan Borean
f6858cdd4d windows facts: better way to get machine SID (#29821)
* windows facts: better way to get machine SID

* remove the substring and just get the property that contains the value we need
2017-09-12 13:00:28 -07:00
Michael Price
984af98b1e NetApp E-Series Auth - Resolve issues with validate_certs and error handling (#30167)
* Cleanup password error handling for E-Series auth

The E-Series auth module was using some erronous behavior on handling
the status codes when updating the system password. This patch resolves
some of these issues.

* Fix validate_certs param in E-Series auth module

The auth module was ignoring the validate_certs parameter for making
HTTPS calls to the back-end API. This patch resolves the ignored
parameter.
2017-09-12 15:52:33 -04:00
abirami-n
adc533804a module_utils_fix_dellos6 (#28060) 2017-09-12 18:24:36 +01:00
Raja Venkataraman
c0000bc722 Handle wait_for_deployment_completion during Azure deployment. (#26079)
Pull the get_poller_result inside the if block so that if the caller has
wait_for_deployment_completion=False, it doesnt block and wait for it to
finish.

Also, since the result contains information about the deployment, provide
None values for it in the output.(Not sure if this needs to be documented)

Fixes #26014
2017-09-12 10:07:32 -07:00
Brian Coca
a2b3bb1e49 only eval values if set from defaults 2017-09-12 10:05:16 -07:00
Nicklaus McClendon
6dbc3c63f8 Updated pip module to always return changed if venv is created (#24233)
* Updated pip module to always return changed if venv is created

Fixes #23204

* Add integration test to pip (see #23204)
2017-09-12 10:01:29 -07:00
Matt Davis
1e2ce4c8ab support missing drive letters in PS path type (#29884)
* fixes #26623
* Test-Path (and thus `-type path` in Get-AnsibleParam) fail on a nonexistent drive letter, since it can't be mapped to a PSProvider.
* added support and basic smoke tests for
2017-09-12 09:51:48 -07:00
Michael Price
8515db8588 Resolve issues with NetApp E-Series LunMapping module (#28294)
* Refactor E-Series LunMapping module to use module_utils

Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.

* Remove the default LUN number

By providing a default LUN number, it interferes with the ability of the
API to determine the appropriate LUN value.

* Fix ignored validate_certs parameter

The validate_certs parameter was not being provided to the underlying
requests method. This patch resolves the issue by passing the value to
all relevant HTTP requests.
2017-09-12 12:50:47 -04:00
Ganesh Nalawade
530988666a Allow delegate_to if transport is not cli (#29945)
Fixes #29060

Allow delegate_to if transport is either nxapi or eapi.

Persistent connection uses `cli` transport and create
a local socket on control node. Hence delegate_to is not allowed
for `cli` transport.

However as `nxapi` and `eapi` transport does not use persistent connection
it is possible to use delegate_to in this case.
2017-09-12 21:34:13 +05:30
Sloane Hertel
b02937f3c3 [cloud] Document requirements for ec2_asg. (#30057) 2017-09-12 11:26:35 -04:00
Anil Kumar Muraleedharan
32f0c9f809 Bug Fixes for Vlan Name not assigned and Switch Error (#29953) 2017-09-12 16:14:52 +01:00
Andrea Tosatto
6b6e5665aa make os_security_group_rule idempotent (#23707)
* Fix issue #19610
2017-09-12 07:24:09 -07:00
Will Thames
0566d4672d [cloud] Add documentation around backoff and pagination for AWS module authors (#29883)
We field a lot of PRs that could be improved through use
of built in pagination and retry capabilities.
2017-09-12 09:29:04 -04:00
Ganesh Nalawade
599fe23ed6 Fix unwanted deprecation message in network module args (#28984)
* Fix unwanted deprecation message in network module argspec

Fixes #25663
Fixes #24537

*  segregate provider spec and top level arg spec
*  add deprecation key in top level arg spec
*  remove action plugin code to load provider and add
   that logic at a common place in network_common.py file

* Fix CI issue

* Minor change
2017-09-12 13:00:01 +02:00
Martin Krizek
d52316fcc2 yum cleanup (#28818) 2017-09-12 06:59:15 -04:00
Trishna Guha
5b1c91bf19 nxos_system parse name_servers fix (#29944)
* nxos_system parse name_servers fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_system tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-12 13:25:01 +05:30
Matt Clay
68aeaa58a8 Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
Ganesh Nalawade
5caa47feb9 Add port and host check for neighbor args in junos_interface (#29941) 2017-09-12 11:16:20 +05:30
Tim Rupp
74ace093b8 Renames the bigip_configsync_actions module (#29747)
Retains the old name by making a symlink. We can remove it in a later
release.
2017-09-12 05:53:44 +01:00
Toshio Kuratomi
cc343a4376 Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings
* PYTHON_OPTIMIZE=2 will omit docstrings.  Using docstrings makes future
  changes to the plugin and module code subject to the requirement that we
  ensure it won't be run with optimization.
2017-09-11 18:34:09 -07:00
Sloane Hertel
9bc330c89b ec2: fixes #19521, fixes #29456 - create instance-store AMI instances with correct shutdown behavior (#28885)
* Create instance-store AMI instances with 'terminate' as the shutdown behavior since it is required.

* Match on the error code instead of searching for a string in the message.

* Narrow conditional to only fix shutdown behavior if fixing it would help

* Fix pep8.
2017-09-12 11:16:00 +10:00
Brian Coca
2165bac212 module and vault fixes (#29663)
* module and vault fixes

- fix module_path cli option and usage, which fixes #29653
- move --output to be in subset of vault cli, no need for all vault enabled cli to use it
- added debug to loader to see directories added
2017-09-11 21:02:16 -04:00
ABond
1ec015410d digital_ocean_sshkey doc refinement and removal of unused import (#28960)
Updated doc examples and removed os import that was unused
2017-09-11 19:44:06 -04:00
Abhijeet Kasurde
b5eca624d0 Refactor easy_install module
* PEP8 fix
* Rectified string check in package install command stdout
* Add abadger's code review changes

Fixes #22245

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-11 15:45:41 -07:00
Tim Rupp
a36ebd979d Adds missing docs and downstream fixes (#29664)
Partition docs are not a documentation fragment, so they need to
be added
2017-09-11 23:30:34 +01:00
Jordan Borean
5623e679b8 win_unzip: added support for Server core by using .net zip functions (#29272)
* win_unzip: added support for Server core by using .net zip functions

* fixed unzip behaviour with folders
2017-09-11 18:30:24 -04:00
Adam Miller
75127092f2 refactor firewalld module with object abstraction (#26487)
* refactor firewalld module with object abstraction

This change creates a FirewallTransaction object that each
individual transaction type is a sub-class of as they all follow the
same pattern to enable or disable something in the firewall.

Also, there's a few bugfixes here:
    - Fix the "source" type to handle permanent operations
    - Remove ambiguity of required parameters for only specific use
      cases that can lead to transactions effectively being a no-op.
      Instead, pick sane defaults and document them.
    - Change how imports are done so globals are no longer needed

This is based on the original feedback by Toshio from the last
refactor attempt:

    https://github.com/ansible/ansible-modules-extras/pull/3383

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* fix line too long for pep8 for shippable tests

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* remove firewalld from pep8/legacy-files

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2017-09-11 14:10:07 -07:00
Brian Coca
869a318492 allow config for callbaks and some fixes
* only complain about ini deprecation if value is set
 * set plugin config for stdout and other types
 * updated plugin docs, moved several plugins to new config
 * finished ssh docs
 * fixed some issues seen in plugins while modifying docs
 * placeholder for 'required'
 * callbacks must use _plugin_options as _options already in use
2017-09-11 14:00:01 -07:00
Sloane Hertel
942b6fb9bc ec2_vol: wait for delete_on_termination to be set to the correct value. Fixes #22534. (#28848)
wait for delete_on_termination to be set to the correct value, it can take some time to correctly reflect the setting sent in the API call.
2017-09-11 16:52:06 -04:00
Toshio Kuratomi
ff13d58c14 Remove use of unicode_literals as it is an anti-pattern
from __future__ unicode_literals leads to developer confusion as
developers no longer can tell whether a bare literal string is a byte
string or a unicode string.  Explicit marking as u"" or b"" is the way
to solve the same problem in the Ansbile codebase.
2017-09-11 13:33:51 -07:00
Lorin Hochstein
362a2e523a Document return values for ec2_vpc_net.py (#21294)
* Document return values for ec2_vpc_net.py

* Prepend "vpc" to return values
2017-09-11 16:10:36 -04:00
Christian Pointner
177ce3014c openssl_csr: consistent param namings (#29604)
* harmonize openssl-csr argument names

* the module has been introduced by 2.4 not only the privatekey_passphrase
2017-09-11 21:05:15 +02:00
Toshio Kuratomi
cfaea8a053 Change ansible-doc usage to show -a is for internal use (#29603)
* Change ansible-doc usage to show -a is for internal use

ansible-doc -a is for testing that documentation is sane.  It should not
be used by normal users in production.  The main reason for this is that
it is designed to fail if there are any undocumented modules or plugins.
This is good for testing that all plugins we ship are documented.  It is
not good for end users who may have undocumented third-party plugins.
2017-09-11 11:25:34 -07:00
Toshio Kuratomi
3277e6328b Define byte strings versus text strings in docker connection
Fixes python3 string handling in the docker connection plugin

Fixes #24776
2017-09-11 09:55:09 -07:00
Martin Krizek
de299ef77c dnf: fix TypeError when env/group failed 2017-09-11 09:16:39 -07:00
Matt Clay
cafd064547 Improve import error handling in azure_rm_common. (#29153)
* Improve import error handling in azure_rm_common.

* Update skip.txt
2017-09-11 09:11:28 -07:00
Matt Martz
d043ba2673 Create a new pipe for sshpass on retries. Fixes #29095 2017-09-11 08:49:15 -07:00
Dusan Matejka
0647d09602 adds soft-update logic if force is set to no in zabbix_host module in… (#22614)
* adds soft-update logic if force is set to no in zabbix_host module instead of failing

* makes zabbix_host soft-update compatible with python2.6
2017-09-11 09:14:22 -06:00
Dirk Mueller
81f76475f1 Rename SuSE distribution helper function to SUSE (#29090)
This is a noop change, but the company renamed itself from SuSE to
SUSE round about 15 years ago. See

https://www.suse.com/brandcentral/suse/identity.php
2017-09-11 11:03:27 -04:00
Andrea Tartaglia
b9de989ad4 Fix mail module headers encoding (#29109)
* Fixes encoding issue in Subject line

* Use Header to correctly set header charset
2017-09-11 10:39:23 -04:00
Jonathan Karras
e5d247fdc0 Fixes #20443 - Adjust version checking regex to account fo no comma in IOS-XE (#29157)
* Adjust version checking regex to account fo no comma in IOS-XE
* Adjusted regex to include last character of version number
2017-09-11 07:08:12 -07:00
Ricardo Carrillo Cruz
f0aa31b49e Fix handling of config vars with eval expression (#29536)
The config variables defined with eval, like INVENTORY_IGNORE_EXTS,
are not stored properly once the eval is processed.
This causes references to the constant to still have the eval in the
value.
2017-09-11 16:04:51 +02:00
Erwin Oegema
61d2620098 Fix section in known_hosts documentation
SSHD is part of section 8, SSH is part of section 1.
2017-09-10 20:24:46 -07:00
Andreas Olsson
ff5bc9d9c3 postgresql_db: Document that name and db are aliases (#29180) 2017-09-10 22:29:15 -04:00
Brian Coca
0c291ece1a remove fact namespacing
since we want to make namespaced facts drop ansible_ prefix but don't have the
time before release to perfect this feature, we are going to postpone it for now
until we have the resources to fix this issue. That way we won't have people relying
on the 'incorrect' names for a release.
2017-09-10 17:37:52 -04:00
Andrew Saraceni
8f050d3719 Fix SID Lookup Issues on Assorted Windows Modules (#28979)
* fix sid lookup issues and update copyright/license to latest format

* simplify win_owner and win_share by removing unnecessary function
2017-09-11 07:34:51 +10:00
Werner Dijkerman
4af8c6852f Adding tls settings for Zabbix host (#28692)
* Adding tls settings for Zabbix host

* Using the correct Ansible version

* Removing wildcard import

* Added module_utils package

* Set version_added for visible_name back to 2.3

* Added description for >= Zabbix 3.0; Added parameters for function

* Setting version_added --> 2.5; Removed trailing whitespace
2017-09-10 16:53:53 -04:00
William Griffiths
ab7c850360 consul + Python 3.5 (#23935)
* Fix #23934 - consul + Python 3.5
* List comprehension instead of filter with lambda
2017-09-09 18:41:08 -07:00
Miguel Ángel Ajo
8e4f112b39 Fixes #23680 bug with py3.x due to binary string handling (#23688)
* This commit includes a unit test to exercise the _is_role
function and make sure it doesn't break in any Python version.
* Import os.path and other minor fixups
2017-09-09 18:40:07 -07:00
Tomas Tomecek
0274835add conn,buildah: don't pass bytes to shlex.split (#27896)
* conn,buildah: don't pass bytes to shlex.split on python3
2017-09-09 17:40:07 -07:00
Toshio Kuratomi
75249e311e Fix set theory filters for python3
The set theory filters need to use lists rather than generators on python3.

Also add unit tests for most of the mathstuff filters

Fixes #26494
2017-09-09 17:38:39 -07:00
Dag Wieers
6c4966547d Cosmetic changes to documentation and arg_spec
I didn't want to drag this any longer than it already has. Hope I am doing well.
2017-09-10 01:39:56 +02:00
Simon Wydooghe
d13b62907b Change version_added from 2.4 to 2.5 2017-09-10 01:39:56 +02:00
Simon Wydooghe
c308ec6229 Remove unneccesary statements
* Remove 'required: false' statements from the argument docs
* Remove 'required=False' parameters from argument spec
* Remove 'default: null' statements from the argument docs
2017-09-10 01:39:56 +02:00
Simon Wydooghe
57d4a6ca8b Add --syn option to iptables module
This adds the --syn option to filter SYN packets. Can be negated.

I added a generic append_match_flag function which can be used to add
match flags without parameters. It also allows negating the flag
if the added param allows this.

Not sure if I took the best approach here so all feedback welcome :)
2017-09-10 01:39:56 +02:00
Toshio Kuratomi
6797221107 Romain dartigues fixes (#29169)
* cloud: azure: fix typo introduced in commit 16d23e9

The commit "Add reference to VNET resource group (#26052)"
removed an used variable.

* network: aos: error hint never shown
2017-09-09 16:20:53 -07:00
Anton Baklanov
fcad4f38b4 Fixes #26793: convert insert regex to_bytes before searching 2017-09-09 12:49:00 -07:00
Kevin Hulquest
2bab91551d Update qos parameter for volume manager and update example. (#27594) 2017-09-09 12:28:56 -07:00
Pierre Guinoiseau
436b173b24 Fix py3 string issue in jail connection plugin (take 2) (#28374)
* Fix py3 string issue in jail connection plugin
2017-09-09 11:52:42 -07:00
Maor Lipchuk
625a23f155 Fix typo 2017-09-09 20:26:21 +02:00
Joshua C. Randall
6e84baddb6 fix os_image so it works when id is None (#29147)
Fixes #29145
2017-09-09 13:16:48 -05:00
Matt Clay
4de6076d78 Fix pylint issue. 2017-09-09 10:45:39 -07:00
Abhijeet Kasurde
8f6626bd8f Misc typo corrections
Fix adds correction for typos

* Anisble to Ansible
* Fasle to False

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-09 10:25:50 -07:00
s-hertel
0ac4a82f3b ec2_group: unnest variable assignment. Fixes #29113. 2017-09-09 10:20:08 -07:00
s-hertel
6ae201d3b1 cloudtrail: import botocore.exceptions in a try/except. 2017-09-09 10:10:21 -07:00
Brian Coca
075ead8fb0 fixes to config/setting retrieval
- better variable precedence management
- universal plugin option handling
- also updated comments for future directions
- leverage fragments for plugins
- removed fact namespacing
- added 'firendly name' field
- updated missing descriptions
- removed some unused yaml entries, updated others to reflect possible future
- documented more plugins
- allow reading docs using alias
- short licenses
- corrected args for 'all plugins'
- fixed -a option for ansible-doc
- updated vars plugins to allow docs
- fixed 'gathering'
- only set options IF connection
- added path list and renamed pathspec mostly the diff is , vs : as separator
- readded removed config entries that were deprecated but had no message ... and deprecated again
- now deprecated entries give warning when set
2017-09-09 09:48:22 -07:00
Pierre-Louis Bonicoli
557356c571 module_utils/ovirt.py: fix broken import 2017-09-08 22:12:00 -07:00
Antoine Rouaze
f57d51d92c Fixes #22374: fix route table update in ec2_vpc_route_table module (#27234)
The ec2_vpc_route_table module notifies about a change on the route table when the instance Id of the NAT instance has changed, but in fact, nothing changes. The module call the create_route function the AWS SDK to add a new route with the same cidr. The AWS SDK should return an error instead of nothing.

Call replace_route function instead of create_route when a route table with the same cidr but with different target destination is present.
2017-09-08 19:27:08 -04:00
Gerben Geijteman
094856b709 Add max_priority to give priority ability to a queue 2017-09-08 16:09:50 -07:00
Ross Williams
39e46437bf Fixes #19666 Correct AMI information output by ec2_ami module (#27021)
Add AMI name and platform to outputs on AMI creation
2017-09-08 16:30:08 -04:00
Willem van Ketwich
f58bd4f392 [cloud] EC2 AutoScaling fix for respecting zero as the desired, min&max size values (#27870) 2017-09-08 12:30:35 -04:00
Trishna Guha
588bddbc35 nxos_banner CI fix (#29134)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-08 19:33:41 +05:30
Ganesh Nalawade
772dab55c6 Add check for port and host in ios_interface (#29119)
Fixes #29118
2017-09-08 09:10:38 +05:30
Ganesh Nalawade
0b2619ff2b Add lldp neighbor intent argument for vyos_interface (#29092)
* Add lldp neighbor intent argument for vyos_interface

* Add version_added info for neighbor argument

* Fix CI issue
2017-09-08 08:28:43 +05:30
Joel Thompson
4e759a9cce sns_topic: Fix unreferenced variable (#29117)
Not sure how this ever worked.

Fixes #29102
2017-09-07 21:46:30 -04:00
Adrian Likins
89c973445c generate rst doc pages for command line tools (#27530)
* let generate_man also gen rst pages for cli tools
* make template-file, output-dir, output format cli options for generate_man
* update main Makefile to use generate_man.py for docs (man pages and rst)
* update vault docs that use :option:
* Edits based on
6e34ea6242 and
a3afc78535

* add a optparse 'desc' to lib/ansible/cli/config.py 

  The man page needs a short desc for the 'NAME' field
  which it gets from the option parse 'desc' value.

  Fixes building ansible-config man page.

* add trim_docstring from pep257 to generate_man

  use pep258 docstring trim function to fix up any indention
  weirdness inherit to doc strings (ie, lines other than
  first line being indented.

* Add refs to cli command actions

To reference ansible-vaults --vault-id option, use:

:option:`The link text here <ansible-vault --vault-id>`

or:

:option:`--vault-id <ansible-vault --vault-id>`

To reference ansible-vault's 'encrypt' action, use:

:ref:`The link text here <ansible_vault_encrypt>`

or most of the time:

:ref:`ansible-vault encrypt <ansible_vault_encrypt>`
2017-09-07 15:44:20 -04:00
Abhijeet Kasurde
4a73390823 shared argument spec for FreeIPA (#28950)
Adds unified argument spec and documentation updates for FreeIPA modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-07 21:07:15 +02:00
Toshio Kuratomi
e1e2d08508 Combine exception handling to simplify code (#29096) 2017-09-07 13:20:44 -04:00
Brian Coca
13d1520f3d Db cache fix (#29048)
* cleaner get for file based caches
* now db based facts behave like file ones
we now keep local in mem cache to avoid race conditions on expiration during ansible runs
2017-09-07 12:17:16 -04:00
Ricardo Carrillo Cruz
f9f0472ba5 Ignore routes that are not static manually added (#29094)
Fixes #28841
2017-09-07 17:56:09 +02:00
Sam Doran
a5ee865634 Update elasticsearch_plugin.py (#28936)
* Update elasticsearch_plugin.py

Change module to work with Elasticsearch 2.x and 5.x automatically.
Update examples and docs.
Supersedes #21989

* Check system paths for elasticsearch-plugin binary

Use get_bin_path from basic.py for searching paths.

* Create a copy of PLUGIN_BIN_PATHS rather than modifying the global

* Use provided plugin_bin path first before trying other places

Change global PLUGIN_BIN_PATHS to a tuple
2017-09-07 11:33:53 -04:00
Tomaž Šifrer
3bd89f8298 Fix: modifying existing application lb using certificates now properly sets certificates (#28217) 2017-09-07 08:23:17 -04:00
Ganesh Nalawade
49658f9437 Add lldp nighbors intent arg support for junos_interface (#29057)
* Add lldp neighbor state arg for junos_interfaces

* minor change
2017-09-07 12:01:40 +05:30
Jordan Borean
91e7c3ec81 win_regedit: fixed up diff output to be more representative of type (#28974)
* win_regedit: fixed up diff output to be more representative of type

* added diff fix for creation of key and prop in one go
2017-09-07 16:14:49 +10:00
Jordan Borean
4a577bd67f win_user: add return info (#28975) 2017-09-07 16:13:51 +10:00
Rene Moser
da488a8db5 config: use path list for default inventory
This allows to use a pathlist in the ansible.cfg:

  [default]
  inventory = path/inventory:other_path/inventory

Since ansible allows to use --inventory on CLI more then once, we should also support a pathlist in the config.
2017-09-07 00:09:07 -04:00
Brian Coca
7804049592 fix check mode for solaris enable/disable (#29049) 2017-09-07 10:16:58 +10:00
Brian Coca
fe3b4325c2 less confusing 'args' message (#29053)
* less confusing 'args' message

* fix test

* gone native
2017-09-06 18:20:06 -04:00
Nathaniel Case
f84ff216b6 Generalize nxos_bgp event-history detection (#28890)
* More general handling of event-history

* Update unit tests
2017-09-06 17:37:44 -04:00
Toshio Kuratomi
b98220f63d Bump the versions now that devel is 2.5 2017-09-06 13:13:57 -07:00
Ryan Brown
d02bea75d3 Move selected AWS modules from community/certified to core support (#28617) 2017-09-06 11:15:41 -04:00
ABond
082f54eaf4 Fix digital_ocean module_util api_token bug (#28924)
* Fix digital_ocean module_util api_token bug

* Included environment variables also

* Removed try/catch and added a check on self.oauth_token

Modules using the DigitalOceanHelper would expect the module to handle any api key resolution.
2017-09-06 07:14:10 -07:00
Brian Coca
0ddbcf8841 python3 fix 2017-09-06 09:42:58 -04:00
Ganesh Nalawade
3b6b004570 Add support for neighbor argument in ios_interface (#29035)
Add missing support for lldp neighbor argument in ios_interface
2017-09-06 10:15:02 +05:30
Matt Clay
08bdb6198e Migrate more Azure integration tests. (#29034) 2017-09-05 19:38:56 -07:00
Markus Juopperi
d343a3abd1 elb_application_lb: when purging rules make deletion the first step (#28749)
This prevents errors when adding new rules that conflict with existing
ones that will be deleted. For example this allows adding a new rule
with the same priority of a rule that will be purged.
2017-09-05 13:47:33 -04:00
marinus81
d69c803353 Fixed typo in resolution_immediacy values dict 2017-09-05 09:10:45 -07:00
Jordan Borean
eba01d5a8b fix for getting vars and hostvars without specifying the host 2017-09-05 11:14:00 -04:00
Roman Nozdrin
8a2f9b7e28 modules/postgresql_users: Adds user connection limit option to the module. (#28955)
* modules/postgresql_users: Adds user connection limit option to the module.

* Fix code according with PEP8.
2017-09-05 10:23:11 -04:00
Chenjun Shen
1b8f4558f7 add 2 quota variables for openstack: loadbalancer and pool (#26010)
* add 2 quota variables for openstack: loadbalancer and pool. In neutron, they're set to 10 by default. So in the real production environment, you would hit this limit very soon.

* specify version_added for new options
2017-09-05 10:14:12 -04:00
Yaacov Zamir
534c1b8342 Flatten manageiq provider UI (#28967)
* flatten the endpoints arguments into first level

* flatten the endpoints arguments into first level, update the docs
2017-09-05 10:11:29 -04:00
Dag Wieers
a200ecf966 aci_rest: Accept YAML input and validate content input
This PR includes:
- Accept inline YAML, YAML string, inline JSON, JSON string input and
  XML string input
- Validate YAML, JSON and XML input
2017-09-05 00:59:15 -07:00
Dag Wieers
a796391c9b aci_rest: Implement idempotency
This PR includes:
- A new function to modify query strings in URLs
- Add rsp-subtree=modified to post/delete requests
- Test the ACI response for changes and report back
- Return the used URL back to the user
- Remove check-mode support (as it was non-functional anyway)
- Fix a bug related to method=delete and not having content set

This fixes datacenter/aci-ansible#111
2017-09-05 00:17:35 -07:00
Ganesh Nalawade
cc9ed352dd Ensure proper conversion while backing up of junos config (#28958)
* Ensure proper conversion while backing up of junos config

* Minor changes

* Fix review comment

*  Open config backup file in binary mode
2017-09-04 20:12:11 +05:30
René Moser
f23f2468ec openssl_certificate: fix arg docs for not_before (#28985) 2017-09-04 12:31:28 +02:00
Jacob McGill
6e79dfb5f3 ACI_BD_*: Fix missing default for state parameter 2017-09-01 21:59:34 +02:00
Nathaniel Case
8bfdbd0f73 nxos_bgp_neighbor: Fix regex &report warnings (#28888)
* Fix over-detection of log-neighbor-as

* Report nxos warnings

* Update nxos_bgp_neighbor unit tests to test remove-private-as
2017-09-01 15:17:42 -04:00
Abhijeet Kasurde
8027aad4b8 Add support for Python3 in vmware_guest_find
* Remove redundant get_obj method
* Fix testcase
* Correct logic for compile_folder_path_for_object

Fixes: #25984

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-01 11:11:09 -07:00
Brian Coca
c51a4bc57d ansible-config view fixes 2017-09-01 13:08:47 -04:00
Nathaniel Case
de2096e3d0 Move networking provider options to subspec (#28894)
* Add EOS provider options as subspec

* Add IOS provider options as subspec

* Add IOS XR provider options as subspec

* Add Junos provider options as subspec

* Add NX-OS provider options as subspec

* Add Vyos provider options as subspec

* Remove password checks from check_args

* Do the same to aireos, aruba, ce, dellos*, & sros, as they work the same way

* VyOS does not support `transport`
2017-09-01 11:53:51 -04:00
Mike Wiebe
fb1aa54341 Rel240/fix nxos interface ospf (#28898)
* Fixes 28897 nxos_interface_ospf idempotence

* Handle all characters upper or lower with tests
2017-09-01 11:07:18 -04:00
mikedlr
506a30cf3e lambda - more limited exception trap when doing get_function for better errors (#28918) 2017-09-01 09:25:54 -04:00
Nathaniel Case
ae6d27fa29 Revert "Bring nxos_snmp_host in line"
This reverts commit 43247c8dfe.

Revert "Bring nxos_snmp_community in line"

This reverts commit 0df77408d7.

Revert "Clean up nxos_snmp_contact & nxos_snmp_location"

This reverts commit 9e4cdd2fce.

I should probably not be up this early
2017-09-01 08:00:00 -04:00
Nathaniel Case
43247c8dfe Bring nxos_snmp_host in line 2017-09-01 07:43:05 -04:00
Nathaniel Case
0df77408d7 Bring nxos_snmp_community in line 2017-09-01 07:15:24 -04:00
Nathaniel Case
9e4cdd2fce Clean up nxos_snmp_contact & nxos_snmp_location 2017-09-01 07:12:49 -04:00
Ken Evensen
c95e03d213 Added check mode (#28882) 2017-08-31 17:05:19 -04:00
Brian Coca
1d9a62e2bd removed warning that was appearing in every run 2017-08-31 16:26:49 -04:00
Trishna Guha
252efcebf5 module should fail if eos_user is added without configured_password or nopassword or sshkey (#28780)
* module should fail if eos_user is added without configured_password or nopassword or sshkey

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix eos_user unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix eos_user integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-31 15:29:57 -04:00
Sloane Hertel
cef40cb54a [cloud] ec2_group: Allow rule source to be a security group in a peered VPC. (#28876) 2017-08-31 15:27:05 -04:00
rahushen
07c1d7e1ca update nxos_facts to handle n3k power table (#28891)
* handle power table for n3k
2017-08-31 14:59:14 -04:00
Sam Doran
31dc5342f3 Do not try to process an empty metai/main.yml file
If an empty meta/main.yml file exists, ansible-galaxy threw an unhelpful exception. Now, a warning message is printed and the installation does not fail.

See https://stackoverflow.com/questions/45432994/ansible-galaxy-fails-on-dependency-with-empty-meta-main-yml
2017-08-31 13:50:01 -04:00
Martin Krizek
f31696f77f yum: do not use get_exception() (#28826)
Python 2.4 support was dropped in Ansible 2.4.
2017-08-31 13:47:16 -04:00
Giovanni Sciortino
d733f5af06 Add note in documentation and add warning related to retries parameter used without until (#28078) 2017-08-31 11:25:36 -04:00
Adrian Likins
51c0d46056 Fix config base.yml defs with wrong keywords. (#28833)
Mostly vault related items using 'desc' instead of 'description'
2017-08-31 11:12:48 -04:00
Nathaniel Case
74daf2381b Fix nxos_config save parameter (#28838)
Also fix saving in general
2017-08-31 10:01:19 -04:00
Lukas Bednar
2b1a7b7d75 [docs] Fixed example for os_image_fact (#28873)
There is typo in example, which results in error when running it.
2017-08-31 09:12:10 -04:00
Ganesh Nalawade
a6af204cee Fix junos_user purge option failures (#28867)
* Fix junos_user pruge option failures

Fixes #25989

Add seperate handling for purge option which
fetches configured users on remote device
and delete the one not present in aggregate
list.

* Minor changes
2017-08-31 17:46:13 +05:30
Dag Wieers
effa5085ca Remove trailing whitespace 2017-08-31 12:34:59 +02:00
Dag Wieers
1c140cd90d More changes. 2017-08-31 12:34:59 +02:00
Andreas Olsson
f2c0969d27 Clarify the apt_key module's absent state behavior
Currently the apt_key module only supports removing keys based on
explicitly stated key ids. The documentation should reflect that.

Related to #26005
2017-08-31 12:34:59 +02:00
Brock R
07acc579db Removed a force conditional (#28851)
This `if not force:` conditional will never be false.  So there is no need for it.
2017-08-31 04:48:42 -04:00
Sergey Scherbakov
c16d258a27 Fix encoding error on grp.gr_name, which can contain non-ascii chars at domain PCs (#25804)
* Fix encoding errors on grp.gr_name, which can contain non-ascii character at LDAP/AD domain workstations

* fix: utils.to_text() is now used instead of py3-incompatible unicode() method
2017-08-31 03:39:24 -04:00
Abdul Anshad A
272c0ce68c fixes #5732 - Add support for using network ID (#22503) 2017-08-30 17:32:45 -04:00
Jordan Borean
5d35ab00af added info regarding registry acl's (#28814) 2017-08-30 16:28:54 -04:00
Antoine Cotten
fcc6f148db azure_rm_storageaccount module: add 'access_tier' module parameter (#26088)
* Add 'access_tier' module parameter
* Fix condition on 'custom_domain' update
2017-08-30 13:23:18 -07:00
Abhijeet Kasurde
dd9db65a9a PEP8 fixes for smartos module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-30 12:53:50 -07:00
Steve Jacobs
374872cac4 ipa modules never updated to use 'name' attributes such as cn, uid, fqdn. This fixes. (#25851) 2017-08-30 15:36:42 -04:00
Sloane Hertel
70e20bb571 [cloud] cloudformation: create changeset when stack is in ROLLBACK_COMPLETE. Fixes #27853 (#28832)
Fix appearance of failure when creating a cloudformation changeset after a rollback. When creating a cloudformation changeset it shouldn't matter if the last event was. 

_ROLLBACK_COMPLETE since creating a changeset is not an event. Fixes #27853.
2017-08-30 15:27:48 -04:00
Steffen Neubauer
bf73377394 consul: Always fail if no service_name was provided. (#25877)
Fixes a subtile bug introduced in PR #21737
2017-08-30 15:26:36 -04:00
Matthias Bertschy
754ef34acb Add support for ! in parameters (#25891)
Fixes #25684
2017-08-30 15:26:29 -04:00
Fobhep
72d977057f Added datacenter as variable to expample block, since it is a required variable (#25944) 2017-08-30 15:26:23 -04:00
Abhijeet Kasurde
a2c8481395 Add testcases for github_issue (#26309)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-30 14:50:45 -04:00
ppanczyk
c9b74a3af3 Fixed 'only_upgrade' so that the status was not always 'changed' (#25213) 2017-08-30 14:46:52 -04:00
Abhijeet Kasurde
dca887a6dc Use correct variable from response in github_key (#25846)
Before fix, logic tries to access info from 're' library
which raises AttributeError.
Fix adds correct variable usage for accessing next/previous
search results from github api.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-30 14:35:42 -04:00
Felipe Garcia Bulsoni
fd304d9b5b Added support to SAN Manager resource in HPE OneView (#28787)
- Added unit tests
2017-08-30 18:32:43 +02:00
silverwind
5ccbe61258 Fix ansible_virtualization_role fact on CloudLinux (#27191)
CloudLinux and OpenVZ have common roots, but CloudLinux does not really
provide OS virtualization so it should not be regarded as a 'openvz'
system. This change adds a check for the existance of the LVE kernel
module which only exists on CloudLinux.

Fixes: https://github.com/ansible/ansible/issues/26424
2017-08-30 12:25:57 -04:00
Brian Coca
421fa393bc minor doc change to use module ref in rst 2017-08-30 11:16:27 -04:00
Brian Coca
0571014f2f bypass get_hosts and use dictionary directly
removed redundant consistency fallback
inventory reconciliation already takes care of this a priori
removed unused imports
2017-08-30 10:56:45 -04:00
Felipe Garcia Bulsoni
1e785d4117 FcoeNetworkFactsModule for HPE OneView (#28728)
* Add FcoeNetworkFactsModule for retrieving HPE OneView FCoE Networks

- Allow querying for FCoE Network resources in HPE OneView
- Adds unit tests to new module

* Fix "required: no"
2017-08-30 16:51:28 +02:00
Felipe Garcia Bulsoni
6ea2099ee4 EthernetNetworkFactsModule for HPE OneView (#28723)
* Adds EthernetNetworkFactsModule for retrieve HPE OneView

- Allows retrieving Ethernet Network resources from HPE OneView
- Adds unit tests

* Removed required: no
2017-08-30 16:49:57 +02:00
Felipe Garcia Bulsoni
a4ae8536d9 NetworkSetFactsModule for HPE OneView (#28730)
* Add NetworkSetFactsModule for retrieving HPE OneView Network Sets

- Allow querying for Network Set resources in HPE OneView
- Adds unit tests to new module
- Updates oneview_module_loader copyright header to short GPL3 version

* Adding possibility to pass in credentials as parameters

* Removed required false and changed format of filter_by_name declaration

* Updated examples in docs to reflect new way to pass in credentials

- All examples of the oneview_network_set_facts updated to use
credential parameters
- All required=False from oneview base module removed
- Shared docs updated to bring attention to API version being used
2017-08-30 16:46:05 +02:00
Brian Coca
9f12d66506 fix ansible-config view 2017-08-30 10:27:28 -04:00
Christopher Torgalson
7138742bcc Clarifies File module docs re: absent state (#28748)
- The passage beginning "Note that file will not fail..." was slightly
  unclear about the fact that it referred to the behavior of the module
  when `state` is set to `absent`.
- Fixes #23203
2017-08-30 16:00:30 +02:00
Laurent Ribot
b8da5ee5ef Module maven_artifact : manage file dest attributes (#24965) 2017-08-30 10:00:06 -04:00
Jacob McGill
8ffb842963 ACI Config Rollback: Add new module to support config rollbacks in ACI (#28811)
* ACI Config Rollback: Add new module to support config rollbacks in ACI

* Fix EXAMPLES

* Fix whitespace
2017-08-30 07:26:17 +02:00
Jacob McGill
42db02c249 aci_config_snapshot: Module to manage ACI config snapshots (#28784)
* ACI Config Snapshot: Add module to support managing config snapshots on the APIC.

* add comma back

* Fix docstring errors

* Fix typo

* add quotes for notes section
2017-08-30 06:31:14 +02:00
Dag Wieers
47be50a450 mail callback: Much improved version (#28501)
So 5 years after the original version, it's time to give this callback
plugin some needed rework.

This PR includes:
- Reuse same logic for failed, unreachable or Async errors
- Add playbook and task information at the top (easier to find context)
- Improve the sections (ie. indented content)
2017-08-30 05:58:40 +02:00
Jordan Borean
9fdda46aea updated deprecated version based on changelog (#28810) 2017-08-29 23:29:22 -04:00
Jordan Borean
113635e44c win_chocolatey: fixes for proxy support (#28809) 2017-08-29 23:26:13 -04:00
Yaacov Zamir
a41da28f3f New model manageiq manageiq provider (#28273)
* New Model manageiq manageiq_provider

* update docs, port is not required, region is provider-region

* add example of using token

* loop on endpoints instead of creating them one by one

* add alerts endpoint

* Simplify boilerplate and reorganize docs

Tried to make it clearer how the suboptions are laid out.

* Flatten out suboptions in order to make tests pass

These will not render properly in the HTML docs. Simplifying how this module accepts options should be addressed in a future PR.
2017-08-29 22:54:35 -04:00
Dag Wieers
513b582ba3 win_reboot: Use more conforming parameter names (#26466)
This is part of the effort to make windows parameters conform to
other modules. Usually parameters don't include the unit in the
parameter name.

See also #20160
2017-08-29 19:08:12 -07:00
Thomas Stringer
8a6ae51f90 Add support for Azure Functions (#28566)
* add template for az func

* (wip) add basic azure functions support

* add support to add app settings to azure function

* add support for updating based off of app settings

* add integration tests and refactor required param

* support check mode and add facts module

* add test for azure functions facts module

* add necessary checks and registrations for web client

* fix documentation

* change return type from complex to dict

* disable azure_rm_functionapp tests until stable

* remove dict comprehension for py2.6

* pepe has whitespace tumor
2017-08-29 18:54:58 -07:00
Julien Stroheker
fe1153c0af Azure acs module (azure_rm_acs.py) (#28522)
* Adding acs module

* linter issue

* Reduce the VM Size for the int. tests

* Short the name of the cluster

* Fixing the asserts and title

* Fixing VM Scale count in int. tests

* Changing the location of the tests

* trying eastus2

* disabling acs CI tests until stabilized
2017-08-29 17:59:38 -07:00
Dag Wieers
99b7cb2068 win_chocolatey Important fix for non-zero return codes (#28756)
This PR includes:
- Important fix for handling non-zero return code correctly
- Add a version to the DeprecationWarning
- Simplify code by calling Fail-Json instead of catching exceptions
- Deprecate choco-specific result values
- Simplify Remove/Install logic (and fix missing -skipscripts)
- Improve output based on verbosity
- Fix CLI options (causing issues)
- Upgrade chocolatey when older than v0.10.5
- Add (hidden) downgrade functionality
2017-08-29 20:50:37 -04:00
Ozi Boms
3045c58c83 new facts module for dns zone (#28803)
* new facts module for dns zone

integration tests and new module for dns zone facts

* use vairable for domain name

* add nondeterministic piece to domain name

* fix azure_rm_dnszone_facts examples
2017-08-29 17:43:09 -07:00
Ozi Boms
950165ba70 Azure Module for Retrieving Facts for Record Sets (#28805)
* create new module for record set facts

added new module to get facts for dns zone record sets

* use variable for domain name

* correct lint error

* add nondeterministic piece to name

* fix azure_rm_dnsrecordset_facts examples
2017-08-29 17:42:56 -07:00
Dag Wieers
908a4dc4f7 Add option names to Fail-Json and Exit-Json
Small fix.
2017-08-30 01:25:21 +02:00
jhawkesworth
8f9b885113 Windows: A module for creating Toast notifications on Modern Windows versions. (#26675)
* replace duff commit version of win_toast

* change expire_mins to expire_secs and add example showing use of async

* fix metadata version to keep sanity --test validate-modules happy

* code review fixes and change expire_secs to expire_seconds

* add first pass integration tests for win_toast

* win_toast no longer fails if there are no logged in users to notify (it sets a toast_sent false if this happens)

* yaml lint clean up of setup.yml in win_toast integration tests

* improve exception and stack trace if the notifier cannot be created, following feedback from dag

* removed unwanted 'echo' input parameters from return vals; added to CHANGELOG.md, removed _seconds units from module params; updated tests to match
2017-08-29 19:19:18 -04:00
Dag Wieers
4ba7d05e9d win_get_url: ExtendedWebClient with Timeout support (#28755) 2017-08-29 18:52:39 -04:00
Julien Stroheker
d9ee3c09ca Adding check_state support and warning
lint

Update integration test

handle check_mode
handle warnings

Removing the empty tags check

Updating author handle

To use github handle

Changing from warn to fail

disabled tests
2017-08-29 15:36:14 -07:00
Matt Clay
7377dfaa98 Fix metadata version. 2017-08-29 15:31:34 -07:00
Deepakkothandan
8222662d55 added module ec2_snapshot_copy (#26578)
* added module ec2_snapshot_copy

* added RETURN documentation

* Fix copyright for ec2_snapshot_copy and make requested changes.
2017-08-29 18:11:21 -04:00
Calle Kabo
24dfe024ea dnsmadeeasy: Change A and AAAA record checks to allow round robin setup (#28656) 2017-08-30 00:05:10 +02:00
Bruno
4c36286779 Azure managed disks module (#28424)
* First version of managed disks: Multiple methods for creating, one get and one delete

* My name is too cool to be there

* Passing pep8 test

* Create and delete empty working

* Module for testing, lacks sense of setting state changed for unchanged operations

* Checking that actual changes are done to update status changed

* First version of the integration test

* Adding the dictionary to translate the facts, without using serializer

* Adding the serializer to managed disk

* Using native serializer in managed disks facts

* Added DiskSku to pass the whole class to the disk instead of a string

* Bumping version

* Passing sanity checks

* Aparently they Id is not returned by the serilizer

* Integration test

* Latest version

* Using my own serializer, the one in commons is not working for me

* Managed disks module support for ansible

* Updating my github account username in the file

* Sanity checks were missing  in facts and integration test

* Fixing typo in source_resource_uri and removed AzureHTTPErrors

* Update tags are working now

* Integration test for tags

* Added support for tags, added check mode, corrected style
2017-08-29 14:59:06 -07:00
Sam Doran
80c00d3238 Create urlsplit filter (#28537)
* Improve tests for uri filter

* Create URL Split docs

* Add urlsplit filter

* Py3 compatibility

* Use helper method and eliminate query options

* Add options, cleanup output, fix tests

* Update docs

* Add parenthesis to boilerplate import

* Add debug task to tests

* Use exclude option to filter returned values

* Filter out additional option for Python 3
2017-08-29 17:58:44 -04:00
David Peterson
15bfdd634a Update azure_rm_resourcegroup_facts.py (#28573)
Corrected Examples section.
2017-08-29 14:55:45 -07:00
Dag Wieers
eed6a724ea Bugfix to check-mode and async support, and features (#28448)
This PR includes:

- Check-mode support, the module will now report as if it was rebooted,
  without making the actual reboot.
- Async-support, this potentially fixes #23835
- The module now also returns the elapsed time, like the wait_for and wait_for_connection modules.
  This fixes #18108
- Add post_reboot_delay_sec parameter
2017-08-29 14:44:50 -07:00
Thomas Stringer
40b7dffea8 Azure load balancer support (#26099)
* (wip) add partial loadbalancer module

* (wip) add ability to use a public ip for a load balancer

* fix shebang

* add backend address pool to load balancer

* remove unncessary error variable

* add probe support to load balancer

* add ability to add load distribution rule to load balancer

* add nat pool functionality to azure load balancer

* fix pep8 errors from sanity check

* add documentation for load balancer

* refactor imports

* fix license header copyright

* add facts module for azure load balancer

* fix ansible-test failures

* add integration tests for load balancer

* fix metadata version

* add complex integration test to azure_rm_loadbalancer
2017-08-29 14:29:44 -07:00
James Kassemi
48c5b9665a s3_sync: add delete option - fixes #25884 (#28249)
* s3_sync: add delete option - fixes #25884

Add `delete` option. Maintain existing upload strategies. When delete
is requested files present on remote that are not in source list are
removed after upload.

* S3_sync: Delete objects in chunks of 1000 instead of one at a time.
2017-08-29 17:25:30 -04:00
Sertaç Özercan
07fec47a86 Azure Virtual Machine data disks and managed OS disk support (#28132)
* added managed os disk support for vms

* added managed_disk_type to documentation

* added data disk (storage account and managed disk) support

* deleting data disk blob when absent

* update differences

* update docs

* fix test failures

* fix test failure

* multiple data disk support

* fix test failures

* fix test failures

* fix for multiple vm data disk name conflict

* changed data disks naming syntax

* fix data disk caching
2017-08-29 14:24:45 -07:00
Liran Nisanov
0d9f9a246f Adds win_pagefile module (#25605)
* Adds win_pagefile module

* Fixed win_pagefile doc

* Fix win_pagefile doc

* Fix win_pagefile doc variable convention

* Added check_mode

* Changed win_pagefile module&doc to the convention

* added win_pagefile integration tests

* Changed check_mode blocks to whatif, fixed a bug

* Added whatif to set-wmiinstance, changed docs

Added whatif in Set-WMIInstance
Added dots to end of decription lines

* Returns to original state at the end, more tests

Added override and no override integration tests
Pagefiles now return to same state as before at the end of the integration test

* Remove extra line

* Added test_path var to win_pagefile

* Set test_path as 'no' in integration

* Added unit to docs and enclosed exception message

* More granular try-catch blocks

* Added workaround to avoid value out of range

* Deleted wrong line ending

* Changed license to one-line

* Removed space in line ending

* Try to fix python2.6 error

* Try 2 to fix python2.6 error

* Add separating line again
2017-08-29 17:23:13 -04:00
Sertaç Özercan
2ea017a794 Azure Virtual Machine Scale Set support (azure_rm_virtualmachine_scaleset) (#28381)
* initial virtual machine scaleset implementation

* added docs

* fixed formatting

* added update feature for os disk caching and capacity

* add tier

* added return

* add integration tests

* add vmss facts

* add data disk support

* added data disks docs

* update integration test
2017-08-29 14:14:15 -07:00
jacky.chen
75998d3ca3 [cloud] Add the ability to modify shard count to kinesis_stream module (#24805)
* Add the ability to modify shard count to kinesis_stream module

* Fixed an issue in kinesis_stream where update() reports not changed when it is changed

* Remove unreachable message and make the try and catch block shorter
2017-08-29 17:13:46 -04:00
Mike Wiebe
d9fc3def94 Fixes #28779 eth_mode key error (#28782)
* Fixes #28779 eth_mode key error

* Remove unused get_config references

* Addressed PR comment
2017-08-29 17:07:46 -04:00
Julien Stroheker
6b7e38555c Azure Availability Set facts module (azure_rm_availabilityset_facts) (#28378)
* Adding facts module and Int. Tests

* register results

* Upgrading metadata version

* Updating author handle

To use Github handle
2017-08-29 13:48:36 -07:00
Pierre Templier
6d5b936cf4 Add win_chocolatey proxy support (#21886) (#22515)
* Add win_chocolatey proxy support (#21886)

* Make win_chocolatey use proxy to download dependencies

* Write errors results without Set-Attr
2017-08-29 16:39:31 -04:00
nwsparks
61335a42c2 added windows module win_power_plan with integration test (#27966)
* added windows module win_power_plan with integration test

integration testing updated to handle skipping 2008 while testing that
module provides helpful error

* minor docs fix

* my fault, too many spaces
2017-08-29 16:22:06 -04:00
Sophie Herold
ad9e39636e [parted] Fixes incorrect arg spec and check (#27839)
* [parted] Fixes incorrect arg spec and check

* [parted] Fixes spaces around parameter
2017-08-29 22:18:22 +02:00
Artem Zinenko
06fadefbdc [18807] win_firewall_rule module uses HNetCfg.FwPolicy2 COM Object (#27381)
* #18807 win_firewall_rule uses HNetCfg.FwPolicy2 COM object

* Added missing tests

* Added support for InterfaceTypes property

* Added support for EdgeTraversalOptions property

* Added SecureFlags property

* Port ranges are not possible in W2K8

* Added windows version checks

* Fixed doc: removed 'force' option and all notes

* Fixed copirights and docs
2017-08-29 16:18:03 -04:00
opapy
38a5033b48 support ecs task resource for cloudwatchevent_rule (#28495)
* add support ecs

* add role_arn parameters
2017-08-29 16:13:12 -04:00
Ryan S. Brown
9647a4c94f Fix silent kinesis_stream error
In cases where the boto3 call to create a Kinesis stream failed, the
error message was silently ignored because the error message wasn't
returned out of `stream_action`

Also switch `str` calls to `to_native`
2017-08-29 15:31:26 -04:00
Nathaniel Case
64dac346c9 Fix nxos_pim_interface dr-priority handling (#28472)
* Fix nxos_pim_interface dr-priority handling

* Prefer execute_show over `| json`

* Mock get_config

* Fix sparse-mode detection
2017-08-29 14:42:09 -04:00
Jacob McGill
e3b66a8016 ACI Rest: Fix issue with XML response (#28785) 2017-08-29 20:41:17 +02:00
Brian Coca
d740dfdcb6 better wait_for docs on timeout (#28344)
* better waitfor docs on timeout

shippable errors unrelated to docs
2017-08-29 14:33:12 -04:00
Sertaç Özercan
392eeabddb Azure Virtual Machine Extension module (azure_rm_virtualmachine_extension) (#28128)
* added azure vm extensions support

* added auto_update_minor_version and protected_settings

* update docs

* added get_poller_result

* fixed test failures

* remove tags and check mode

* Include Integration Tests

Include Integration Test for azure_rm_virtualmachine_extensions.py

* Correct location for integration test files
2017-08-29 11:32:15 -07:00
Ozi Boms
ddbdf0fd5d Record set module (#28423)
* Record set module

New module to manage DNS Record sets

* fix pylint issue

* fixed problem with commas

* fixed pep issue
2017-08-29 14:10:07 -04:00
Adrian Likins
78bb48a0f6 Add diff mode support to hostname module (#28781)
More or less a rebase of https://github.com/ansible/ansible/pull/23271
2017-08-29 14:04:23 -04:00
emmetfryan
4b0ee9a5e7 Add support for 'KDE Neon' to hostname module (#25262)
Added the class "NeonHostname" to add support for KDE Neon.
2017-08-29 14:03:22 -04:00
dsilakov
b12925fcdb Support Virtuozzo Linux Host in hostname module (#25963) 2017-08-29 14:02:24 -04:00
Sloane Hertel
e05eebcb50 [cloud] Remove custom pagination function in ec2_launchconfig module (#28574) 2017-08-29 13:52:45 -04:00
Ozi Boms
9822db610b Azure DNS Zone Module (azure_rm_dnszone) (#28418)
* New module for dns zone

Added new module and intergration tests for them

* fixed sanity issues

not importing specific moduels/classes; fixed now
2017-08-29 10:49:37 -07:00
Matt Davis
b3f2d1befe expose cloud_environment override in azure_rm modules (#28743)
* Can be set via env, credential profile, or module arg
* Valid values defined by Azure Python SDK, currently `AzureCloud`,`AzureChinaCloud`,`AzureUSGovernment`,`AzureGermanCloud` or any Azure Stack metadata discovery URL.
2017-08-29 13:35:24 -04:00
Jacob McGill
6aaa0c3252 Net Ping: Add new action plugin for *_ping network modules (#28558) 2017-08-29 13:28:58 -04:00
Martin Krizek
e4ea999e6d yum: use envra instead of nevra (#28284) 2017-08-29 13:26:42 -04:00
Ondra Machacek
883aede8ac ovirt_hosts: Fix waiting state of adding a new host (#28771) 2017-08-29 13:01:36 -04:00
Monty Taylor
d548c477c0 Translate openstack inventory from script to plugin 2017-08-29 12:45:41 -04:00
Brian Coca
6f2d3fd7d3 add Local useradd to user (#28420)
* added 'local' option to user

fixes #22140
2017-08-29 12:43:08 -04:00
Brian Coca
e79b6a03fc fix plugin docs broken by previous commit (#28601)
* fix plugin docs broken by previous commit

also removed verbosity requirements, goes back to displaying all data by default

* pepe should be full by now
2017-08-29 12:41:46 -04:00
Adrian Likins
f040a37c9f Fix hostname GenericStrategy.update_current_hostname() (#28774) 2017-08-29 12:37:17 -04:00
mestudd
7b8f113ceb Check for Rules before removing. (#28731) 2017-08-29 12:07:07 -04:00
René Moser
c97f4653be fix typos in various modules and docsite (#28747) 2017-08-29 17:59:41 +02:00
Martin Krizek
98b19f0623 yum: fix changed in group remove 2017-08-29 11:48:29 -04:00
Ken Evensen
65cf3099bb OC module (#25648)
* Submitting OC module.  Squashed commits.

* Docs formatting fixes
2017-08-29 11:34:08 -04:00
rahushen
2cf836772d Add passive_interface property to nxos_ospf_vrf module (#28288)
* add passive_interface property to nxos_ospf_vrf module

* Add version_added for
2017-08-29 11:31:11 -04:00
Jacob McGill
1c4fe510d0 IOS Ping: Add new module to support ping tests from IOS devices (#28557)
* IOS Ping: Add new module to support ping tests from IOS devices

* Add tests

* Add fixtures for ios_ping
2017-08-29 11:21:49 -04:00
Constantin
11b1ad0928 [cloud] Handle client-error exceptions in s3_bucket (#26044)
* Handle exception when capital letter used in S3 bucket name.

* Fix whitespace for PEP8
2017-08-29 11:11:27 -04:00
Giovanni Tirloni
5b21ef3e2c Add check_mode support to hostname module (#27700) 2017-08-29 10:32:01 -04:00
James Cammarata
551a020e78 Fix incorrect use of datetime in letsencrypt (#27672)
Also correctly sets the locale for run_command executions using the module
provided method for setting the locale instead of the locale module in python.
2017-08-29 09:14:48 -05:00
Reid Wahl
0c9c0c59f2 Skip confirmation prompts in gluster_volume (#22402) (#28712) 2017-08-29 10:08:24 -04:00
maorlipchuk
81caa837a4 Use data center UUID/name in storage domains module (#28659)
The ansible action ovirt_storage_domains obligates a data center
name of the attached storage domain as part of its action's arguments,
so it will get the attached_sd_service as part of the functionality
of changing the storage domain status (to maintenance for example).

On the other hand, ovirt_storage_domains_facts retrieves a storage
domain entity with information about the data center which the storage
domain is attached to as a UUID identifier (without name).
So for the user to use that storage domain, fetched from the facts
module, one will have to fetch the DC entity to get the name.

We could use the search which is used today using:
   service.list(search=...)
but that type of search does not support search by Guid.
Therefor this patch provides the ability to use ovirt_storage_domains
action with state change using also a DC UUID instead of a DC name.
2017-08-29 09:50:38 -04:00
Brian Coca
c06f8a3f9b allow pesky 'bridge' facts to bypass facts filter (#28401)
* allow pesky 'bridge' facts to bypass facts filter

fixes #27729, #23577

* I ate pepe
2017-08-29 09:47:40 -04:00
Nathaniel Case
40907d7db2 Fix detection of associate-vrf parameter (#28725) 2017-08-29 09:47:27 -04:00
Brian Coca
4f6b270620 minor fixes to playbook imports (#28422)
* minor fixes to playbook imports

* updated per feedback
2017-08-29 09:46:48 -04:00
Giovanni Sciortino
94707d03e8 pam_limits creates custom file if not exist (#26989) (#28616) 2017-08-29 09:43:34 -04:00
David Peterson
ef58d34e96 Update azure_rm_storageaccount.py (#28605)
Edited kind choice. Fixes #25932
2017-08-29 09:37:38 -04:00
Kai
3251aecd95 Fix leading slashes being stripped from mount src (#24013)
* Tidy mount module for testing

Fix spelling mistakes in comments. I *think* the example for omitting parents
root has the wrong parent ID.

Make mountinfo file a parameter for testing.

* Don't strip leading slash from mounts

The current code does not follow the example, it produces src=tmp/aaa instead
of src=/tmp/aaa. This causes problems with bind mounts under /rootfs.

* Use dictionary to store mounts by ID

Instead of looping over each one to check if the ID matches. This does not
preserve the order of the output on < Python3.6, but that is not necessary.

* Make linux_mounts a dict

Always accessed by 'dst', so avoid looping by just making it a key.

* Add test case for get_linux_mounts
2017-08-29 15:16:53 +02:00
Ganesh Nalawade
a914a39975 Convert value of port and timeout in provider to integer (#28732)
Fixes #28361
2017-08-29 18:40:10 +05:30
Daniel Moore
c342866016 HAProxy: add support for draining connections in maintenace mode (#25887)
* HAProxy: Support waiting for nodes to drain before maint mode

A common task when working with a HAProxy-managed node is to first "drain" it
and then place it into maintenance mode (to be repaired or redeployed).
(Draining such a node consists of preventing new connections from being
established while waiting for active sessions to expire/close.)  This commit
creates a new `drain' parameter for Ansible's HAProxy module, which, when set to
`yes` in conjunction with `state: disabled` and `wait: yes`, causes the module
to attempt to set a node to drain, wait for it to finish draining, and put the
node into maintenance mode.  The action is recorded as a success if these steps
are completed before a maximum wait timeout is reached.

Implements: https://github.com/ansible/ansible-modules-extras/issues/521

Acknowledgments: This is based on user krislindgren's pull request #21420

* Correct how drain option is handled

Previously the `drain` parameter would have no effect, since the `disabled`
state would still immediately place backend servers into maintenance mode.
2017-08-29 07:01:52 -04:00
Thomas Krahn
8e6c0ca599 ipa_group: Fix issue 25660 (#26282) 2017-08-29 08:37:16 +02:00
Ondra Machacek
d0bb2a41d4 cloud: ovirt: add developer README.rst (#22685)
* cloud: ovirt: add developer README.rst

* Copy edits
2017-08-28 20:58:30 -04:00
Dag Wieers
61d2201a2d win_get_url: Add use_proxy, headers and timeout (#26612)
* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation

* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation
2017-08-28 20:11:10 -04:00
Jordan Borean
b84a48caef win_msi: deprecated in favour of win_package (#28741) 2017-08-28 19:53:28 -04:00
Jordan Borean
a695f30411 Added powershell SID utils for shared common code (#27091)
* Added powershell SID utils for shared common code

* rebased from upstream and fixed up module util after change
2017-08-28 19:15:58 -04:00
Jordan Borean
adabefd016 win_package: rewrite, check mode, tests, more check options (#27470)
* rewrite of win_package to enable win_msi deprecation

* fix some minor doc issues

* Removed exe tests

* dag's changes seem to be missing, re-add them

* fixed yaml for return values
2017-08-28 19:03:10 -04:00
Dag Wieers
91e2319806 win_shortcut: Support environment variables/UNC paths (#27089)
This was a regression.
Integration tests needs to be adapted too.
2017-08-28 18:58:14 -04:00
Artem Zinenko
1c958af88b [28017] Integration tests for win_rabbitmq_plugin (#28118)
* Check registry to find RabbitMQ installation path

* Integration tests for win_rabbitmq_plugin

* Added himself to BOTMETA.yml

* Skipped running tests on Windows 2008 SP2
2017-08-28 18:48:10 -04:00
pari-
468e71bf71 npm: fix idempotence (#22238)
* npm: fix idempotence

* Better idempotency fix

More intelligently add --production rather than depending on hard coded order in args list
Cleanup boilderplate imports and license
PEP8 fixes
2017-08-28 17:26:01 -04:00
Brian Coca
f9b3f4f934 make groups magic var dependant on inventory (#28677)
* make groups magic var dependant on inventory

it was overtly restricted by 'host'
minor fixes to test_var_manager.py, need to test other values also

* pepe hates extra blank line
2017-08-28 17:21:11 -04:00
Brian Coca
de6ba4daff add toggle to controle inventory parse as error (#28729)
* add toggle to controle inventory parse as error

also rearranged new inventory options into it's own ini section

* updated with inventory features

also minor fixes/consolidation on deprecated/removed modules

* tweaked settings
2017-08-28 17:17:19 -04:00
Nathaniel Case
862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
2017-08-28 17:09:54 -04:00
Trishna Guha
0a8ec4ddef fix nxos_igmp_interface output (#28735)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-28 17:06:30 -04:00
Michael De La Rue
fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
2017-08-28 16:45:53 -04:00
Trishna Guha
c36c34ef7e fix nxos parse response KeyError (#28602)
* fix nxos parse response

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* use get() method instead
2017-08-28 16:15:20 -04:00
Brayneded
335e804c0c Add junos_vrf vrf-table-label support (#28727)
* Added VRF Table Label Support

* Added table_label docs and set as default=true
2017-08-29 00:44:51 +05:30
Mike Wiebe
3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
2017-08-28 15:00:56 -04:00
Brian Coca
f5743396dc skip all hidden keys, allow exclude list 2017-08-28 12:56:14 -04:00