Commit graph

23464 commits

Author SHA1 Message Date
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
Adam Miller
c8ed5c29e9 allow update_cache as stand alone operation for yum/dnf (#46183)
* allow update_cache as stand alone operation for yum/dnf

Fixes #40068

Signed-off-by: Adam Miller <admiller@redhat.com>

* make sanity tests happy

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-08 08:39:49 -04:00
Guido Günther
960dfa862b influxdb_retention_policy: don't fail with empty error message (#28792)
On connection errors the influxdb python module raises an exception with
an empty message leading to a fail_json with an empty error message:

    265d14736b/influxdb/influxdb08/client.py (L252)

Fail with a more descriptive error in this case.
2018-10-08 07:23:53 -04:00
Jay Jahns
ffcebd317b Account for boolean OVF properties (#45529)
Currently, Ansible interprets variables with a True|False value as
boolean. This causes the vmware_deploy_ovf module to break, because
it can only accept string values as properties.

This fix checks if a value is boolean, and converts it to a string
if it is. Since integers do not seem to be causing the same error, this
is the only check we appear to need.

After completion, OVF properties that are boolean can be specified as
yes|no or true|false.

Closes: #45528
2018-10-08 06:14:58 -04:00
Felix Fontein
a74774488d docker_container: add port range and IPv6 support for published_ports (#46596)
* Allow port ranges.

* Adding IPv6 support for published_ports.

* Die when hostname is passed instead of IP address.

* Added changelog.
2018-10-08 10:53:24 +01:00
Christian Kotte
ccfa6ff011 VMware: Add check mode support to module vmware_host_ntp (#46268) 2018-10-08 15:11:52 +05:30
Christian Kotte
c4cfeb183f VMware: Add check mode support to module vmware_host_service_manager (#46271) 2018-10-08 15:09:38 +05:30
Felix Fontein
77127d6768 docker_container: allow more mount modes for volumes (#46598)
* Being more strict about volume mount modes.
2018-10-08 10:11:03 +01:00