Commit graph

23671 commits

Author SHA1 Message Date
Nathaniel Case
7844a40046
Update some cliconf plugins (#47141)
* Add `check_all` to many community cliconf plugins
2018-10-18 15:26:20 -04:00
Martin Krizek
096717edc5 ansible-galaxy: fix searching with unicode 2018-10-18 14:59:03 -04:00
Dag Wieers
06eabc9783 reboot: Add timeout in error to help troubleshooting (#47216)
* reboot: Add timeout in error to help troubleshooting

So we've been hit by 'Timed out waiting for boot_time check' and it was
unclear what timeout was used for the boot_time check. By adding the
timeout value it is easier to understand the used value, and verify if a
change to the timeout is reflected in the output.

* Add changelog fragment
2018-10-18 14:42:39 -04:00
Nathaniel Case
3feb6c9e0f
Try to be more verbose with JSON decode errors (#47066)
* Try to be more verbose with JSON decode errors
2018-10-18 12:09:00 -04:00
Toshio Kuratomi
bcd6dbcd65 Remove get_exception from the remainder of the modules 2018-10-18 08:37:04 -07:00
Ryan Brown
18a088c64e
GCP MagicModules bug fixes (#47285)
Closes: #46930 #46929 #46928 #46927 #46926 #46925 #46924 #46923 #46922 #46921 #46920 #46919 #46918 #46917 #46916 #46915 #46914 #46913 #46912 #46911 #46910 #46909 #46908 #46907 #46906 #46905 #46903 #46902 #46901 #46900 #46899 #46898 #46897 #46896 #46895 #46894 #46893 #46892 #46891 #46890 #46889 #46888 #46887 #46886 #46885 #46884 #46883 #46882 #46881 #46880 #46879 #46878 #46877 #46876 #46875 #46874 #46873 #46872 #46871 #46870 #46869 #46868 #46867 #46866 #46865 #46864 #46863 #46862 #46861 #46860 #46859 #46858 #46857 #46856 #46855 #46854 #46853 #46852
2018-10-18 10:55:42 -04:00
Nate Borener
3b5471a734 get_url: Updates documentation for proper use of headers (#47242)
* Fixes the example for headers in documentation

* remove whitespace

* missed a whitespace
2018-10-18 09:47:27 -05:00
flowerysong
0fc639e755 ec2_tag: Fix removing tags without specifying a value (#47228) 2018-10-18 10:13:08 -04:00
Alex Stephen
3f629c426c New GCP Module: gcp_compute_region_disk (#46886) 2018-10-18 10:08:14 -04:00
Alex Stephen
bd62da4e64 New GCP Module: gcp_compute_region_disk_facts (#46887) 2018-10-18 10:06:45 -04:00
Alex Stephen
437f8622d4 New GCP Module: gcp_dns_managed_zone_facts (#46917) 2018-10-18 10:06:14 -04:00
Alex Stephen
b6c99619e4 New GCP Module: gcp_dns_resource_record_set_facts (#46919) 2018-10-18 10:04:01 -04:00
Alex Stephen
aba8ebbbf8 New GCP Module: gcp_pubsub_subscription_facts (#46921) 2018-10-18 10:03:28 -04:00
Alex Stephen
f47cfd2204 New GCP Module: gcp_pubsub_topic_facts (#46923) 2018-10-18 10:01:31 -04:00
Felix Fontein
89f239f187 Fixup of #47046. (#47274) 2018-10-18 14:50:26 +01:00
Ondra Machacek
03bccdda92 ovirt_vm: Check next_run configuration update if exist (#47280)
This PR fixes the update check method so it now check also the next_run
configuration of the virtual machine if it exists.

So if previously the VM was updated with new parameters, and then reset
back, the module didn't set the parameters to be set back in next_run.
This PR fixes it so the next run configuration is set back with proper
parameters.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1639894
Signed-off-by: Ondra Machacek <omachace@redhat.com>
2018-10-18 08:41:54 -04:00
bverschueren
8a671f54dd ovirt_host_network: check for empty user_opts (#46695) 2018-10-18 08:25:54 -04:00
Felix Fontein
32e8251f86 docker_* modules: unify docker module version checks (#47046)
* Unify docker module version checks.

* Improve messages depending on required docker-py versions.

* Linting.
2018-10-18 10:51:58 +01:00
jerrejkw
44044f969d VMware: Add timeout parameter for vmware module vsphere_copy (#46762)
* Enhancement: add timeout parameter for vmware module vsphere_copy
2018-10-18 15:07:39 +05:30
Nicolas Bock
b3dd36bef8 Fix documentation (#47218)
The result variable is `openstack_image` and not `openstack` as incorrectly stated in the description.

+label: docsite_pr
2018-10-18 17:00:08 +10:00
Matt Martz
90d2620939 Remove deprecated os_server_actions alias (#47208)
* Remove deprecated os_server_actions alias. Fixes #44991

* Skip os_server_actions
2018-10-18 16:44:44 +10:00
Jonathan Davila
d3be4f75ca pamd: use module.tmpdir for NamedTemporaryFile() (#47133) 2018-10-18 16:09:07 +10:00
Shuang Wang
0c6513e9b1 add module aws_codecommit to represent AWS CodeCommit (#46161)
* kick off

* done for the day

* beta code and test

* fix a typo

* boto3_conn and boto_exception aren't used in this code, ec2_argument_spec is used but unneeded.

* Returning when find a match avoids doing extra work, especially when pagination is involved

* add new permissions for test

* (output is changed) is preferred over accessing the attribute directly.

* pass the result through camel_dict_to_snake_dict() before returning it.

* AnsibleAWSModule automatically merges the argument_spec.

* deletes the created resources even if a test fails.

* AnsibleAWSModule automatically merges the argument_spec.

* fix typo

* fix pep8

* paginate list_repositories

* specify permissions for test

* cut the unnecessary code.

* add return doc string

* add missed ':'

* fix syntax error: mapping values are not allowed here

* add description for return

* fix syntax error

* rename module name and turn off automated integration test.
2018-10-18 14:32:06 +10:00
Yuwei Zhou
9258ffa478 Fix auto scale create with fix date without recurrence (#47186)
* Fix auto scale create with fix date without  recurrence

* fix indent
2018-10-18 10:52:30 +08:00
Michael Scherer
1be69cd69c Clean up of docker swarm service (#45525)
* Remove redundant assignation of variable

Found with https://lgtm.com/

* Fix check_mode when force_update is used
2018-10-17 17:29:47 -04:00
Stanislas
9cc9ca584a Implement snap packaging module
PR #44939

Fixes #39155
Closes #40852

Co-authored-by: Victor Carceler <vcarceler@iespuigcastellar.xeill.net>
Co-authored-by: Stanislas Lange <angristan@pm.me>
Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2018-10-17 22:59:41 +02:00
Loïc
a661b5f825 Add unsafe_perm flag (#36946) 2018-10-17 21:35:51 +01:00
nikkytub
539f0fee09 Fixed the ssl-certs in netbox plugin (#46543)
* Fixed the ssl-certs in netbox plugin

* Added validate_certs parameter and updated the example
2018-10-17 21:30:47 +01:00
Rémy Léone
8a7a819040 Add support for platform grouping (#45733) 2018-10-17 21:28:20 +01:00
Jordan Borean
6666b070a9
openss: fix various test and Python 3 issues (#47188) 2018-10-18 05:29:18 +10:00
maxstack
c11aba6ed8 [aws] New key_data argument to ec2_win_password module (#45463)
* add key_data argument

The key_data argument helps when using a private key stored in Vault.

* Add "version_added" line

Add version_added line to pass automated tests.

* remove unnecessary nesting
2018-10-17 14:01:59 -04:00
Dani Hodovic
28ba10b877 fix: Parse docker_service scale parameter to int (#45508) 2018-10-17 13:58:09 -04:00
Aaron
9c08ff7a94 [aws] New module: iam_password_policy (#36200)
* Adding iam_password_policy module

* fixing various issues -- error handling, bugs

* fixing various issues based on tests

* renaming dummy var

* fixing type reference in documentation

* adding int tests and other updates

* removing typo

* fixing auth for int tests

* removing int tests for now

* readding integration tests w/ unsupported designation

* removing conflicting group

* Update aliases

* Fix unused variable
2018-10-17 13:56:13 -04:00
Jeffrey Noehren
e685027fb8 spotinst_aws_elastigroup module: adding version to Rancher integration (#46293)
* [src] - adding version to spotinst rancher integration

* [src] - adding sdk version to docs
2018-10-17 13:45:02 -04:00
Sloane Hertel
b808e1bc5c [s3_bucket] Cast tag keys and values to text to match the values returned (#46405)
* Cast tag keys and values to text to match the values returned

* changelog
2018-10-17 13:39:52 -04:00
Chas Schley
7fd31b1da0 [docs] Include required ARN format of actions in ec2_metric_alarm (#46514)
<!--- Your description here -->

+label: docsite_pr
2018-10-17 13:39:03 -04:00
Petr Ruzicka
df57a3fc7a [aws][docs] Replace uses of now-obsolete with_items with loop (#47164) 2018-10-17 12:35:31 -04:00
Brian Scholer
2043aad582 [aws] ec2_instance: don't report changed when instance is already stopped (#46714) 2018-10-17 12:34:37 -04:00
Per-Henrik Lundblom
e744c83808 [aws] ec2_vol_facts: only access volume tags when set (#46801) 2018-10-17 12:31:31 -04:00
David González
b923bf708d [aws] Convert containerPort to int before comparing to avoid jinja2 string-int issues (#39215) (#47195) 2018-10-17 12:29:23 -04:00
Brian Coca
fce9673ac1 Adoc fixes (#47137)
* removed hardcoded loader/plugins list
* updated a few errors to keep orig object
* fix httpapi/cliconf listing
* ansible-doc fixes
* show undocumented as UNDOCUMENTEd
* added missing undoc
2018-10-17 10:48:24 -05:00
Steve Dodd
ee6ab5d5aa Add support for IOS vlan parsing filter. (#40555)
* Add support for IOS vlan parsing filter.
Example usage below:

{% set parsed_vlans = vlans | vlan_parser %}
switchport trunk allowed vlan {{ parsed_vlans[0] }}
{% for i in range (1, parsed_vlans | count) %}
switchport trunk allowed vlan add {{ parsed_vlans[i] }}

* Update test_network.py

Add import statement for filter

* Fixed PEP8 issues relating to comments

* Fix PEP8 issues related to blank lines

* Removed magic numbers for line lengths. This should generalize support
to other IOS-like NOS that use similar methods for listing vlans. The
default arguments for line lengths will still be specific to Cisco IOS.
The unit tests for line length are still specific to Cisco IOS.
2018-10-17 20:50:28 +05:30
Toshio Kuratomi
61ae6424a3 An earlier optimization of ansible-doc -l caused failures. (#47012)
* An earlier optimization of ansible-doc -l caused failures.

The optimization quickly searches the plugin code for short_description
fields and then uses that in the -l output.  The searching was a bit too
naive and ended up pulling out malformed yaml.  This caused those
plugins to be omitted from the list of plugins of that type with
a warning that their documentation strings were wrong.

This change makes the documentation parser aware that the documentation
string could have a relative indent for all of its fields which makes it
robust in the face of this particular problem.

* Don't search for space after short_description:

Any whitespace would be valid.  In particular newline
2018-10-17 11:15:59 -04:00
Ryan Merolle
b9cf09e9d5 network.py filter_plugin typo fix (#47011)
changed return_orginal to return_original in /lib/ansible/plugins/filter/network.py
2018-10-17 19:30:56 +05:30
Fran Fitzpatrick
fc341e01fa Fix junos terminal regex (#47096)
Fix junos stdout regex

Change at hing
2018-10-17 19:29:35 +05:30
Jordan Borean
dd46f953f6
postgresql_user: fix test errors on newer Fedora versions (#47166) 2018-10-17 14:01:11 +10:00
Jorgen
f1f47d9a40 Fixed typo (#47139)
<!--- fixed typo in exclude example -->

+label: docsite_pr
2018-10-17 06:14:02 +10:00
Matt Martz
02f4d0a57f
Ensure that an empty literal list with loop skips the task (#47129) 2018-10-16 13:35:10 -05:00
Mariusz Mazur
79119c62cd Correct wording in k8s module description (#47125) 2018-10-16 11:52:18 -05:00
Abhijeet Kasurde
b48526ca65
VMware: new module: vmware_guest_disk (#36165)
1. Add support for SCSI controller creation
2. Support for SCSI Type
3. Warn about Disk Unit Number 7
4. Allow specifying SCSI controller
5. Allow specifying Disk Unit Number
6. Idempotency
7. Remove disks
8. Do not allow to reduce disk
9. More than 15 disks support
10. No SCSI controller and unit number check
11. Thin support
12. Update documentation and example
13. Multiple Datastore and datastore cluster support
14. Check datatype of disk unit number and SCSI controller
15. Handle disk_size when it is int or float

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-16 18:37:20 +05:30
Fran Fitzpatrick
ab8ed2f84d Add unit tests for junos terminal (#47103) 2018-10-16 15:14:38 +05:30
Joey
c3cc2ecc5b ovirt_storage_domain: Improve logic for state controlling. (#46951) 2018-10-16 05:26:31 -04:00
Matt Hoffman
acbecd5f23 adds redirect configurations and probes to azure_rm_appgateway (#46607) 2018-10-16 10:34:24 +08:00
Wholeshoot
96db9a55e2 bigip_firewall_rule -- missing port_range (#47077)
port_range was missing from bigip_firewall_rule
2018-10-15 16:16:39 -07:00
Matt Martz
c3d5779a41
Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060) 2018-10-15 16:07:52 -05:00
Abhijeet Kasurde
871dd77f2b efs_facts: Documentation update (#46826)
* Update pydoc
* Update module documentation and example
* Add aliases for name as creation_token

Fixes: #28738

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-15 14:46:24 -04:00
Jorge Rodriguez (A.K.A. Tiriel)
150e9db568 rabbitmq_binding: Fix misnamed reference (#47049)
Fix for bug introduced in #18437
2018-10-15 23:54:27 +05:30
Zim Kalinowski
1c520ff70b adding postgresql firewall rule (#45077)
* adding postgresql firewall rule

* fixed test problems

* add state into the doc

* use lropoller

* updated samples and some naming
2018-10-15 10:17:42 -07:00
Zim Kalinowski
ca5460dd86 Adding mysql firewall rule module (#45074)
* adding mysql firewall rule

* fixed mysql firewall rule

* use mgmtclient from common

* fix pep8

* small updates

* minor docs fix
2018-10-15 10:11:26 -07:00
Shuang Wang
d302485f99 option [others] of get_url is unnecessary (#47005)
* parameters [others] of get_url is unnecessary

* delete a blank line

* test

* delete ignore

* Update get_url.py
2018-10-15 09:24:48 -05:00
Sumit Jaiswal
8a6059ad0a
revert 46677 changes (#47044) 2018-10-15 15:35:55 +05:30
Mike Healey
c73b2aa415 VMware: Added secure boot enable/disable to vmware_guest_boot_manager. (#46717)
* Added secure boot enable/disable to vmware_guest_boot_manager.  Also added its state to facts
* VMware does not support secure boot when boot_firmware is bios.  Add some guardrails to protect the user from misconfiguration
* Address review comments
2018-10-15 15:02:01 +05:30
Abhijeet Kasurde
ebeb788117
VMware: Provide facility to specify path for template (#38031)
When multiple virtual machines or templates are found in environment,
module needs folder path. This fix adds facility to specify folder path
for template or virtual machine if multiples are found.

Fixes: #37087

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-15 14:59:48 +05:30
Ganesh Nalawade
5394638047
Fix in confirmed_commit capability in netconf_config modules (#46964)
* Fix in confirmed_commit capability in netconf_config modules

Fixes #46804

*  If confirm value is greater than zero or confirm_commit option is set and confirmed-commit
   capability is not supported but Netconf server only in that case fail the module

* Update confirm-commit flag

* Minor changes
2018-10-15 11:34:35 +05:30
Sumit Jaiswal
9ddceaf78d
Fix to resolve bug 46671, which now handles checking for Nonetype connection prompt (#46677)
* added Nonetype check

* implemented review comment

* review changes
2018-10-15 11:21:06 +05:30
Christian Kotte
849912c01b VMware: Improve module vmware_host_datastore (#45652)
* Don't execute mount or umount in check mode
* The datastore was mounted or unmounted when you execute the playbook in
check mode.
* Test if running in check mode before mounting or unmounting the
datastore.
* Add support for NFS v4.1 datastores
2018-10-14 18:13:36 +05:30
Arun prasath
23b60d843e Fixes #35284 - Added ability for os_nova_flavor to update existing flavors (#37170) 2018-10-13 23:06:29 -04:00
Arun prasath
5b3e009198 Added ability to create Openstack users without password (#37338) 2018-10-13 23:04:44 -04:00
Dag Wieers
5fa51f3cd8 Add ConnectionError too 2018-10-13 21:47:13 +02:00
Dag Wieers
820f9f9c1e Move requests import into pypsrp try-block 2018-10-13 21:47:13 +02:00
Dag Wieers
6693adc9b2 WinRM/PSRP: Add support for unreachable
Currently PSRP connection always fail, even if the system is not
reachable. This PR fixes this.
2018-10-13 21:47:13 +02:00
Thomas Hughes
db304c27c7 Fix spelling issue (#46982)
Corrects spelling from `fo` to `of` for `storage_blob_name`

+label: docsite_pr
2018-10-13 09:38:07 +05:30
Matt Clay
3033fd96b0
Move unit test compat code out of lib/ansible/. (#46996)
* Move ansible.compat.tests to test/units/compat/.
* Fix unit test references to ansible.compat.tests.
* Move builtins compat to separate file.
* Fix classification of test/units/compat/ dir.
2018-10-12 20:01:14 -07:00
Sandra McCann
c44860057e update sros metadata to certified (#46981) 2018-10-12 14:48:16 -05:00
Jonathan Oddy
f2dccb90e8 Restore SIGPIPE handler to DFL on POpen
Python sets the SIGPIPE handler to SIG_IGN. On execv() signal handlers are
reset to their defaults, EXCEPT those that are SIG_IGN which are left ignored.
In Python 3 subprocess.popen explicitly resets the SIGPIPE handler to SIG_DFL,
but unfortunately in Python 2.7 it does not. This leads to subprocesses being
executed with SIGPIPE ignored. This is often a problem with bash scripts which
rely on SIGPIPE to terminate commands in a pipe, but can easily be a problem
with other applications.

This implements the Python 3 behaviour for Python 2.7 by using a preexec_fn.
2018-10-12 12:31:24 -07:00
Sandra McCann
1015c50034 update cyberark metadata to certified (#46978) 2018-10-12 13:54:48 -05:00
Sandra McCann
4513298971 Change netapp ontap and elementsw modules to certified (#46974)
* netapp ontap and elementsw modules to certified
2018-10-12 13:54:23 -05:00
Sandra McCann
f138f7019f Mark NIOS modules as certified (#46973)
* updated NIOS community modules to certified

* moved remaining nios modules to certified
2018-10-12 13:53:52 -05:00
Sandra McCann
dc3407eaeb changed F5 module metadata to certified (#46849) 2018-10-12 10:57:28 -05:00
Matt Martz
a06a5ded61
Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833) 2018-10-12 10:43:09 -05:00
Sandra McCann
0dd17b521f change UCS modules to certified (#46848) 2018-10-12 10:35:52 -05:00
Brian Coca
9e0c2a658f
better information for user from inventory plugins (#46766)
* better information for user from inventory plugins

 - use foreman as example
2018-10-12 11:27:29 -04:00
Brian Coca
a5bd84758a simpler/shorter option names for user
- internally we can keep long names, but user should not require extra typing
2018-10-12 11:23:42 -04:00
Brian Coca
3453dace85
use to_text instead of str in async_status (#45990)
* use to_text instead of str in async_status

* used to_native instead as per feedback
2018-10-12 10:04:37 -04:00
Brian Coca
643ff29d2d
use ansible json encoder for results in callbacks (#46830)
* use ansible json encoder for results in callbacks
2018-10-12 09:37:56 -04:00
Christian Kotte
ade5d938c3 VMware: Improve module vmware_host_config_manager (#46264)
* Improve module description
* Add check mode support and change message
2018-10-12 15:16:12 +05:30
Gustavo Muniz do Carmo
739a129322 ldap_attr: typecast values to list (#46818)
Adding a value to an attribute or removing a value from an attribute of a LDAP entry throws the exception TypeError: object of type 'filter' has no len()
2018-10-12 15:06:06 +05:30
Will Thames
b772485d97 Ensure that k8s_facts always returns resources key (#46733)
Fix bug returning `items` key if NotFound exception is hit
2018-10-12 05:11:48 -04:00
Alb0t
e2b9c36080 Add Alibaba to RedHat family list. (#46828) 2018-10-12 10:23:03 +02:00
Matt Davis
3e18bbec34 remove cross-module imports
* duplicated code instead; use module_utils if code-sharing needs increase
2018-10-11 19:54:54 -07:00
Shuang Wang
761f99a4e3 add sample for follow parameter of copy.py (#45765)
* add sample for follow parameter of copy.py
2018-10-11 18:48:54 -07:00
Sandra McCann
e43869cca9 mark Cisco ACI modules certified (#46842) 2018-10-11 15:35:12 -05:00
Sandra McCann
6479cb6a4a mark Cisco ACI modules as certified (#46841) 2018-10-11 15:34:35 -05:00
Alicia Cozine
e601521708 all amazon modules are community maintained (#46840) 2018-10-11 15:38:54 -04:00
Alicia Cozine
561a5b1adc all azure modules are community maintained (#46839) 2018-10-11 15:37:42 -04:00
cahlchang
1cce11b39c [AWS] Support check mode in aws ec2_instance module (#46774)
* fix checkmode

* Added checking test to existing test playbook

* Added test for check mode
2018-10-11 14:21:01 -04:00
Jose Delarosa
81640a2c67 Provide flexibility when retrieving facts (#46148)
* Provide flexibility when retrieving facts

* Check if keys exist before trying to read
2018-10-11 14:17:13 -04:00
Justin England
0bc5b799a6 Update win_scheduled_task.py (#46720)
* Update win_scheduled_task.py to document that the duration of a task trigger can be null, which will cause it to run indefinitely - docs update makes use of suboptions

* Add a fix for the validate-modules schema
2018-10-11 13:16:25 -05:00
Adam Miller
fd97c8e56c
fix yum proxy username/password handling (#46291)
Fixes #46249

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-11 12:51:40 -05:00
Peter Oliver
40fb992a6f Locate prtdiag even when absent from /usr/bin (#44113)
* Locate prtdiag even when absent from /usr/bin

On Solaris 8 hosts, this prevents fact collection from aborting with:

    Argument 'args' to run_command must be list or string

* Lint fix.

* Style: pass /usr/platform/.../sbin as optional path to get_bin_path().
2018-10-11 13:41:06 -04:00
Rémy Léone
46ed120778 Fix scaleway_compute dynamic_ip_required (#46256) 2018-10-11 18:28:16 +01:00
Rémy Léone
faf262977e Add virtualization devices in the inventory (#45728) 2018-10-11 18:09:01 +01:00
Rémy Léone
a8925484c9 Use constructable with NetBox dynamic inventory (#45913) 2018-10-11 18:01:29 +01:00
Brian Coca
b2ac745461 add note to inform awx team on change 2018-10-11 12:45:53 -04:00
Sloane Hertel
f3d5ebb355 add more consistent extension matching for inventory plugins (#46786)
* Add consistent extension matching for inventory plugins that support YAML configuration files

* Document extension matching expectations
2018-10-11 11:06:52 -05:00
Brian Coca
e3882ad6f6
added friendlier aliases for auth options (#46816)
* added friendlier aliases for auth options
2018-10-11 11:34:41 -04:00
Shuang Wang
cd1faca6e0 copy - support recursive copying with remote_src (#43998)
* Allow copy module to work with recursive and remote_src #14131
2018-10-11 08:18:44 -07:00
Adam Miller
fb6e91bf98
yum module properly check for None config_file (#46641)
* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-11 10:11:34 -05:00
Anil Kumar Muraleedharan
d0e89bc1bb Lenovo finetune modules (#46623)
* Making username password etc non mandatory as we use persistence connection.
Some documentation fine tuning also done.

* To update version which was tested against.

* Adding Bacon switch (NE0152T) to device rules

* Qalthos Review catch

* Updating version

* Changing documentation to add Bacon switch. This is effective since 2.8
2018-10-11 09:49:49 -04:00
Johannes Brunswicker
b3063e37be Convert results with to_native in consul_kv plugin (#46551)
* #42851 convert results with to_native

* added missing ANSIBLE_METADATA

* removed unneeded brackets

* * replaced to_native with to_text to avoid getting bytecode
2018-10-11 09:35:49 -04:00
markafarrell
4c169a1a6d Enable HTTP Authentication for url lookup (#43467)
* Add url_username and url_password options for url lookup

* Update url.py

Fix documentation

* Fix options documentation 

Default value for url_password and url_username is None not an empty string

* Add version added to documentation

* Break command over multiple lines to fix linting

* Fix more linting

* Update version_added in url.py to 2.8
2018-10-11 09:30:56 -04:00
dangoscomb
fb72a5424c nmcli: fix vlan connection modification Fixes #42322 (#42415)
* ensure optional items are set to empty strings rather than not presented
fix syntax of vlan modification command

* extended tests for nmcli
2018-10-11 07:52:18 -04:00
Christian Kotte
2230f40041 VMware: Add check mode support to module vmware_host_firewall_manager (#46266) 2018-10-11 15:54:30 +05:30
Christian Kotte
0bc2e6795d VMware: Gather extended datastore facts (#46546)
* Add datacenter_name alias
* Add check mode support
* Add extended datastore information
2018-10-11 15:52:30 +05:30
Scott Xu
db69f46cf9 Update nso_action.py (#46763)
* Update nso_action.py

The module's name should be nso_action.

* Update nso_action.py

Fixed the input field in the example.
2018-10-11 14:07:59 +10:00
Adam Miller
ad405fc21e yum module handle list optional empty strings properly (#46634)
Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-10 18:49:24 -04:00
José R Cordones
d3cc2f803a Update eos_config.py (#45810)
Switches will accept the previously used syntax for /32 ACL entries, but they get changed to host ipaddress in the config file.
This results in the config check failing every time (permit ip 1.1.1.1/32 any log != permit ip host 1.1.1.1 any log), resulting in the ACL getting re-created on every single run of the Playbook.
Making this proposed change to the example will make it work in an idempotent manner.
+label: docsite_pr
2018-10-10 16:47:11 -04:00
Brian Coca
8743e6ae2e remove default from delegate_facts to inherit (#45492)
* remove default from delegate_facts to inherit

fixes #45456

* test delegate_facts

* added note about inheritance and defaults

* yamllint
2018-10-10 15:10:23 -04:00
Ganesh Nalawade
58aaf53271
Fix netconf module_utils dict changed size issue (#46778)
Fixes #46755

Use list() to copy the keys of attribute dict
while iterating over attribute dict.
2018-10-11 00:01:17 +05:30
Abhijeet Kasurde
32397531d0
lambda: fix unboundLocalError in lambda (#46729)
This fix initializes current_version to None so that
module proceeds in check mode.

Fixes: #46654

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-10 22:57:58 +05:30
Brian Coca
80d977bac6
manage levels for 'multiple included lists' (#46359)
* manage levels for 'multiple included lists'

fixes #46343
2018-10-10 12:34:58 -04:00
akatch
878599fd9f Do not append msg to verbose tasks (#46721) 2018-10-10 12:11:43 -04:00
anasbadaha
2c24cfb401 Add support for IGMP interfaces on onyx switches (#46218)
Signed-off-by: Anas Badaha <anasb@ufm-host08-004.mtr.labs.mlnx>
2018-10-10 11:42:47 -04:00
gardouille
0d824ad777 Add xz-utils requirement (#46159)
* Document xz-utils requirement for deb parameter of apt module
2018-10-10 09:45:58 -05:00
Abhijeet Kasurde
d76a84a6c8 [do
* Add U() in front of URL
* Add period at end of statement
* Spell check

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-10 10:44:17 -04:00
Dominik Holler
452a4ab781 Fix os_router ignores enable_snat: no (#45921)
If enable_snat is False, this should be used to build the
request, because the default value in the OpenStack Networking
API is True.

Fixes the issue #45915.
2018-10-10 10:01:45 -04:00
Abhijeet Kasurde
5351a00445 Correct usage of message in ConnectionError (#46566)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-10 19:21:20 +05:30
Paul Neumann
39673dfc37 ios_facts: Fix minor aesthetical glitches (#46577)
* ios_facts: Fix LLDP gathering without neighbors

When LLDP is enabled but no neighbors are present, the following
structure is generated:
...
            "ansible_net_neighbors": {
                "null": [
                    {
                        "host": null,
                        "port": null
                    }
                ]
            },
...
If we are not able to find any relevant LLDP information, bail out early
so cases like shown above are handled more gracefully.

* ios_facts: Remove trailing space in lineprotocol

Some Cisco devices (at least CSR1000V 16.6.4) add a space after the
line protocol. This causes the space to be present in the result of
fact gathering:
            "ansible_net_interfaces": {
                "GigabitEthernet2": {
...
                    "lineprotocol": "up ",

Be more clear about scanning the output to avoid this behaviour.
2018-10-10 08:02:14 -04:00
Sebastien Pouplin
4ba0cfeb4b Added iostype details in network ios_facts module (#46599) 2018-10-10 08:00:25 -04:00
Thomas Picariello
62d131716b Do not try to encode metadata if it is None (#46739)
* Do not try to encode metadata if it is None

* Add changelog fragment

* Fix fragment missing EOF line
2018-10-10 12:14:47 +02:00
AndyG
fcef4fdb26 ec2_asg: adding explanation of replace_all_instances (#46694)
* adding explanation of replace_all_instances

How does "replace_all_instances" work? does it increase the number of instances by 1 in the Load balancer and it scales in a server and waits for it to complete its health check, OR   does it terminate a node a that causes an autoscale event to happen and then adds a new server?
+label: docsite_pr
2018-10-10 19:59:27 +10:00
Jorge Rodriguez (A.K.A. Tiriel)
e7ddff1928 Rabbitmq: Enable communication to management API over HTTPS (#18437)
* Enable communication to management API over HTTPS.
* Specify version added tags to new parameters
* Set proper parameter type.
* Corrected version_added numbers.
* Extracted commons to ansible utils.
* Fix PEP8 error
* Fix documentation extension syntax.

Fixes #22953
2018-10-10 09:55:08 +05:30
Nick
5e67981dd2 fix: check execute_lock boolean, not lock string var (#45329) 2018-10-09 22:46:00 -04:00
bjakubiak
e50de2c35f Fixes #23456 (#35171) 2018-10-09 19:04:51 -04:00
Eitan Adler
063a9dd911 Reduce noise in warnings from ansible (#40754)
When python is compiled in debug mode, or certain command line flags are
passed, python issues helpful warnings to let users know of files opened
by not closed.

This can be fairly spammy on an ansible run.  This change reduces the
number of such warnings by a factor of 10.
2018-10-09 18:53:03 -04:00
Joey
3c7a503a53 ovirt_storage_domain: Fix error message formating (#46678) 2018-10-09 10:01:05 -04:00
lwm
8d0f823de0 Add a Linode v4 dynamic inventory plugin. (#45902)
* Add a Linode v4 dynamic inventory plugin.

Closes https://github.com/ansible/ansible/issues/44721.

* Use the latest API for accessing host variables.

References:

  * https://github.com/linode/linode_api4-python/issues/141

* Minor docs formating
2018-10-09 12:54:31 +01:00
Ondra Machacek
23c2dc3b2a ovirt_disk: Add wipe_after_delete option (#46679) 2018-10-09 06:05:11 -04:00
Cyril Jouve
05ca828619 create sources.list.d directory if needed (#36981) 2018-10-08 18:35:05 -04:00
Pilou
955579cd72 rabbitmq_user: 'node' parameter: add default value (#38156)
* Remove unnecessary workaround

* add test: set RABBITMQ_NODENAME environment variable

The following error occurs:

  TASK [rabbitmq_user : Add user] ***
  fatal: [testhost]: FAILED! => {
    "changed": false,
    "cmd": "/usr/sbin/rabbitmqctl -q list_users",
    "rc": 69,
    "msg": "Error:********@c65c2bc59398'. Please see diagnostics information and suggestions below.\n\nMost common reasons for this are:\n\n * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)\n * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)\n * Target node is not running\n\nIn addition to the diagnostics info below:\n\n * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more\n * Consult server logs on node test@c65c2bc59398\n\nDIAGNOSTICS\n===========\n\nattempted to contact:********@c65c2bc59398\n * effective user's home directory: /var/lib/rabbitmq\n * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==",
    "stderr":  [...],
    "stderr_lines": [
      "Error: unable to perform an operation on node 'test@c65c2bc59398'. Please see diagnostics information and suggestions below.", "",
      "Most common reasons for this are:", "",
      " * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)",
      " * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)",
      " * Target node is not running", "",
      "In addition to the diagnostics info below:", "",
      " * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more",
      " * Consult server logs on node test@c65c2bc59398", "",
          "DIAGNOSTICS", "===========", "",
          "attempted to contact: [test@c65c2bc59398]", "",
          "test@c65c2bc59398:",
      "  * connected to epmd (port 4369) on c65c2bc59398",
      "  * epmd reports: node 'test' not running at all",
      "                  other nodes on c65c2bc59398: [rabbit]",
      "  * suggestion: start the node", "",
      "Current node details:",
      " * node name: rabbitmqcli2@c65c2bc59398",
      " * effective user's home directory: /var/lib/rabbitmq",
      " * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==", ""
    ],
    "stdout": "",
    "stdout_lines": []
  }

* node parameter: fix default value

'rabbit' is the default value mentioned in the module documentation.
2018-10-08 18:34:08 -04:00
Benoit Dunand-Laisin
19deb6b49e Fix python 3 compatibility (#41645) 2018-10-08 18:30:05 -04:00
Dan Quinn
a3a595e60a merge conflict (#25235) 2018-10-08 18:08:55 -04:00
Tom 'Biwaa' Riat
6ad9e1c3de feat(apt): add -f --fix-broken option to apt module (#27162) 2018-10-08 18:07:52 -04:00
Major Hayden
bf8863eeb3 Docs: Fix ftype list in sefcontext module (#46364)
Add the list of file types to the `sefcontext` module documentation.
2018-10-08 14:39:49 -05:00
Daniel Jakots
753711cd12 Register missing parameter reboot_timeout (#46585) 2018-10-08 14:56:40 -04:00
Sandra McCann
27132cd0b8 added jinja2 example (#46445)
* added jinja2 example
2018-10-08 13:50:45 -05:00
Matt Clay
a11f631ee4 Python 3.8 collections compatibility fixes.
Includes a new pylint blacklist plugin to prevent regressions.
2018-10-08 11:26:37 -07:00
Colin McCarthy
84a40b71c2 Added (Define Values From CSV File) to example section (#46620)
Adding a new example demonstrating setting facts from a CSV file, from a real-world network use case.
2018-10-08 10:48:46 -05:00
Abhijeet Kasurde
39e71bb7ce Plugin: check if executable exists in local connection (#46201)
This fix checks if executable exists in local connection specified using
ANSIBLE_EXECUTABLE variable.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-08 09:40:27 -04:00
Evgeni Golov
7c66c90afc introduce module_utils.urls.fetch_file as a wrapper to download and save files (#19172)
* module_utils.urls: add fetch_file function

* apt: use fetch_file instead of own download()

* unarchive: use fetch_file instead of own codecopy

* apt: add test for deb=http://…

* unarchive: add test for a remote file download and unarchive

* yum: replace fetch_rpm_from_url by fetch_file

* use NamedTemporaryFile

* don't add a dot to fileext, it's already there
2018-10-08 14:41:57 +02:00