Commit graph

20942 commits

Author SHA1 Message Date
Gianluca
0c96863ec6 Fix for win_get_url module (#39152) 2018-04-24 11:30:03 +10:00
Pierre-Louis Bonicoli
afef20827b openshift_raw & openshift_scale: fix broken import 2018-04-23 17:57:17 -07:00
Jordan Borean
b6afe6946d
Ansible.ModuleUtils.FileUtil - Add ability to test non file system provider paths (#39200) 2018-04-24 10:06:47 +10:00
Tim Rupp
19d229a8e0
Fixes F5 conventions and adds features (#39189)
This patch fixes a number of convention changes in F5 modules.
Additionally, it adds some features to bigip vlan and other modules
2018-04-23 15:46:09 -07:00
Brian Coca
4aac0f5f18
allow configuring sftp/scp executables (#36648)
* allow configuring sftp/scp executables

fixes #36616


also removed dupe test
2018-04-23 18:36:35 -04:00
Adrian Lopez
e7db3c0eba chkconfig localizes messages, ansible fails to recognise
In the particular case of executin "chkconfig --list NAME", ansible
checks the stderr looking for a particular english message.
This message is different in other languages, Spanish for example
(although it have been corrected in the latests versions)

Fixes #29818
2018-04-23 17:44:36 -04:00
Ryan Brown
9c9a70b168 Add retry to ec2_metadata_facts query (#38957)
* Add retry to ec2_metadata_facts query

* Fix conditional to allow for 404 errors
2018-04-23 15:58:35 -04:00
Matt Martz
e79823191a
Add cgroup_memory_recap callback plugin used to profile memory (#38675)
* Add cgroup_memory_recap callback plugin used to profile memory

* Add uuid of task to output
2018-04-23 14:54:36 -05:00
Brian Coca
01e7f44e0d fixy typo 2018-04-23 15:46:15 -04:00
Brian Coca
fe5e6d74af better handle appending \n on stderr
fixes #39007
2018-04-23 15:46:15 -04:00
Brian Coca
e4dbabbef2 make individual bad paths a warning
still error if none of the paths provided was usable

fixes #39044
2018-04-23 15:17:22 -04:00
Tim Rupp
d38ae9b6c9
Adds the bigip_data_group module (#39180)
This module can be used to manipulate bigip data groups.
2018-04-23 11:52:57 -07:00
Matt Clay
c262dbfd30 Use https for links to ansible.com domains. 2018-04-23 11:33:56 -07:00
Rafael Vencioneck
0d1e9bfe90 Adding exos_command cli_conf module (#37775)
* Adding exos_command cli_conf module

* fixing documentation, indentation and metadata_version

* removing doc fragmentation and adding required import

* removing unnecessary code and including company name on short_description

* updating BOTMETA.yml with exos module information
2018-04-23 23:23:09 +05:30
Pierre-Louis Bonicoli
2f535a339c azure_rm_storageaccount: fix broken import 2018-04-23 09:04:03 -07:00
shanumondal
b740d68eaa Fixed bug to set hostTypeIndex correctly at the time of netapp_e_host create. (#39148)
Issue link: https://github.com/ansible/ansible/issues/39143

Correct post_body made by replacing host_type with hostType while creating
host.
2018-04-23 11:31:52 -04:00
saichint
6eecbf10e6 fix nxos_igmp_interface issues (#38752)
* fix nxos_igmp_interface issues

* shippable fix

* fix oif_prefix and oif_source

* shippable fix

* shippable fix

* shippable fix

* add an example for oif_ps

* review comments

* review comments

* more review comments

* fix typo
2018-04-23 20:38:49 +05:30
Will Thames
412373ce8e Improve ec2_ami tests (#38987)
* Improve ec2_ami tests

Ensure that ec2_ami_image_id fact gets set immediately after AMI
creation so that they get torn down even if tests fail

Use YAML anchor to simplify AWS credential passing

Use aws_connection_info to reduce AWS credential boilerplate

Improve exception handling when updating image attributes

Error messages weren't correctly formatted to show image ids.
2018-04-23 07:54:49 -04:00
Loïc Blot
176ebfd471 k8s inventory: add pod nodeport (#39107)
Node port field is not populated on K8S pods, and it's certainely the most useful port to use in pod when we need to interact with ansible outside of the cluster
2018-04-23 07:51:33 -04:00
Alan Rominger
f072e6c15a add newer syntax to detached HEAD check (#38879) 2018-04-23 13:40:54 +02:00
Eitan Akman
80d7e22f5e Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. … (#39074)
* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. Method load_config

* Fix all instances of self.config(self,...
2018-04-23 15:40:34 +05:30
bmfp
4f36d7965e We need to return virtual_facts after VMWare platform detection (#38237) 2018-04-23 05:43:53 -04:00
Martin Krizek
ca164749b4 git: clarify key_file param in docs (#39147) 2018-04-23 11:05:37 +02:00
Tim Steinbach
f61172e6c7 vmware: Add portgroup_portkey and portgroup_key (#38958)
* VMware: apply correct value for datacenter in TC

Signed-off-by: Tim Steinbach <tim@nequissimus.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-23 14:04:35 +05:30
David Passante
7437d6fdc4 cs_ip_address: add a "tags" parameter to ensure idempotency (#39016)
* cs_ip_address: add a "tags" parameter to manage idempotency

* cs_ip_address: add integration tests
2018-04-22 20:13:01 +02:00
Selivanov Pavel
b47c04a70e Fixes #38985 (#39070)
Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration"
2018-04-22 04:03:31 -04:00
Ryan Brown
7544c59a23 Remove ResponseMetadata key from aws_caller_facts (#39102) 2018-04-20 18:31:35 -04:00
Benjamin Ness
d36537513e [ec2_ami] Add missing parameters while handling botocore Exceptions. Fixes TypeError exception (#39105) 2018-04-20 18:30:10 -04:00
Toshio Kuratomi
ce796bc34d Clarify the behaviour of file's src parameter with relative paths
Fixes #21401

Also sdd some more tests to validate file state=link creates a symlink
which points to the file we intended.
2018-04-20 14:12:27 -07:00
Toshio Kuratomi
8eaef34340 Ansible_managed is only available to the template and win_template modules
Update the config docs to note that.

Fixes #37219
2018-04-20 16:07:10 -04:00
Toshio Kuratomi
f332151f59 Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed
2018-04-20 10:04:24 -07:00
John R Barker
9e028ab704
Modules to link relatively to docs (#39081)
* Modules to link relatively to docs

* consistency
2018-04-20 17:35:50 +01:00
Ryan Brown
f428108845
[terraform] Disable input prompts during terraform init/plan/apply (#38842)
Per Hashicorp's [guidelines][1] for automated use of terraform CLI, this PR
adds the `-input=false` option to all the commands executed in the
module. If input is required, this causes a hard failure that will
become a module failure.

[1]: https://www.terraform.io/guides/running-terraform-in-automation.html
2018-04-20 12:28:49 -04:00
Ganesh Nalawade
eebfa66c2b Fix ios and iosxr terminal prompt regex (#39063)
Fixes #38732

Make matching leading newline for cli prompt
optional as there are cases when returned repsonse
for ios/iosx remote host doesn't have newline before
cli prompt.
2018-04-20 10:20:13 -06:00
Matt Martz
afcc9ddf8c
Cache task_vars to speed up IncludedFile.process_include_results (#39026) 2018-04-20 11:18:04 -05:00
Sumit Jaiswal
fd50248463 nios lookup errors out when there are no results #37970 (#39027)
* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open	

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)
2018-04-20 09:14:47 -06:00
John Steel
2e2cfa6232 Update dnsmadeeasy.py (#38731)
<!--- Your description here -->
If you omit the record type on state absent you will get "record_type not yet supported". Although in my experience so far, if you put the record type it still fails to remove the record but it doesn't crash. (#38730)
+label: docsite_pr
2018-04-20 15:42:42 +02:00
Ed Schaller
e6299298f9 Extend interfaces_file to handle sources-directory (#37809) 2018-04-20 07:01:46 -04:00
nekottyo
74420ecadf Fix bool notation in systemd (#39064) 2018-04-20 06:44:48 -04:00
Matthew Stone
d030032b47 Extreme Networks SLXOS Config Module (#38607)
* Adding slxos_config module and supporing util functions.

* Adding slxos module_utils load_config test

* Adding slxos_config module tests

* Removing unneeded required false statements from slxos_config module

* Removing version_aded from slxos_config module

* Removing force and save from slxos config module

* Removing save test
2018-04-20 08:52:20 +01:00
Matt Clay
9e8889bb70
Fix more docs errors. (#39051)
* Fix remaining unknown-document docs errors.
* Fix last toc-tree-missing-document docs error.
2018-04-20 00:24:47 -07:00
Dustin Rue
dbd0272f2e Update proxmox_kvm.py (#39045) 2018-04-20 09:06:53 +02:00
nekottyo
f30698f65d Fix typo in urls.py (#39048) 2018-04-20 09:04:18 +02:00
Martin Krizek
62d2df74b0 apt: fix build-dep idempotency (#38999) 2018-04-20 07:57:14 +02:00
Brian Coca
11c40bcbda forman as inv plugin
updated with newer methods
fixed ssl name to match ansible convention
more options for host info
added vars_prefix
added comments explaining current flow
reformated commentd out code so pep8 can be happy
enabled caching
2018-04-19 17:07:47 -04:00
Thomas Krahn
7320d29851 Update tree.py
Fix wording (commadn instead of command)
2018-04-19 15:51:06 -04:00
Sudheer Satyanarayana
785c660432 Clarify recursive
If recursive is set to yes, the module changes the attributes of the directory recursively even though state: directory is not set.
2018-04-19 12:08:36 -07:00
pcahyna
a81c6668eb File module: correct description of "state" (#36327)
* File module: correct description of "state"

It was probably intended to say "intermediate subdirectories will be created" and not "immediate subdirectories will be created".
2018-04-19 12:04:48 -07:00
Adam Dobrawy
af9d6aadf0 [file] Update description of state (#38451)
* [file] Update description of state
2018-04-19 11:52:43 -07:00
Abhijit Menon-Sen
ede1d6158a Fix typo(-ish)
The «if err» test always passed after #cf938e99926 changed the earlier
assignment to always set err to "\n" if stderr was empty, and so every
script plugin (e.g., ec2.py) started to always report an empty ERROR.
2018-04-19 22:27:48 +05:30
lazouz
a1759b02cd add user password lock option to user module (#37962)
* add user password lock option to user module

* fixup! add user password lock option to user module

* add unlock, set no default

* fixup! add unlock, set no default

* fixup! fixup! add unlock, set no default

* add lock password for FreeBSD, netBSD

* fixup! add lock password for FreeBSD, netBSD
2018-04-19 10:07:49 -04:00
Abhijeet Kasurde
268c682a05 VMware: new module : vmware_cluster_facts (#37105)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-19 05:41:04 -04:00
Olivier Bourdon
87a07e81a9 Fix interface method change (#38996) 2018-04-19 05:05:39 -04:00
Sloane Hertel
e2aa1155ba [ec2_ami] Ensure name or image_id is provided for state=present (#38972)
Add integration tests for backward compatibility and ensuring name or image_id is provided
2018-04-19 09:28:25 +10:00
Matt Martz
cdb79b0e3a
Consider parent also when comparing IncludedFile (#37083)
* Consider parent also when comparing IncludedFile

* Add new tests for IncludedFile and convert to pytest
2018-04-18 17:02:14 -05:00
John R Barker
c1ae1c8251
Fix broken yaml (#38966) 2018-04-18 20:54:14 +01:00
Alicia Cozine
0ebc0b9e5a adds FAQ TOC entry, links & examples to modules (#38706)
* adds FAQ TOC entry, links & examples to modules
* moves link to Notes, corrects examples
2018-04-18 11:41:54 -07:00
Ondra Machacek
aeaf0e358f ovirt: Use id instead of name of Blank template (#38948)
Since Blank template could be renamed we must use it's ID to be sure we
are using the Blank template.
2018-04-18 14:17:11 -04:00
Will Thames
dc09ddfbd5 elb_target_group: use port parameter as default for target port (#38578)
The docs suggest that `port` parameter is the default port upon
which targets listen. As such, a target need only provide a `Port`
key to override the default.
2018-04-18 13:19:54 -04:00
Will Thames
6b970348b1 [AWS cloudfront_distribution] Update minimum protocol versions (#38644)
As per docs, the current set of values is

```
'SSLv3'|'TLSv1'|'TLSv1_2016'|'TLSv1.1_2016'|'TLSv1.2_2018'
```

Fixes #38642
2018-04-18 13:01:30 -04:00
David Gunter
a833281e22 Add Yarn module (#19026)
* Add yarn module based off of NPM module, adjust syntax for install cmd

* Update author list

* Add Return docbloc

* Remove extra var assignment

* Always return output without emojis, small changes for yarn 0.16.1

* Move import line, add ANSIBLE_METADATA, bump version_added

* Updating module format to meet newest lint requirements. Update options and example docs.

* Bring back RETURN block and main() execution.

* All trailing whitespace removed.

* Remove json try/except.

* Add initial pass at setting up Yarn integration tests.

* Add better handling for latest and removal states. Add tests for upgrading a single package.

* Fix issue where state=latest for installing all packages caused failure.

* Set yarn bin to latest version for tests. Fix sanity tests.

* Switch template task to copy task in yarn integration tests.
2018-04-18 08:19:38 -05:00
Ondra Machacek
af8a20d8a1 ovirt: Support removing unmanaged networks (#38940) 2018-04-18 07:28:02 -04:00
Deepak Agrawal
bdd105f740
Handle Duplex parsing on some version of iosxr (#38738)
* Handle Duplex parsing on some version of iosxr

* use re noncapture group for multiple match as suggested by Eric
2018-04-18 13:22:08 +05:30
Martin Krizek
8173602a34
Add expandvars jinja2 filter (#38805)
* Add expandvars jinja2 filter

* Add docs

* Minor edit
2018-04-18 09:29:19 +02:00
Ryo IGARASHI
1cc2aeb40a Update apt.py (#37972)
* Update apt.py

Proposing description of "cache_valid_time" for Ansible 2.4 or greater.
If 'cache_valid_time' is set, 'update_cache' is set implicitly.
This means the logic should be reversed.

 label: docsite_pr

* Proposing the description of "cache_valid_time"..

This commit follows the discussion in #37972.

 label: docsite_pr
2018-04-18 08:41:10 +02:00
Jason Lingohr
d684c51815 Update win_certificate_store.py (#38860)
* Update win_certificate_store.py

Improvements to describe the different destination stores.

+label: docsite_pr

* Update win_certificate_store.py

Whole line needs to be quoted -- lingfish YAML fail.
2018-04-18 14:16:31 +10:00
Jordan Borean
77ef4802f0
win_regedit: stabilise tests (#38912) 2018-04-18 08:11:44 +10:00
Brad Macpherson
11a5671d68 [cloud] New module: AWS EC2 Elastic IP address facts (#38823) 2018-04-17 15:10:54 -04:00
Ryan Brown
44d06f8858
[cloud] Add support for updating IAM role with ec2_instance module (#38812)
* [cloud] Add support for updating IAM role with ec2_instance module

* Add test for updating IAM role
2018-04-17 15:02:46 -04:00
Thierry BOUVET
4117b2dd29 Fix documentation fragments for docker (#38378) 2018-04-17 08:51:56 -07:00
Matt Martz
68e3ff80a7 Error if docker and docker-py are simultaneously (#38884)
* Error if docker and docker-py are simultaneously installed over top of each other. Fixes #36125

* Remove duplicate installed
2018-04-17 11:29:24 -04:00
Nathaniel Case
3b3c72f3e5
Fix use of bytes in cliconf plugins for Python 3 (#37715)
* Remove raw byte-strings from cliconf plugins of supported platforms + edgeos

Remove uses of to_bytes, too

* Update CliConfBase docstring to reflect current position on byte strings
2018-04-17 10:15:21 -04:00
Joshi Friberg
be6628cd3d [docs] Correct misspelled domain in icinga2_host.py (#38867)
<!--- Your description here -->
Just a misspelled link. Updated.
+label: docsite_pr
2018-04-17 10:05:40 -04:00
Will Thames
0b4f92d852 Lambda policy arn (#38863)
* Fix the function_name handling logic for lambda_policy

Switch the logic handling function_names that are ARNs
so that ARNs are correctly handled and detected

* Add tests for lambda_policy function_arn

Ensure that function_arn works.

Needs a reasonable ansible_lambda_role.
2018-04-17 09:53:59 -04:00
Rémy Léone
98fb47b061 Fix deprecated warnings 2018-04-17 06:47:37 -07:00
jjshoe
3664c74cb8 Fix idempotency in apt module (#38858)
* Idempotency fix

Only show a change, if we did indeed update the cache.

* Apply changes from review feedback
2018-04-17 08:33:22 -05:00
saichint
a372142434 fix ntp_auth issues (#38824) 2018-04-17 08:25:05 -04:00
Abhijeet Kasurde
93fbfbe4cf VMware: Check if cluster exists or not (#38517)
This fix adds a check if Datacenter contains cluster but does not
have ESXi server associated with that cluster.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-17 05:28:00 -04:00
Abhijeet Kasurde
efc3f4f824 VMware: handle permission denied while reading facts (#37163)
This fix adds exception handling which is raised when user
does not have correct set of permissions/privileges to read virtual machine
facts especially host system configuration.

Fixes: #37056

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-17 05:18:07 -04:00
ppanczyk
7850dfa9d9 [fix] issue #30638 - onlyupgrade handling (#31577)
Fixes #30638
2018-04-17 03:49:21 -04:00
Ganesh Nalawade
67d561b0c8
Add supported connection in junos module documentation (#38813)
* Add supported connection in junos module documentation

Add supported connection type in junos module doucmentation.

* adds link to platform docs

* makes recommended connection a code snippet

* does this fix banner and command?

* does this fix the rest of the errors?
2018-04-17 10:27:29 +05:30
Mat Wilson
8eb94ccbd5 Add support for dzdo flags Fixes #38766 2018-04-16 23:28:51 -04:00
Jordan Borean
f1c16438c1
win_updates: fix when failed is not present in output (#38856) 2018-04-17 10:45:53 +10:00
Brian Coca
3b7f5aef07 name cron 2018-04-16 19:02:14 -04:00
Brian Coca
135ec86eb5 fix exception on lookup ignore error
no log, so only_log ...
2018-04-16 18:04:52 -04:00
Gaudenz Steinlin
0ea7329553 Fix zabbix_host for Zabbix Server versions < 3.0 (#38665)
The tls_* parameters are not present in Zabbix Server versions prior to
3.0. Thus the API response does not contain these keys and the
zabbix_host module failed. This commit adds checks if the parameters are
present in the API response and otherwise just completely ignores these
parameters. The documentation already states that they are not supported
for Zabbix Server versions below 3.0.
2018-04-16 17:57:57 -04:00
Matt Martz
354aa8d602
Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827)
* Skip self._parent on dynamic, defer to grandparent for attr lookup

* Revert _inheritable

* Add tests for include inheritance from static blocks

Fixes #38037 #36194
2018-04-16 16:46:47 -05:00
jctanner
068b9ac523 keep track of original inventory hostname in play context (#38818)
this change further enables the ansible-vcr project to collect fixtures per host in
situations where the host context is totally lost due to delegation.

* Keep some original pre-delegate values in connection options
2018-04-16 17:16:57 -04:00
Brian Coca
265d838ec9 fix displaying group vars in graph 2018-04-16 15:24:31 -04:00
Brian Coca
5828023e54 bool 2018-04-16 15:22:44 -04:00
Brian Coca
1d58585945 minor fixes, also handle 'values' passed to dscl 2018-04-16 15:22:44 -04:00
Adam Furbee
790a117b21 added support for hidden users on macOS 2018-04-16 15:22:44 -04:00
Matt Martz
f474195a3b
Attempt 4: Prevent reparenting a block with itself (#38747)
* More concisely reparent, ensuring we don't go too shallow or too deep in this process. Fixes #38357

* More explicit reparenting, with a short circuit for a common case

* We need new_block to have a parent, otherwise we lose context with this approach

* Remove duplicate parent assignment

* Change callers of Block.copy to not use exclude_parent=True, when including the parent, exclude tasks
2018-04-16 12:33:08 -05:00
Ondra Machacek
8c49c867d2 ovirt_host_networks: Fix removing of network attachments (#38816) 2018-04-16 10:54:19 -04:00
Brian Coca
bdbb89378f
centralize doc/config plugin lists (#38775)
* centralize doc/config plugin lists

also update list for generation in docsite
added note to ensure they are in sync

* updated shell page to list plugins

added some more docs hinting at plugins being configurable

* fix edit link for plugins
2018-04-16 09:29:49 -04:00
Victor Bocharsky
a30befa609 Remove duplicated "instead" word (#38800)
* Remove duplicated "instead" word

* Actually fix the message
2018-04-16 09:23:43 -04:00
Ryan Brown
40b7a63d1a Add docs to AnsibleAWSModule.client retry settings (#38689) 2018-04-16 08:48:10 -04:00
Abhijeet Kasurde
ae7e391dab Minor fixes in terraform module (#38438)
This fix adds following -
* Check for None or blank value in project_path
* Make terraform binary path as required

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-16 08:43:13 -04:00
Abhijeet Kasurde
9ebad79f40 influxdb: Add condition for retries argument (#38441)
'retries' argument was added to InfluxDBClient in version 4.1.0,
versions lower than this fails if retries are specified.
This fix adds a conditional to check if version is greater than equal to
4.1.0 and depending upon that adds 'retries' option.

Fixes: #38204

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-15 22:05:51 -04:00
Martin Krizek
1ff5e975d9 yum: docs: name is not required (#38758) 2018-04-16 07:15:57 +05:30