Commit graph

18543 commits

Author SHA1 Message Date
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