Commit graph

21483 commits

Author SHA1 Message Date
Ganesh Nalawade
354454ad58
Fix aruba initial prompt issue (#39195)
Fixes #33414

Issue a newline when the initial connection
results in a prompt and expects user input.
2018-04-26 11:06:27 +05:30
Toshio Kuratomi
0b643009db Winrm encoding in exception fix (#39333)
Exceptions need to use native strings.  We need to make sure we're
combining native strings with native strings.
2018-04-26 07:51:53 +10:00
Alex Stephen
dd735b2122 Bug fixes for GCP Dns Managed Zones (#38631) 2018-04-25 16:20:55 -04:00
Jordan Borean
f8853d83e3
windows: removed deprecated features in 2.6 (#38930)
* windows: removed deprecated features in 2.6

* Comma surgery.
2018-04-26 06:13:37 +10:00
Alex Stephen
8d77c6cc16 Adding support for GCP Compute Https Health Checks (#37437) 2018-04-25 16:11:32 -04:00
Will Thames
12f2b9506d [aws]Add VPC configuration to ECS modules (#34381)
Enable awsvpc network mode for ECS services and tasks and
their underlying task definitions

Improve test suite to thoroughly test the changes

Use runme.sh technique to run old and new versions of botocore to
ensure that the modules work with older botocore and older network modes
and fail gracefully if awsvpc network mode is used with older botocore
2018-04-25 15:41:04 -04:00
Alex Stephen
58bf4ae611 New module: GCP Storage Buckets (#37288) 2018-04-25 15:26:13 -04:00
Alex Stephen
39bf7d3655 New module: GCP Compute HTTP Health Checks (#36329) 2018-04-25 15:25:23 -04:00
Ryan Brown
4dfef45449 [s3_bucket] Increase timeout on versioning check, as it seems to take longer to propagate than other properties (#39325) 2018-04-25 15:24:15 -04:00
Rémy Léone
e45a5e1c86 Add a Scaleway dynamic inventory plugin (#38739) 2018-04-25 13:35:54 -04:00
Alberto Murillo
0f3480d359 docker_image: Fix idempotency of pull (#31956)
when pulling an image with force=yes the task was marked as changed
everytime even when the image hasn't changed.

This was due to a bad comparison of the image tag before the pull
and after the pull.

Fixes #22596

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2018-04-25 12:58:29 -04:00
Ryan S. Brown
d13eccb7bc [aws] fix excepted/expected misspelling 2018-04-25 12:48:05 -04:00
Zeust the Unoobian
db88cb8d8f Add note about sefcontext doing no restorecon (#39076)
* Add note about sefcontext doing no restorecon

To someone like me who is relatively new to SELinux, setting the
"reload" option to yes might suggest that a restorecon is automatically
executed after the semanage call, making the new file context effective
immediately. I have found out that this is not the case and would like
to clarify this to others.

+label: docsite_pr

* Replace note by one suggested by reviewer

Reviewer dagwieers suggested a better notice text during review of my
original one, giving recommendations about what to do to actually get
the newly chosen SELinux context applied to the file.
2018-04-25 18:05:03 +02:00
Alicia Cozine
fdcf8c7f74
removes broken link to old module name (#39249) 2018-04-25 09:23:47 -05:00
Alicia Cozine
0d38c80395
fixes broken links in Amazon module docs (#39248) 2018-04-25 09:22:49 -05:00
Tim Rupp
fb264281de
Adds various features and fixes (#39271)
* a refactor of pool member and node modules to be inline with current f5 conventions
* Added priority_group_activation to pools
* various other small convention fixes and bug fixes
2018-04-25 07:16:11 -07:00
Martin Krizek
1c49cc4377
Actually check for import_role when loop detected (#39218) 2018-04-25 14:50:20 +02:00
Martin Krizek
2e6a917f9d
template: minor docs fixes (#39283) 2018-04-25 11:51:57 +02:00
saichint
1afec5a48e fix nxos_snmp_community issues (#39258) 2018-04-25 13:16:41 +05:30
Trishna Guha
86817cdd52
Add aggregate example in nxos_l2_interface module doc (#39275)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-25 12:56:54 +05:30
Trishna Guha
6db3f522c8
sub-interface support for nxos module (#37392)
* nxos sub-interface support

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

* update l3_interface test

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

* Add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-25 12:45:56 +05:30
Tim Rupp
9940b5db9c
Adds DNS profile module for BIGIP (#39270)
This module can be used for managing DNS profiles on a BIGIP
2018-04-24 21:05:30 -07:00
Tim Rupp
20d5b04ac4
Adds udp profile module for bigip (#39269)
This module can be used to manage UDP profiles on a bigip
2018-04-24 20:35:42 -07:00
Tim Rupp
434ad97c39
Adds tcp profile module for BIGIP (#39268)
This patch adds a module to support manipulation of TCP profiles
on a BIGIP
2018-04-24 20:05:31 -07:00
Tim Rupp
256b5535ec
Various fixes to F5 modules (#39255)
* Adds gnat provisioning to bigip_provision
* Adds special handling for AFM in bigip_provision
* Add device rebooting for provisioning as necessary
* Refactored route domain module to be inline with current f5 conventions
* Minor refactors across modules
2018-04-24 19:49:52 -07:00
Yuwei Zhou
39ca41eb1b Fixes some NIC bugs (#39213)
* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix
2018-04-25 09:54:19 +08:00
Toshio Kuratomi
72456711c3 Add note about the dangers of ANSIBLE_DEBUG (#39261)
* Add note about the dangers of ANSIBLE_DEBUG

* Wording tweaks
2018-04-24 17:30:41 -07:00
jctanner
2f32e0ba2d
Remove me from botmeta (#39263)
* Remove myself from team_vmware
* Remove myself from maintainership of all modules
2018-04-24 19:55:04 -04:00
Bryan Gurney
ce0eee905e Allow block map cache size modification. (#35667)
The VDO Ansible module currently cannot modify the block map cache
size (but can configure the block map cache size for new volumes).
Add the "Block map cache size" parameter to the list of modifiable
parameters.
2018-04-24 16:14:04 -04:00
Tim Rupp
fc753dd261
Adds the bigip_smtp module (#39243)
This module can be used to manage smtp settings on a bigip.
2018-04-24 12:20:49 -07:00
Alicia Cozine
0ca38ff595 gets rid of rst error on exos module docs (#39244) 2018-04-24 19:45:07 +01:00
Tim Rupp
e82a8d177f
Adds module for bigip service policies (#39240)
This patch includes a module for managing bigip service policies.
2018-04-24 11:06:34 -07:00
John R Barker
7c4b91844d
More validate module fixes (#39097)
* Fix type bool DOCUMENTATION issues
2018-04-24 18:05:50 +01:00
Joe Tauke
a6d2f6fd95 win_domain - Add ability to specify netbios name (#39084)
* Added netbios option to win_domain.ps1 and updated documentation

* formatting change

* formatting change

* adding version added line for domain_netbios_name

* Identation fix

* Clarity fixes for descriptions

Changes to description for netbios_domain_name and uniformity changes to other documentation sections (bringing them in line with other sections of the document).

* Fix minor indentation
2018-04-24 15:35:38 +10:00
Tim Rupp
ed05e46f5c
Adds bigip_snmp_community module (#39212)
This module can be used to manage snmp communities on a bigip
2018-04-23 22:32:17 -07:00
Tim Rupp
3227143dc8
Fixes coding conventions, adds a small feature (#39211)
Fixes some coding conventions and adds allowed_addresses to bigip_snmp_trap.
2018-04-23 22:06:33 -07:00
Tim Rupp
39e4754fc9
Fixes for convention incompatibilities (#39209)
Minor fixes for the f5 modules to use current conventions
2018-04-23 21:42:06 -07:00
Tim Rupp
37e114756d
Adds bigip_trunk (#39208)
This patch adds a new module for managing trunks on a bigip
2018-04-23 20:37:23 -07:00
Tim Rupp
3b11def7d0
Add timer policy module (#39206) 2018-04-23 20:30:28 -07:00
Jordan Borean
629efb6eaa
psexec: new module to run commands on a remote Windows host without WinRM (#36723)
* psexec: new module to run commands on a remote Windows host without WinRM

* fix up sanity issue, create test firewall rule for SMB traffic

* Fixed up yaml linting issues, trying to fix on the fly firewall rule

* Added SMB exception to catch when cleaning up PAExec exe

* Don't load profile for Azure hosts when becoming another user

* Fixed up example to use correct option

* Reworded notes section of module docs

* Simplified module options around process integrity levels and the system account
2018-04-24 12:15:15 +10:00
Tim Rupp
e254121729
Adds minor fixes and features to f5 modules (#39202)
* Add Mac_address parameter to bigip_traffic_group
* Fix docs
* Fix f5 conventions
2018-04-23 18:57:43 -07:00
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
Sébastien Portebois
f2b65fc5fe Fix documentation for aws_ssm and aws_ssm_parameter_store (#38352)
Fix typos aws ssm vs aws_ssm and quotes
2018-04-14 13:29:47 +10:00
Brian Coca
b4d235ca8d minor fixes 2018-04-13 18:50:42 -04:00
Simon Dodsley
c5b3a5edbe Add new Pure Storage module to discover facts for FlashArray (#37263) 2018-04-13 17:22:30 -05:00
Stanislav Simovski
a00abcb003 [terraform] Fixed typo in preflight_checks (#38740)
The function was incorrectly reporting project path when it failed to find binary.
2018-04-13 16:32:41 -04:00
Job Evers‐Meltzer
636e705260 fix user module error when generating ssh keys w/o a home (#29055)
* Fixes https://github.com/ansible/ansible/issues/29028

* raise Exception when no home directory
2018-04-13 16:22:53 -04:00
abelbabel
c1e4ef39cb fix of some problems with user modification with skeleton informations under FreeBSD (#34694)
* respect skeleton argument in usermod mode for FreeBSD

* use FreeBSD's own (more sophisticated) home creation function rather than ansible's create_home(), which does not handle skeleton files correctly for FreeBSD
2018-04-13 16:22:17 -04:00
Lutz Reinhardt
d512bed495 fix bug in modules/system/user.py (#37552)
for freebsd tool "pw" use date not days in "modify_user"
2018-04-13 16:21:22 -04:00
Abhijeet Kasurde
9b139baacb
VMware: Set default network type as 'dhcp' (#38518)
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.

Fixes: #38466

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-13 23:21:39 +05:30
Ryan S. Brown
53a3b8b602 [cloud] Use correct string types for comparisons in ec2_instance 2018-04-13 10:29:53 -04:00
Abhijeet Kasurde
2367130ba3
VMware: correct documentation for datacenter (#38718)
This fixes documentation related to datacenter in vmware_guest_find
module.

Fixes: #38290

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-13 18:34:45 +05:30
Vinay Dandekar
bed5f7317d Remove boolean check for underscore in IAM role (#38664)
Underscore is a valid character in an IAM role, per the docs https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html
2018-04-13 08:46:26 -04:00
Trishna Guha
ed25b56772
Pattern to catch string post to ERROR nxos terminal plugin (#37237)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-13 06:55:49 -04:00
saichint
1d975bdc93 fix nxos_ntp_options (#38695) 2018-04-13 06:17:32 -04:00
Ondra Machacek
efa7ebb8a5 ovirt_disks: Fix fail condition for LUN disk (#38726)
Fixes: https://github.com/ansible/ansible/issues/38661
2018-04-13 05:54:18 -04:00
Andreas Nafpliotis
8f5320435f Use correct esxi host variable in vmware_cfg_backup (#38721)
Fixed bug where hostname could not be found and minor documentation changes.
2018-04-13 14:21:37 +05:30
Ganesh Nalawade
88662d0c56
Fix in eos get_config cliconf api (#38682)
If format is passed as None to get_config api, wrong command is
genereted ie. `show running-configuration | None | section interface`.
Add format type in command only if format value is either not `text`
or  `None`.
2018-04-13 13:20:23 +05:30
Deepak Agrawal
6de49f084c
doc for _config backup argument (#38650) 2018-04-13 12:48:49 +05:30
Abhijeet Kasurde
f1cd254265 nmcli: change default value of autoconnect (#38676)
There was discrepancy between documentation and actual code.

Fixes: #38671

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-12 12:10:40 -04:00
Andreas Nafpliotis
c0243a8a31 fixed documentation to include esxi host (#38668) 2018-04-12 10:18:04 -04:00
Bajczi Levente
cdb064289b Fixing minor typo (#38662)
[...] the grafana_api_key only belong to one organisation [...] -> [...] the grafana_api_key only belongs to one organisation [...]
2018-04-12 10:12:35 -04:00
Maxim Kurganskiy
9f3491d035 Examples: Edit mistake (#38657) 2018-04-12 10:04:32 -04:00
Ewoud Kohl van Wijngaarden
d303c0706c Make the foreman callback more defensive (#36527)
* Foreman: Make the foreman callback more defensive

This ensures the ssl_verify attribute is always set. It also handles
None in _disable_plugin.

* Foreman: Handle ints in verify_certs

The default value for verify_certs is 1 which is an int. That has no
lower() function. By casting it to a str we can handle it later in
_ssl_verify().

* Foreman: Clean up coding style

* Foreman: Use get_option in favor of _plugin_options
2018-04-12 09:58:57 -04:00
Pilou
db80504839 firewalld: fix AttributeError (#38442)
Error was:
  File "/tmp/ansible_qY_BMb/ansible_module_firewalld.py", line 703, in <module>
    main()
  File "/tmp/ansible_qY_BMb/ansible_module_firewalld.py", line 548, in main
    module.fail(msg='firewall is not currently running, unable to perform immediate actions without a running firewall daemon')
AttributeError: 'AnsibleModule' object has no attribute 'fail'
2018-04-12 08:43:00 -05:00
Brian Coca
a4046d3424
better error when wrong type passed to import_play (#36592)
fixes #36576
2018-04-12 09:37:04 -04:00
Brian Coca
d78da403b6
allow user control of lookup error behaviour (#35932)
* allow user control of lookup error behaviour

this does not affect undefined vars, only other exceptions raised by a lookup

i.e lookup('file' ..) not finding a file
2018-04-12 09:35:00 -04:00
Alex Stephen
9de9633cac [GCP] New module GCP DNS Resource Record Set (#35920) 2018-04-12 07:31:43 -04:00
Jordan Borean
2fc3ac3516 win_setup: fix for machine sid to work in domains with lots of users (#38646) 2018-04-12 06:01:16 -04:00
leongold
b9d97d85f6 Add options field to bond structure. (#38512)
This change allows users to pass bond options
alongside bond mode, in order to allow greater
flexibility for bond creation. Previously,
bond options were derived from bond mode, e.g.
"miimon" was set to 100 for mode 3 (load-balance),
however a user may want to use 200.
2018-04-12 04:09:50 -04:00
Ryan Currah
91da1653e0 Added sumologic callback plugin (#38297)
* Added sumologic callback plugin

* Better comments
2018-04-12 00:34:48 -04:00
Will Thames
3b74dc2f6e Improve aws_ec2 plugin documentation (#37689)
* Better formatting
* More examples
2018-04-11 23:01:18 -04:00
flowerysong
b345b79dcd aws_ec2 inventory: add support for tag values as hostnames (#35880) 2018-04-11 19:34:06 -04:00
Sam Doran
90a7b3bef3
Change version added to 2.5.1 (#38604)
A bugfix backported to 2.5 also contained the new toggle option. The release
manager approved backporting this added feature to the dot release, so updating
devel to accurately reflect when the fetaure was added.
2018-04-11 17:52:27 -04:00
Brian Coca
6ef389617a
check types for template parameters (#37257)
this should give a better error than when failing on random methods when parameters where the wrong type.
2018-04-11 14:00:18 -04:00
Yuwei Zhou
8a0c192c36 Fixes new created lb doesn't return anything (#38560) 2018-04-11 13:22:27 -04:00
Brian Coca
cc1c7c63db
ensure 'home' translations (#36755)
* ensure 'home' translations

* removed slash as it created issues on diff plats
2018-04-11 11:53:05 -04:00
Brian Coca
d9430b79f9
Ensure non ansilbe exceptions keep tracebacks (#37523) 2018-04-11 11:52:12 -04:00
saichint
ed42331105 fix nxos_igmp_snooping issues (#38566)
* fix nxos_igmp_snooping issue

* shippable error fix
2018-04-11 10:14:27 -04:00
Samer Deeb
0d79268a6d issue:38321 fix onyx_config module failed while using python = 3.5 (#38343) 2018-04-11 08:01:54 -06:00
Simon Dodsley
d9b3b3f745 Add module to configure Pure Storage FlashArray Directory Services (#37350) 2018-04-11 08:17:25 -05:00
Matthew Stone
5b1a8ee1e8 Adding slx_command module and supporting module_utils. (#38235)
* Adding slx_command module and supporting module_utils.

This commit adds the slx_command module and tests as well as the
required slxos module_utils.

* Update copyright in header

* Adding missing module init

* Cleaning up shebangs/licensing.

* Incorporating feedback

Removing reference to `waitfor` alias in `slxos_command` module.
Adding `Extreme Networks` to `short_description` of `slxos_command` module.

* Adding cliconf tests

* Fixing 3.X tests

* Adding docstrings to test methods for slxos cliconf tests

* Adding slxos terminal tests

* Adding slxos module_utils tests

* Adding Extreme Networks team members to BOTMETA.yml
2018-04-11 12:59:34 +01:00
Maish
8f6ee2a5ca Added empty default for name parameter (#38514)
* Added empty default
Fix for issue https://github.com/ansible/ansible/issues/38482
2018-04-11 17:21:06 +10:00
Ganesh Nalawade
16c2d3717e
Add junos connection type check (#38527)
junos_netconf works only with connection=netconf
Add check to report appropriate error if any other
connection type is used.
2018-04-11 12:07:56 +05:30
Ganesh Nalawade
53d3e7e306
Add troubleshooting URL for persistent socket path related issue (#38542)
* Add troubleshooting URL for persistent socket path related issue

socket path timeout related error messages are not displayed on the
console as the ansible-connection process does not have access to it.
Until this is fixed need to point to troubleshooting URL so that
users can take corrective actions.

* Fix CI issue
2018-04-11 11:23:23 +05:30
Brian Coca
72b0ed8cb4 fix handling of some exceptions for mail plugin
redid the flow to simplify and dedupe code, also now we capture extra exceptions previouslly  causing traceback
see https://groups.google.com/forum/?#!msg/ansible-project/qhalnkYZMfI/93n8hlEpBAAJ
2018-04-10 22:17:33 -04:00
Brian Coca
886c4edfb9
avoid caching invetnory sources in loader (#38242)
* fix inventory plugin source caching

 - avoid caching invetnory sources in loader in base
 - same fix for yaml plugin
 - idem for 'auto' plugin

fixes #37162

* fix mock dataloader func sig
2018-04-10 22:15:52 -04:00
Brian Coca
399cba1c84 dict2items filter 2018-04-10 18:46:30 -04:00
Brian Coca
2e852fcd6d return empty host list when pattern is empty
fixes #37894
2018-04-10 18:43:29 -04:00
Brian Coca
fda9312379
actual error reporting on failed galaxy clone (#36788)
actual error reprting on failed galaxy clone

also allow debugging to see stdout/stderr from command
handle output for all commands on error
also use std temp dir instead of random
2018-04-10 17:26:17 -04:00
Brian Coca
32cf79c044 show changed in online 2018-04-10 17:25:24 -04:00
Brian Coca
5a333859fe allow for parameterized string functions
now also allow for ending parens

from following, 1, 2, 4 and 5 match, rest are ignored.

	{doc | to_nice_json}}
	{{(doc | to_nice_json)}}
	{{doc | to_nice_json| from_json}}
	{{doc | to_nice_json()}}
	{{doc | to_nice_json(indent=2)}}
	{{doc | to_nice_json(indent=2) | from_json()}}
	{{doc | to_nice_json(indent=2) | from_json}}

fixes #37579
2018-04-10 17:24:27 -04:00
Brian Coca
0c2e7fd841
made missing cli tools non fatal (#37194)
* made missing cli tools non fatal

* remove bare exceptions

these shoudl not be there as they can prevent 'wanted' exits
2018-04-10 17:23:29 -04:00
Brian Coca
42912e1ac8 minimize loading files/plugins
avoids some repetitive loading
 - read config file only once
 - now cache the ini parser per file
 - optimize shell plugin loading

tried to 'optimize' vars_plugins loading but it creates issues with precedence,
probalby due to iterator not being reset, will look into it in subsequent fix/PR
2018-04-10 17:22:31 -04:00
Brian Coca
34c002c771 give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
Brian Coca
eef70d028f
restrore showing stderr on script success (#38177)
* restrore showing stderr on script success

accidentally removed during transition to plugin, with toggle for those
who prefer the quiet way

fixes #33776

* stderr display if no other errors capture first
* fixed issue with error encoding
2018-04-10 17:16:12 -04:00
Brian Coca
1850bb752f
ignore version when deciding callback loading (#38281)
* ignore version when deciding callback loading

The code already defaulted to load the callback if the properties are not present
there was no need for us to also check the version

fixes #38270

* fix error msg on set optoins to use correct name
2018-04-10 17:15:28 -04:00
Andrew Gaffney
95ce00ff00 Allow loading dirs from role defaults/vars (#36357)
This commit moves code to look for vars files/dirs to a common place and
uses it for loading role defaults/vars. This allows things such as
'defaults/main' or 'vars/main' being a directory in a role, allowing
splitting of defaults/vars into multiple files. This commit also fixes
the role loading unit tests for py3 when bytestrings are used for paths
instead of utf8 strings.

This fixes #14248 and #11639.
2018-04-10 17:14:38 -04:00
Simon Dodsley
cc250156c4 Update Pure Storage FlashArray hostgroup module (#38503)
Allow for deletion and additon of hosts and volumes to a
volume group.
2018-04-10 16:06:51 -05:00
Ryan S. Brown
d4e5e385ca [docs][cloud] Include volume_size in ec2 module docs 2018-04-10 16:57:04 -04:00
Simon Dodsley
f97f81ec2e Update Pure Storage FA Host module to allow for mixed protocol hosts (#37078) 2018-04-10 15:50:43 -05:00
Brian Coca
c679186f17 better handling of diff key types in compose
also made separator configurable
fixed some exception types
better error msgs
2018-04-10 15:15:52 -04:00
Philippe Makowski
0f9a66a32c urpmi module improvements (#37596)
* fix urpmi.update path #37432

* improve urpmi

* use get_bin_path rather than hard coding the path

* fix pep8 issue

* avoid using global

* - `RPM_PATH`, `URPMIUPDATE_PATH`, `URPME_PATH`) aren't constants, they should be lowercase rather than uppercase
- shorten too long lines
- remove unused import

* revert removed imports

* use lowercase rather than uppercase

* update doc

* update doc

* update doc after sanity check
2018-04-10 13:10:56 -04:00
Matt Martz
0507c907a9
get_url should accept headers as a dict, instead of only a complicated string (#35470)
* get_url should accept headers as a dict, instead of only a complicated string

* update headers description text

* Add headers string and dict tests for get_url

* Add intg test for string header format parsing error

* Adjust deprecation version ahead 1 release, add the version dict format was added in to description
2018-04-10 11:50:39 -05:00
Daniel Andrei Mincă
89d6c36584 Optimize file handling in the find module (#38192)
* Optimize file handling

Use the best practice of opening and doing operations on an opened file

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>

* Fix docstring to Sphinx type

- update the docstrings to Sphinx type, as suggested by Toshio
- Move the pattern object assignment outside the context manager, as
  suggested by Matt

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-10 09:01:44 -07:00
Matt Martz
450cfa8776
Handle duplicate headers in the uri module (#33792)
* Handle duplicate headers, and make it easier for users to use cookies, by providing a pre-built string

* Ensure proper cookie ordering, make key plural

* Add note about cookie sort order

* Add tests for duplicate headers and cookies_string

* Extend tests, normalize headers between py2 and py3

* Add some notes in test code

* Don't use AttributeError, use six.PY3. Use better names.
2018-04-10 09:26:51 -05:00
Matt Martz
f1082af73f
Error if a module is found to shadow a reserved keyword (#34649)
* Error if a module is found to shadow a reserved keyword

* Add test for shadowed module

* Bring in functools.wraps for the decorator

* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic

* Swap order of functions for bottom to top execution order

* Only error for modules

* Add test for loading a lookup plugin that shadows a keyword
2018-04-10 09:26:27 -05:00
Martin Krizek
d97952dbf4
apt: allow for --allow-unauthenticated in upgrade (#38381)
* apt: allow for --allow-unauthenticated in upgrade

* Style fix

* Another style fix

* Add trailing comma
2018-04-10 15:37:41 +02:00
Ryan Brown
56cd8f2d48 Retry creation of tags when DHCP optionset is not found (#38528) 2018-04-10 09:08:41 -04:00
saichint
361437b042 fix nxos_igmp issues (#38496) 2018-04-10 00:05:58 -04:00
saichint
dabe5e6d07 fix nxos_hsrp issues (#38410)
* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth
2018-04-09 23:54:05 -04:00
Nate
c38617a736 fix for when status codes are provided as a comma separated list (#38080)
* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests
2018-04-10 12:25:08 +10:00
Will Thames
85d5901b31 Fix broken links in module documentation (#38469)
* Reflect updated names of the aws_batch_job modules
* Remove mention of `lambda_invoke` module which has yet to make it to
  Ansible.
* Update broken rst link in win_dsc module
2018-04-10 11:20:14 +10:00
Jordan Borean
22f2388ef1 winrm: added flag handler for kinit to request forwardable ticket when delegation is set (#37815) 2018-04-09 18:00:19 -07:00
Sloane Hertel
0fe778105b
Fix sporadic errors in ec2_vpc_subnet integration tests (#38473) 2018-04-09 17:03:36 -04:00
Jordan Borean
ccc56e138a
win_updates: handle if module failed to run (#38363) 2018-04-10 05:25:25 +10:00
THIERRY SALLE
6300e71903 Fix authot github account 2018-04-09 14:31:31 -04:00
David Resnick
283ccaa252 lastpass filter: add example 2018-04-09 14:20:21 -04:00
Matt Martz
6332beef65
Add unit tests for ansible.module_utils.urls (#38059)
* Start of tests for ansible.module_utils.urls

* Start adding file for generic functions throughout urls

* Add tests for maybe_add_ssl_handler

* Remove commented out line

* Improve coverage of maybe_add_ssl_handler, test basic_auth_header

* Start tests for open_url

* pep8 and ignore urlopen in test_url_open.py tests

* Extend auth tests, add test for validate_certs=False

* Finish tests for open_url

* Add tests for fetch_url

* Add fetch_url tests to replace-urlopen ignore

* dummy instead of _

* Add BadStatusLine test

* Reorganize/rename tests

* Add tests for RedirectHandlerFactory

* Add POST test to confirm behavior is to convert to GET

* Update tests to handle recent changes to RedirectHandlerFactory

* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
2018-04-09 10:17:43 -05:00
Rémy Léone
eccccfe77f Initial commit for Scaleway Compute (#38285) 2018-04-09 09:00:48 -05:00
Seuf
72120c3cac Grafana datasource module : tls_ca_cert or tls_skip_verify options (#36945)
* Allow to set tls_ca_cert or skip verify for grafana datasources

* version_added in documentation for new options tls_skip_verify

* Added default value for tls_skip_verify option in doc

* Fixed author git account

* Updated author
2018-04-09 14:41:09 +01:00
Ryan Brown
546a406a14
[docs] Add examples to ec2_instance docs (#38479) 2018-04-09 09:14:42 -04:00
Ganesh Nalawade
e10e0d42d8
Fix junos transport check (#38460)
For connection=local check only if the transport value in
provider is cli and the respective module support cli
transport. If not report back appropriate error message.
2018-04-09 16:22:09 +05:30
Martin Krizek
bb6f90ff6f
apt: properly set changed for autoremove/autoclean (#38329) 2018-04-09 11:10:42 +02:00
Martin Krizek
81a8c42115
Give hint when lookup fails on one element list (#38406)
* Give hint when lookup fails on one element list

* Mention wantlist first

* Fix pep8...
2018-04-09 11:08:04 +02:00
Yanis Guenane
99497ce54c openssl_certificate: Handle dump() in check_mode (#38386)
Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
2018-04-09 09:26:02 +01:00
Abhijeet Kasurde
57738a3ab4
New module: digital_ocean_certificate_facts (#36731)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-09 12:57:11 +05:30
tobald
7f99876274 remove duplicate declaration (#38449)
result['uid'] is already defined at line 2213 in user.py module.
2018-04-08 22:24:32 +05:30
Beni Cherniavsky-Paskin
0c5f03d3f4 manageiq_provider: don't send top-level null fields on creation (#38448)
* manageiq_provider: method docstrings fixes

* manageiq_provider: refactoring step towards DRY

`resource` is now same in `edit_provider()` and `create_provider()`,
to be extracted to main later.

* manageiq_provider: Fix creation of openshift provider

Fixes #38331.
Sending `api_version` to openshift provider would cause error:
"OpenShift api_version cannot be modified"
due to https://github.com/ManageIQ/manageiq-providers-kubernetes/blob/gaprindashvili-2/app/models/manageiq/providers/kubernetes/container_manager.rb#L37

In `edit_provider` we `delete_nulls()` on the whole data being sent
so `api_version` was omitted if not specified.
In `create_provider()` we only did it on endpoints list so `api_version`
was always sent - now doing on whole data.
2018-04-08 12:36:51 -04:00
Pilou
ffee906c54 lvg: don't fail if an unknown physical device is encountered (#38446)
Physical devices are listed using 'pvs' command. Then, for
'/dev/dm-*' devices 'dmsetup' command is used to find pv_name.

An error occurs when 'pvs' command list an unknown device:

$ pvs --noheadings -o pv_name,vg_name --separator ';'
  /dev/dm-0;vg_var
  /dev/mapper/sdb3_backups;vg_data_backups
$ dmsetup info -C --noheadings -o name /dev/dm-0
Device dm-0 not found

Then the module fails:
{
  "changed": false,
  "err": "Device dm-0 not found\nCommand failed\n",
  "msg": "Failed executing dmsetup command.",
  "rc": 1
}

This failure can be avoided when the unknown device isn't used in
module parameter 'pvs'.
2018-04-08 05:04:28 -04:00
Brian Coca
42d15671d0
clarifying docs with first_found (#36951)
better examlpes as this was never really a task loop, but contained inside the lookup itself
2018-04-06 17:19:15 -04:00
Nathaniel Case
e05cad785e
Fall back to ValueError if JSONDecodeError is not available (#38276) 2018-04-06 16:28:39 -04:00
Julien Vey
bab947d854 Migrate s3_bucket module to boto3 (#37189) 2018-04-06 14:33:58 -04:00
Dag Wieers
9bb1ee30bf Required changes to support redirects on HTTP 307/308 (#36809)
* Required changes to support redirects on HTTP 307/308

This ensures HTTP 307 and 308 will redirect the request to the new
location without modification.

* Fix the unused newheaders reference

* Be more compliant

* Add integration tests for follow_redirects=all

* Improve other tests for new behaviour

* Make follow_redirects values more strict
2018-04-06 13:17:14 -05:00
Erwan Quélin
49aac5f8c7 Added module win_pester and relatives integration tests (#37343)
* Added module win_pester and relatives integration tests

* Corrected issues as stated by ansible-test

* Added defaults variable in integration tests

* Added task to install Pester if needed in the integration test

* Corrected error in win_psmodule task

* Added Pester installation with Chocolatey when Powershell version < 5

* Get facts...

* Disabled invoke-pester output

* Added pester_result type

* Added jhawkesworth changes proposal

* Corrected documentation linting

* Corrected linting

* Added dagwieers recommendations

* Added dagwieers recommendations

* Corrected linting errors and task error in integration test

* Corrected error in integration test

* Added dagwieers recommendations

* Corrected requirements in the DOCUMENTATION block
2018-04-06 11:48:45 +01:00
Ondra Machacek
fc7a68875a ovirt_templates: Add new attributes (#38211)
- operating_system
 - memory
 - memory_guaranteed
 - memory_max
2018-04-06 05:04:20 -04:00
René Moser
af3598343d doc: apt, yum: add example with package lists (#38333) 2018-04-06 10:58:51 +02:00
Artem Tiumentcev
fa8b047039 Corrected a parameter name (#38385) 2018-04-06 10:58:01 +02:00
saichint
1bf29651af fix nxos_acl issues (#38283)
* fix nxos_acl issues

* typo fix

* typo fix in sanity.yaml

* another typo fix in sanity.yaml
2018-04-06 00:57:13 -04:00
Abhijeet Kasurde
f355eb621a VMware: Documentation update vmware_guest_snapshot (#38083)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-05 21:23:18 -04:00
Julien PRIGENT
1f3b480142 ec2_snapshot_copy: Add wait_timeout module parameter (#38072) (#38243)
* ec2_snapshot_copy: add wait_timeout parameter
2018-04-06 10:40:16 +10:00
Brian Coca
2afb1090b1 allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping

* tests for all behaviours affected

* add tests with injection off/on
2018-04-06 09:57:34 +10:00
Brian Coca
1b9879ccbf remove unused optoins from inventory cli
fixes #31929
2018-04-05 18:40:24 -04:00
AlanCoding
153c9bd539 Reduce recursion within group methods
This offers an optimization that allows loading larger
inventories of various structure by improving the
scaling laws involved for adding hosts and groups.

The primary speed benefit is the elimination of duplicate
recusion from traversing converging paths.
2018-04-05 18:38:44 -04:00
Jordan Borean
71e8527d7c powershell: display non-ascii characters in command outputs (#37229) 2018-04-05 14:59:51 -07:00
Jordan Borean
fd4d264253
win_setup: Added connection name to interfaces (#37327) 2018-04-06 07:36:38 +10:00
jhawkesworth
ad94d03ba1 Tolerate win line endings on windows module_util load (#37291)
* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback
2018-04-06 07:13:31 +10:00
Eric Brown
4e38036bbd Replace the hard-coded temp path in gunicorn module (#38349)
The gunicorn module has a hard-coded reference to '/tmp' which may
or may not be the actual temp directory for an operating system.

This patch replaces '/tmp' with module.tmpdir which should
resolve to the correct temp directory for the OS.

Fixes Issue #36953

Signed-off-by: Eric Brown <browne@vmware.com>
2018-04-05 16:31:21 -04:00
Matt Martz
b794fa4fe7 Expose verbosity as a var, dedupe attr list. Fixes #36170 2018-04-05 16:06:01 -04:00
Ed Costello
0d31d1cd24 [cloud]Add aws_ses_identity_policy module for managing SES sending policies (#36623)
* Add aws_ses_identity_policy module for managing SES sending policies

* Add option to AnsibleAWSModule for applying a retry decorator to all calls.

* Add per-callsite opt in to retry behaviours in AnsibleAWSModule

* Update aws_ses_identity_policy module to opt in to retries at all callsites.

* Add test for aws_ses_identity_policy module with inline policy.

* Remove implicit retrys on boto resources since they're not working yet.
2018-04-05 15:11:12 -04:00
Renato Orgito
dca61cc397 Update docs to reflect support for CDP neighbors (#38051) 2018-04-05 19:14:55 +01:00
Brian Coca
f630d420c6 clarify os x password with user module (#38344)
also removed pointer to non existing example

fixes #36427
2018-04-05 14:13:22 -04:00
angystardust
1f54775581 Clarify the "refresh_inventory" meta task when using a dynamic inventory script (#37575)
Clarify the "refresh_inventory" meta task when using a dynamic inventory script since it was somehow documented in this old mailing list message:
https://groups.google.com/forum/#!topic/ansible-project/ImhePKKDBZM
2018-04-05 10:49:51 -07:00
Andrew Gaffney
8673e1e661 Support for module param defaults (#22648) 2018-04-05 11:44:51 -04:00
Chaitanya Deshpande
f9bd29fe4d Added module for Autoscale Launch Config (#37345)
* Added module for Autoscale Launch Config

* Fixed review comments
2018-04-05 15:51:39 +01:00
Kevin Breit
d5cfc54ef4 Validate SSL in panos_import (#36972)
* Fix bug 36936

* Added version_added to argument and fixed whitespace

* Update panos_import documentation

Update parameter documentation and add note.

* Add type documentation

* added version number for documentation

For real

* Integrated recommended changes

- Added recommended changes from PR

* Changed validate_ssl default back to True considering there is a
note at the top of documentation explaining change

* Format changes based on recommendations from gundalow

* Rename validate_ssl to validate_cert

* Change description to remove SSL reference

* Change url default ih documentation

* Integrated small changes from bug report
- Renamed validate_cert to validate_certs
- Changed documentation for disabling cert validation
2018-04-05 13:29:33 +01:00
shadbarton
613f24a346 Fix typo in apt.py (#38332) 2018-04-05 14:06:12 +02:00
James Hogarth
509f52a8ed ISSUE-37945 output not populated on failure (#37952)
* ISSUE-37945 output not populated on failure

This always includes output, but it is empty on failure.

* handle the other failcases as well
2018-04-05 05:49:10 -04:00
Ryan Brown
1c7b9e66b4 AWS WAF module custom waiter (#37026)
Consolidate waiters to a single file

* Add waiter message with token ID
* Add waiter

Add waiter for WAF change tokens

Working waiter for waf_condition module

Add support for waiters to waf_rule

* WAF data model refactor

* Fix ref to self.client

* Add custom waiters to aws_waf_web_acl

* Allow add/remove rule tasks to operate in parallel, then wait for their change tokens to complete

* Move waiter into run_func_with_change_token_backoff since it is generic to all WAF update operations

* Wait for deletes on waf_web_acl

* Remove always-wait

* Remove waiter retry catch
2018-04-05 11:30:57 +10:00
Milan Ilic
5b703a2a53 Add OpenNebula one_image_facts module (#38169)
* Add OpenNebula one_image_facts module

`one_image_facts` - module for gathering facts about OpenNebula images
Add integration tests

* Add an alias for ids
2018-04-04 22:53:31 +02:00
Martin Krizek
92bb3c2788 Fix grafana CALLBACK_VERSION 2018-04-04 11:26:22 -04:00
Colin Rymer
893b4e9116 Fix spelling of "lookup" across docs and src comments
PR #38273 by @colinrymer
2018-04-04 15:52:55 +02:00
Roman Bolshakov
3c53e2f8ea openvswitch_db: Split key-value pairs correctly (#33335)
Map values can contain commas, e.g.
    - name: Configure OVN bridge mapping
      openvswitch_db:
        state: present                                                                                                                                                                                                                                table: open_vswitch                                                                                                                                                                                                                           record: .                                                                                                                                                                                                                                     col: external_ids                                                                                                                                                                                                                             key: ovn-bridge-mappings
        value: '"vmnet-static:br-vmnet-st,vmnet-dynamic:br-vmnet-dyn"'

Previous behaviour was splitting the value and raised an exception.
2018-04-04 07:49:01 -06:00
Evgeny Fedoruk
5e990301bb Fixing lack of failure when uploaded source is invalid (#37461)
Checking the response status for 400 and throwing exception.
Unit tests updated.

Fixes #37406
2018-04-04 07:48:22 -06:00
John R Barker
a4e932ee9f ansible_ssh_pass is the ENV variable (#38035)
* ansible_ssh_pass is the ENV variable

* ansible_ssh_pass then ansible_password

* priority is top(lower)->bottom(higher)
2018-04-04 07:45:57 -06:00
Samer Deeb
72d42bd065 issue:38167 add support for onyx version 3.6.6000 for onyx_linkagg (#38191)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-04-04 07:43:10 -06:00
Daniel Andrei Mincă
19ca1b2b8a Fix typo in Slack Callback plugin (#38268)
`get_options` is an undefined method from CallbackBase

As a result, remove the trailing `s` letter.

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-04 15:29:49 +02:00
Abhijeet Kasurde
ac9dbdeb10 nmcli: check NMClient, NetworkManager availability (#38076)
This fix adds check for NMClient, NetworkManager availability
while using require_version API.

Fixes: #38042

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-04 05:58:38 -04:00
Ganesh Nalawade
3a4fc4af08
Add error handling for junos in case wrong connection type (#38023)
* Add error handling for junos in case wrong connection type

Fixes #37990

If a junos module doesn't support given connection/transport type
return appropriate error message.

* Fix CI issues

* Fix review comment
2018-04-04 09:54:47 +05:30
Jordan Borean
f37a44430f win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test
2018-04-03 18:28:10 -07:00
Dag Wieers
3a1cd4d45a
Fix incorrect RN used in module (#38245)
This requires backporting to v2.5
2018-04-04 02:43:58 +02:00
Julien Vey
63a8ae94a7 cloudfront_distribution: fix restrictions (#37476) 2018-04-04 10:26:14 +10:00
Rémi REY
71699d5140 Introduce grafana callback plugin. (#34246)
* Introduce grafana callback plugin.

The grafana plugin plublishes annotations to the HTTP API available in
Grafana 4.6+

The callback publishes:
* An annotation on playbook start, tagged with "ansible",
 "ansible_event_start" and playbook name, example:

```
{
    "text": "Started playbook test.yml\n\nFrom 'pc45.home'\nBy user 'remirey'\n",
    "tags": ["ansible", "ansible_event_start", "test.yml"],
    "time": 1514291163000
}
```

* An annotation on error containing the host and task who failed and
  tagged with "ansible", "ansible_event_failure" and playbook name, example:

```
{
    "text": "Playbook test.yml Failure !\n\nFrom 'pc45.home'\nBy user 'remirey'\n\n'TASK: simulate failure' failed on localhost\n\ndebug: {\"changed\": false, \"msg\": \"Some random failure\"}\n",
    "tags": ["ansible", "ansible_event_failure", "test.yml"],
    "time": 1514291165000
}
```

* A region annotation emitted on playbook stats, tagged with "ansible",
  "ansible_report" and playbook name, example:

```
{
    "text": "Playbook test.yml\nDuration: 1.641703\nStatus: FAILED\n\nFrom 'pc45.home'\nBy user 'remirey'\n\nResult:\n{\"localhost\": {\"unreachable\": 0, \"skipped\": 0, \"ok\": 2, \"changed\": 1, \"failures\": 1}}\n",
    "tags": ["ansible", "ansible_report", "test.yml"],
    "isRegion": true,
    "timeEnd": 1514291165000,
    "time": 1514291163000
}
```

Fixes #34225
2018-04-03 18:51:52 -04:00
Peter Sprygada
91a748e33b fixes issue when netconf would report ios is not supported (#38155)
* fixes issue when netconf would report ios is not supported

This change now will map ansible_network_os=ios to the correct netconf
plugin implementation.  This will resolve an error where the netconf
connection plugin will report that ios is unsupported.
2018-04-03 17:01:59 -04:00
Sloane Hertel
873a9ddf8d [cloud] Add custom waiters to stabilize ec2_vpc_subnet module - Fixes #36083 (#37534)
* stabilize ec2_vpc_subnet module

* Add waiters for ec2_vpc_subnet

Clean up integration tests

* Reenable CI for stabilized ec2_vpc_subnet tests

* rename waiters

* Use module_json_aws where applicable

Handle WaiterError first if waiting failed

* Fix traceback when tagging with keys/values that look like booleans

* Fix check mode with tags

* Add integration tests for tags that look like booleans and check mode

* Add waiter for deleting subnet

* Sleep a few seconds after using aws command line
2018-04-03 15:25:00 -04:00
Rémy Léone
95c15757a2 Initial commit for Scaleway support (#37638) 2018-04-03 14:04:42 -05:00
Julien Vey
b000339a31 ec2_instace: fix instance_role argument (#37465) 2018-04-03 11:39:39 -04:00
Matt Martz
ddf937d642
Don't pass keyword args as positional, include file_name. Fixes #38190 (#38194) 2018-04-03 09:59:13 -05:00
brhatiga
8199b448e8 Add no_log to activationkey (#36657) 2018-04-03 07:35:21 -04:00
Megian
7a5e7c83d3 dictionary changed size during iteration error (#37454)
Iterating an object and changing it at the same time is unsecure and no longer permitted in Python >= 3.6

Provisioning an instance fail with the Python error: "RuntimeError: dictionary changed size during iteration"
2018-04-03 06:13:09 -04:00
Kassian Sun
72657ce815 Add example to clear the usage of extra_opts (#31873) 2018-04-03 05:03:11 -04:00
Charles Chan
fd711671ed copy: doc: fix typo (#38197) 2018-04-03 09:26:35 +02:00
Trishna Guha
119352b538
nxos_vlan purge (#38202)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-03 02:53:44 -04:00
saichint
24cc6b80bd fix nxos_aaa_server_host issues (#38188) 2018-04-03 01:53:43 -04:00
Dag Wieers
35b7b608bf
Add missing required property to docs
<!--- Your description here -->

+label: docsite_pr
2018-04-03 03:32:49 +02:00
Julien PRIGENT
70bcc5ed45 ec2_snapshot_copy: WaitError and ClientError exception handling (#38072) 2018-04-03 10:23:35 +10:00
Gennady Aleksandrov
67cd641c04 Fixes #38085 - cloudfront_invalidation doesn't work for the first invalidation ever (#38086) 2018-04-03 10:14:09 +10:00
Abhijeet Kasurde
2d90f50eeb git_config: add quotes in complex value (#38168)
This fix adds quotes to complex values of git config keys.

Fixes: #20954

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-02 19:09:39 -04:00
cpitre
5d779fada0 Doc formatting update for office_365_connector_card.py (#38142)
* Update office_365_connector_card.py

The two bullet items were about one single item; this module is not idempotent.
Therefore the two bullet items should be one.

 label: docsite_pr

* Update office_365_connector_card.py

Removed trailing white space that caused the test failure.
2018-04-02 16:23:47 -05:00
Ryan Brown
87bd169ca9 Allow subnets with names formatted like subnet-1234 (#37740)
* Allow subnets with names formatted like `subnet-1234`

* Deduplicate IDs, in case a subnet is specified both by name and ID
2018-04-02 17:13:44 -04:00
Alex Stephen
d129396274 GCP: Compute IP Addresses (#36325) 2018-04-02 16:42:49 -04:00
Artem Tiumentcev
082b03c829 fix set options in callbacks for foreman 2018-04-02 12:17:39 -04:00
Jim Gu
5839f07e0f yaml callback fails on python3
When the URI module returns complex JSON objects, the YAML callback
fails while trying to represent these objects.  The problem arises
because the filter method returns an iterator in Python 3, rather than a
str object.  Therefore, the str method expandtabs() is not available,
and the callback fails with the following error:

[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.yaml.CallbackModule object at 0x7f7c7ed8aa20>): 'filter' object has no attribute 'expandtabs'

Issue can be replicated by running this playbook:

- hosts: localhost
  gather_facts: false
  tasks:
    - uri:
        url: https://jsonplaceholder.typicode.com/posts

ansible-playbook tmp.yml -v
2018-04-02 11:41:00 -04:00
Will Thames
423b0e0f58 Improve details and events results for ecs_service_facts (#37983)
* Use AnsibleAWSModule to simplify AWS connection
* Add Exception handling, pagination, retries and backoff
* Allow events to be switched off
* Allow details to be obtained without having to specify services
2018-04-02 11:26:23 -04:00
Sascha Marcel Schmidt
50761bef0a changes description to match module (#31364) 2018-04-02 11:24:15 -04:00
Milan Ilic
a73e2a924b Add OpenNebula one_image module (#37831) 2018-04-02 16:58:39 +02:00
saichint
697c301f04 fix nxos_aaa_server issues (#38117) 2018-04-02 07:56:06 -04:00
Yasen Simeonov
b4debfad9a Add NSX-T Logical Switch support in vmware_guest (#37979)
* Add NSX-T Logical Switch support in vmware_guest

* Update vmware_guest.py

add space after % operator
2018-04-02 05:35:13 -04:00
balonik
0cdba9ff70 add instanceUuid (also called PersistentId) in vmware utils (#37127) 2018-04-02 01:49:39 -04:00
Felix Fontein
93fc99c576 Making clearer that the module has to be executed twice, and that the second run needs the data of the first (#37884). (#38135) 2018-03-31 10:07:00 -04:00
René Moser
28ce3c2329
doc: inventory: nmap: fix version added (#38157) 2018-03-31 11:45:12 +02:00
René Moser
b06dfbec54
cs_user: fix E325 (#38158) 2018-03-31 11:44:04 +02:00
Felix Fontein
8b98c29afd Remove the deprecated tls-sni-02 challenge method. (#38137) 2018-03-31 03:17:12 -04:00
Ondra Machacek
9a21f9b2db ovirt_host_networks: Fix of bond assignment (#38054)
* ovirt_host_networks: Fix of bond assignment

* ovirt_host_networks: Fix bond modes

* ovirt_host_networks: Fix incorrect prefix documentation
2018-03-30 07:56:11 -04:00
Ondra Machacek
477a602fdf ovirt_hosts: Fix failed_state after PM fence (#38102) 2018-03-30 07:55:17 -04:00
Yuwei Zhou
1c00a14c31 fix typo (#38131) 2018-03-30 03:46:53 -04:00
Dag Wieers
126a41327c
Update docs to highlight lookup plugins for templating
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:33:02 +02:00
Dag Wieers
3973eb4c30
Added an example using a templated payload file
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:27:45 +02:00
Abhijeet Kasurde
16cf51926d VMware: vmware_portgroup teaming policy support (#36778)
This fix adds support for specifying teaming policy in
vmware_portgroup module.

Fixes: #36773

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-29 23:03:45 -04:00
Martin Krizek
fd96bcd22f Use correct action in warning about missing name 2018-03-29 18:10:00 -04:00
Brian Coca
5e2f215dd7 Nmap inventory (#32857)
* nmap inv plugin draft

* more accurate regex

* fix format
2018-03-29 17:16:36 -04:00
Sam Doran
a4c82d5842 Update EdgeOS modules to be community supported (#38112) 2018-03-29 15:59:46 -05:00
gmaes
27c47f75ad #29334 handle maven local repo (#36159) 2018-03-29 16:16:46 -04:00
Sloane Hertel
ee06f57f0d
[ec2_vpc_nacl] revert suboptions for ingress and egress module parameters (#38071) 2018-03-29 16:16:01 -04:00
Dag Wieers
800dad5bdf uri: Add redirect tests for none, safe, urllib2 and all (#37068)
This is required if we want to ensure that #36809 doesn't cause any
important behavioral changes.

This PR changes the uri module to support follow_redirects=urllib2

It also adds a better error message when the connection closes before
any data was returned.
2018-03-29 14:54:42 -04:00
Renato Orgito
fea8c84a17 Fix returned landscape value when using python3 2018-03-29 11:44:05 -07:00
Pilou
7908f78fa6 module_common: handle None value for templar (#36651)
* module_common: set required parameter templar

Fix the following error (related to b455901):

  $ ./hacking/test-module -m ./lib/ansible/modules/system/ping.py -I ansible_python_interpreter=/usr/bin/python
  Traceback (most recent call last):
    File "./hacking/test-module", line 268, in <module>
      main()
    File "./hacking/test-module", line 249, in main
      (modfile, modname, module_style) = boilerplate_module(options.module_path, options.module_args, interpreters, options.check, options.filename)
    File "./hacking/test-module", line 152, in boilerplate_module
      task_vars=task_vars
    File "ansible/lib/ansible/executor/module_common.py", line 910, in modify_module
      environment=environment)
    File "ansible/lib/ansible/executor/module_common.py", line 736, in _find_module_utils
      shebang, interpreter = _get_shebang(u'/usr/bin/python', task_vars, templar)
    File "ansible/lib/ansible/executor/module_common.py", line 452, in _get_shebang
      interpreter = templar.template(task_vars[interpreter_config].strip())
  AttributeError: 'NoneType' object has no attribute 'template'

* module_common.modify_module: templar is required
2018-03-29 13:54:48 -04:00
jctanner
e10724fadb dedupe the --rsh options in favor of user supplied (#38096) 2018-03-29 09:32:27 -05:00
saichint
6f2cb28bb9 fix nxos_vlan issues (#38008) 2018-03-29 06:26:33 -04:00
Deepak Agrawal
66b389a00d
show version brief does not work on iosxr virtual (#37609)
* show version brief does not work on iosxr virtual

* ci failures fix
2018-03-29 12:33:41 +05:30
Fabian Zimmermann
0efbb702b9 fixes bug: puppet module is no longer updating persistent external facts (#38026) 2018-03-29 14:54:44 +10:00
jctanner
7ea05a2d56 synchronize: fix the mixture of quoting and passing of lists to run_command (#38020)
* switch to six.moves.shlex_quote

* remove the unncessary quotes on rsh
2018-03-28 18:45:49 -07:00
Milan Ilic
0128022654 Add OpenNebula one_vm module (#37825)
* Add OpenNebula one_vm module

* `one_vm` - module for managing VM instances instances on OpenNebula

* Add integration tests
2018-03-28 23:32:03 +02:00
Blair Rampling
e5d44934e7 changes default WAPI version to 2.1 (#37578) 2018-03-28 18:27:17 +01:00
Will Thames
98b29f8ad6 [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests
2018-03-28 12:53:35 -04:00
Samer Deeb
9dfb665e43 issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)
* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-28 17:13:54 +01:00
Blair Rampling
7324f49829 fixes example address parameters (#37765) 2018-03-28 17:11:24 +01:00
Martin Krizek
447b342662
apt: use --auto-remove with dist-upgrade (#37594) 2018-03-28 12:18:36 +02:00
Olivier Bourdon
612d0d6634 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
2018-03-28 10:21:43 +01:00
Benoit Perroud
710db82930 flattened: doc: Typo in lookup example (#38006) 2018-03-28 08:25:40 +02:00
Jorge Andrade
29c8d9b923 Update xml.py (#38019)
Fix a trivial typo 

 label: docsite_pr
2018-03-28 07:47:28 +02:00
balonik
371317b553 don't create vmware vm on ESX in maintenance mode (#37124)
* don't create vmware vm on ESX in maint mode

update vmware_guest not to try to create VM on ESXi host in maintenance mode

* update as requested
2018-03-27 23:12:43 -04:00
Yuwei Zhou
454096ca59 Fixes #37700 Azure image can be created with tag (#37981)
* image can be create or add

* update tags

* can remove all tags

* Update azure_rm_common.py
2018-03-27 23:10:29 -04:00
Abhijeet Kasurde
d065cce021 VMware: Use RFC 952 compliant hostname while customization (#38005)
VMware throws error if hostname provided by user is not RFC 952
compliant. Added minor documentation fixes.

Fixes: #24225, #27096

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-27 22:49:22 -04:00
Sean Lok
0ee275ca64 Add Meaningful Cloudfront Identity during creation of cloudfront distribution (#37914) 2018-03-28 10:38:16 +10:00
Adam Miller
ab9b4479a1 Quote --rsh command options for rsync in syncrhonize module (#35976)
Currently the --rsh command arg being passed to rsync is not quoted,
but we're adding arguments to the ssh command and that causes rsync
to attempt to accept them as it's own, which is not the desired
outcome.

Fixes #35717

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-03-27 20:26:00 -04:00
Matt Martz
897c8df8d0 Ensure the MAC address uses colons instead of hyphens for later comparison. Fixes #35463 (#35465) 2018-03-27 15:20:01 -04:00
Abhijeet Kasurde
8ce2ee0ebb VMware: Fix regression in get_all_host_objs (#36770)
If user does not specify esxi_hostname then module
fails to detect ESXi hostsystem from given configuration.
This fixes the regression in get_all_host_objs API by
getting first host managed object from list.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-27 14:57:17 -04:00
Abhijeet Kasurde
4edcbeb62d
VMware: Gather facts when powerstate is specified (#37908)
This fix adds additional facts after VM powerstate management.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-28 00:19:33 +05:30
Adrian Likins
6e737c8cb6
Fix 'New Vault password' on vault 'edit' (#35923)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834
2018-03-27 14:12:21 -04:00
Toshaan Bharvani
cbe2915ba5 continue fact gathering even without dmidecode (#34925)
* continue fact gathering even without dmidecode

If dmidecode is not available we still wan to continue with fact
gathering.
On certain platforms dmidecode just won't work
2018-03-27 13:56:49 -04:00
Renato
ed6c4b4058 Add spectrum_device module (#19739) 2018-03-27 11:58:01 -05:00
Afsal Rahim
1428db45bc updated example with correct parameters (#37679)
Updated EXAMPLES documentation which had following 2 incorrect parameters: 
'type' has been changed to 'ds_type'
'basic_auth' parameter has been removed.

 label: docsite_pr
2018-03-27 18:49:11 +02:00
Manuel Bonk
4aa1477470 fix typo (#37996)
fix typo
 label: docsite_pr
2018-03-27 18:47:48 +02:00
Will Thames
c1af147c1f warn about assign_public_ip immutability only if explicitly set (#37974)
Change assign_public_ip to default to None rather than False so
that we can detect whether the value is being explicitly set or
not, and only warn if it is explicitly set to False for something
with a public_dns_name

Fixes #37985
2018-03-27 08:20:57 -04:00
Ed Costello
d79b9f88bb Fix broken link to cloud utils from AWS guidelines. (#37166)
* Fix broken link to cloud utils from AWS guidelines.

* Replace absolute links within repo with relative links.
2018-03-27 18:55:25 +10:00
saichint
135d343254 fix nxos_udld_interface issue (#37527) 2018-03-27 02:57:14 -04:00
Renato
023f130a46 Add CDP support for the neighbors option (#37655) (#37667) 2018-03-27 12:06:17 +05:30
Jordan Borean
b1ac65d95a
win_copy: added fix for win_copy deleting local tmp folder (#37964) 2018-03-27 16:20:10 +10:00
Jordan Borean
68e44e082e
Ansible.ModuleUtils.FileUtil: catch DirectoryNotFoundException when testing a path (#37968) 2018-03-27 16:19:45 +10:00
Jordan Borean
c4e7b54630
win_reboot: fixed up warning message for dep args (#37898) 2018-03-27 13:03:07 +10:00
Toshio Kuratomi
e707e71ec5 Except in specific cases, we want to use text strings on the controller 2018-03-26 16:54:39 -07:00
Toshio Kuratomi
02f44176b9 Document the relationship between octal numbers and the leading zero
Fixes #37875
2018-03-26 16:25:06 -07:00
Toshio Kuratomi
a82fea65c1 We need to save the basename into an attribute for calling code 2018-03-26 16:15:05 -07:00
David Passante
abae7a49f7 Fixes #37824. cloudstack: do not rely on APIs list queries for names (#37910) 2018-03-26 15:53:28 -04:00
nathanwebsterdotme
ce6595b567 aws_ssm_parameter_store - Make the module idempotent (#36252)
* Make the module idempotent

* pep8 fixes.

* Made required changes for overwrite_value for idempotency.

* Fix missing error definition

* Add in missing documentation variable.
2018-03-26 15:46:37 -04:00
Matt Martz
6051ef4041
Revert accidental addition of Mapping in #37741 (#37939) 2018-03-26 13:57:56 -05:00
Matt Martz
ffbbb5a25b
Use arg_spec type for comparisons on default and choices (#37741)
* Use arg_spec type for comparisons on default and choices

* Further improve type casting

* Make sure to capture output in more places

* Individually report invalid choices

* Update ignore.txt after resolving merge conflicts
2018-03-26 12:15:32 -05:00
Toshio Kuratomi
9890ce47e8 Optimizations in mod_args parsing
* Make it less likely that we have to identify all the modules during
  a playbook run.  PluginLoader is optimized to look for modules one
  directory at a time.  If we find a module before we've examined all
  the directories we never have to touch the other directories.
  Reordering this conditional makes it so tasks which don't have
  a module file will not force us to examine all the module directories
  before moving on to other sources of task actions.
* Change several variables we consult to see if a task is in a certain
  category from lists/tuples to frozensets.  These are static lists
  which we only do containment tests on so frozensets should be faster
2018-03-26 10:08:38 -07:00
Matt Martz
1f824bd620 Don't overwrite builtin jinja2 filters with tests (#37881)
* Don't overwrite builtin jinja2 filters with tests. Fixes #37856

* Fix tests and other callers of _get_filters
2018-03-26 12:06:00 -05:00
Nathaniel Case
169209c32a
Put back $PATH checking in ansible-connection call (#37933) 2018-03-26 12:49:30 -04:00
saichint
0df5cfd41f fix nxos_static_route issues (#37614)
* fix nxos_static_route issues

* remove nxos_static_route from ignore
2018-03-26 11:13:32 -04:00
Matt Martz
0dcd8b598c
Don't assume that self._task.action is copy, explicitly set. Addresses #37238 (#37777) 2018-03-26 10:04:06 -05:00
Ganesh Nalawade
8eaa9cc938
Fix junos modules check_mode issue (#37311)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
2018-03-26 07:27:30 -04:00
Adam Miller
7cd3d9cc1a Correct msg to detect idempotent yum groupinstall (#37858)
The message text used to check stderr for a warning about
groupinstall in order to determine if a change occurred is specific
to the version of yum that is in RHEL7 and newer. This change simply
removes a couple words off the end in order to only use text found
in the warning message in older versions of yum.

Fixes #35982

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-03-26 10:46:24 +02:00
Abhijeet Kasurde
f0fd0f219d Hide apikey from log in uptimerobot (#37342)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-26 03:02:00 -04:00
Heusini
702b5a3e81 Added poweroff_guest vm and reboot_guest vm in vsphere_guest (#34348) 2018-03-26 02:35:58 -04:00
Abhijeet Kasurde
adbda67151 New module: digital_ocean_domain_facts (#37269)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-26 01:48:13 -04:00
Will Thames
681c69f8c1 Fix the aws_kms_facts module name in module docs (#37902)
Forgot to update the examples when the module name changed to
have the `aws_` prefix
2018-03-26 12:18:36 +10:00
Sloane Hertel
ba0ff415a0 [cloud] ec2_vpc_nacl: add documentation about ingress and egress rules (#37747)
Fixes #25152

Use suboptions
2018-03-26 11:44:44 +10:00
Nate
2c44061a04 append request headers instead of replacing (#37845) 2018-03-26 05:35:41 +10:00
Jordan Borean
b7ce2b1c5a
win_certificate_store: fix typo stopping key_storage from working (#37810) 2018-03-24 09:17:18 +10:00
Eric Brown
e95e9de235 Typos in the yaml inventory plugin
This patch fixes up some English typos in the yaml inventory
plugin documentation.

* s/specifically/specific
* s/as/as an

Signed-off-by: Eric Brown <browne@vmware.com>
2018-03-23 18:01:40 -04:00
Strahinja Kustudic
68ff986708 Fix 'repomd.xml signature could not be verified' (#35989)
If a repo with `repo_gpgcheck=1` is added and the repo GPG key was never
accepted, quering this repo would throw an error `repomd.xml signature
could not be verified` and the module would fail. If that happens now
`yum -y makecache` will be run which will fetch the new repo data and
accept the repo GPG key.
2018-03-23 16:13:49 -05:00
Alex Tsitsimpis
c3ab6cb9b1 template: Add option to lstrip_blocks' and fix settingtrim_blocks` inline (#37478)
* template: Add integration tests for `lstrip_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Fix passing `trim_blocks' inline

Fix passing `trim_blocks' option to the template module as inline
argument. Previously passing the `trim_blocks' option inline instead of
using the YAML dictionary format resulted in it always being set to
`True', even if `trim_blocks=False' was used.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add option to `lstrip_blocks'

Add option to set `lstrip_blocks' when using the template module to
render Jinja templates. The Jinja documentation suggests that
`trim_blocks' and `lstrip_blocks' is a great combination and the
template module already provides an option for `trim_blocks'.

Note that although `trim_blocks' in Ansible is enabled by default since
version 2.4, in order to avoid breaking things keep `lstrip_blocks'
disabled by default. Maybe in a future version it could be enabled by
default.

This seems to address issue #10725 in a more appropriate way than the
suggested.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add integration tests for `trim_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Check Jinja2 support for `lstrip_blocks'

Since the `lstrip_blocks' option was added in Jinja2 version 2.7, raise
an exception when `lstrip_blocks' is set but Jinja2 does not support it.
Check support for `lstrip_blocks' option by checking `jinja2.defaults'
for `LSTRIP_BLOCKS' and do not use `jinja2.__version__' because the
latter is set to `unknown' in some cases, perhaps due to bug in
`pkg_resources' in Python 2.6.6.

Also update option description to state that Jinja2 version >=2.7 is
required.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
2018-03-23 12:05:21 -04:00
Martin Krizek
687f3bbef3
apt: fix mark when no packages (#37835) 2018-03-23 15:06:03 +01:00
David Passante
270e799cb6 cs_vpc_offering: listVPCOffering API returns any matching names (#37783)
* fix listVPCOffering API method returns any matching names

* fix build_ci no-underscore-variable

* clearer variable name

* making it simpler
2018-03-23 09:13:41 -04:00
Martin Krizek
00d9345158
apt: mark installed packages manual (#37751)
* apt: mark installed packages manual

* Add fallback for when manual is not a thing
2018-03-23 12:23:12 +01:00
Jordan Borean
ca225d6da0
Changed Azure SecurityRule to use kwargs instead of positional args (#37695) 2018-03-23 20:37:22 +10:00
Fredrik Holmberg
e06f3463fd Typo in ipaddr filter (#37592)
interger = integer
2018-03-23 11:06:53 +01:00
Colin Nolan
a4a2b4a381 consul_kv: decodes kv values from Consul to utf-8 (#35894)
* Decodes kv values from Consul to utf-8.

* Switches to using module utils to perform text decoding.

* Adds self to authors list to help community maintenance.
2018-03-22 14:56:38 -07:00
Tim Werner
a51a699314 make jira authentication Python3 compatible (#33862)
* make jira authentication Python3 compatible
2018-03-22 14:38:01 -07:00
Brian Coca
3bec76fc85 Avoid 2nd processing of facts for actions
include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes #37535, mostly by avoiding reprocessing and 'cleaning'
2018-03-22 17:27:38 -04:00
Toshio Kuratomi
0633f73faf Fix loader for filters (#37748)
* Fix loading of filter and test plugins

Filter and test plugins are different than other plugins in that they
can have many plugins in a single file.  Therefore they need to operate
a little differently.  They need to have all of the potential files
returned.  Then the caller takes care of passing those onto jinja2 in
order for jinja2 to make use of them.

This problem was (most recently) introduced with f921369445

This commit also restructures how we deduplicate plugins to take paths
into account.  If we want to start scoping which set of modules are
loaded (due to roles, for instance) we'll need to hang on to the path
information.

* add integration test for override

* Fix style checks for bcoca code

* Implement jinja2 plugin loader as a subclass

Having a subclass allows us to customize the overriding of jinja
plugins.  We can then move common parts of common code into the Loader.
2018-03-22 17:23:10 -04:00
chenl87
e501134755 [aws] Register scalable target prior to creating/deleting a scaling policy (#35632)
* Added missing scalable target creation

* Changed if statement

* Added support to results of all actions

* Fixed line lengths, whitespaces and blank lines between functions

* Fixed documentation formatting

* Work in progress, fixed returns from functions, still need to do exception handling

* Work in progress, still need to do exception handling

* Moved to AnsibleAWSModule, Added exception handling

* Added detailed return doc

* Fixed return doc alarms

* fixed return yaml

* Fixed function calls when creating/deleting

* fixed unnecessary blank line

* removed imports and unnecessary checks handled by AnsibleAWSModule

* removed whitespace
2018-03-22 16:45:55 -04:00
Ravi
340064bfb9 Fix python3 interpreter issue (#34811) (#35176)
* Fix python3 interpreter issue (#34811)

* Update ansible.module_utils._text (#34811)

* Convert to text later to account for multibyte characters
2018-03-22 12:59:46 -07:00
Sloane Hertel
da3f7a8db1 [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock - fixes #37003 (#37010)
* [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock

Add module warnings rather than silently skipping

* Permit warnings for routes tables containing vpc endpoints to be turned off

* Add tests to ensure a VPC endpoint associated with a route table does not result in a traceback
2018-03-22 15:15:36 -04:00
Sloane Hertel
3a5a0fed06 [cloud] ec2_ami_copy: undeprecate wait_timeout to allow modifiable timeouts again to allow a longer timeout than 600 seconds (#37680)
Fixes #37111
2018-03-22 13:34:47 -04:00
Tony Goetheyn
868811adbc Documentation update (#37782)
- Mention Perl requirement for customisations to work in Linux based OS.
- Fix typo
2018-03-22 13:30:03 -04:00
Lachlan Cooper
fcbee7e40b Check that output from list_vhosts can be split (#37630)
As with list_users, list_vhosts can sometimes return a value that
doesn't contain a '\t' character. This appears to be the case if the
server has no vhosts, for example.

The same fix was applied to the rabbitmq_users module here:
fafb89cde5
2018-03-22 13:03:20 -04:00
Alessandro Asoni
6ad784bbbb Fixed issue with accessing response in digital_ocean module (#37268) 2018-03-22 10:35:56 -04:00
Will Thames
9802088082 New generator inventory plugin (#37690)
* New generator inventory plugin

Allows construction of hosts and groups through cartesian
product of various group combinations

* Add generator plugin documentation
2018-03-22 09:32:15 -04:00
Dag Wieers
2c2f335893
win_psexec: Fix pslint issues (#37718) 2018-03-22 03:21:07 +01:00
Dag Wieers
de5fb66026
win_product_facts: Fix pslint issues (#37722) 2018-03-22 03:18:48 +01:00
Zim Kalinowski
fef5f01b11 adding possibility to specify resource group for referred virtual net… (#36768)
* adding possibility to specify resource group for referred virtual network

* fixed sanity issues

* removed trailing whitespace

* added test

* fixed documentation

* try to fix unstable test

* Tidied up the description of virtual_network_resource_group
2018-03-22 12:10:29 +10:00
Zim Kalinowski
9fb04d20e1 azure_rm_networkinterface: don't query subnet as it's not necessary (#36826)
* don't query subnet as it's not necessary

* fixed pep8?

* another attempt to fix pep8 indentation
2018-03-21 21:59:46 -04:00
Dag Wieers
bc4f8a6786
win_tempfile: Fix pslint issues (#37720) 2018-03-22 01:10:16 +01:00
Jordan Borean
04539ca448
Updated text for azure_rm_virtualmachine around images that can be used (#37686) 2018-03-22 09:34:09 +10:00
Zim Kalinowski
0b828ee830 azure_rm_virtualmachine: adding possibility of disabling public ip address (#36766)
* adding possibility of disabling public ip address

* fixed indent

* fixed whitespace

* fixed mistake

* try to create test with vm without public ip address

* try to fix test

* another attempt for test

* fixing test

* create vm with no ip with different name and delete it immediately

* a few additional fixes

* another attempt to pass test

* must be deleted

* simplified no ip test

* reorganised tests

* Wrapped choice in C()
2018-03-22 09:30:42 +10:00
Zim Kalinowski
89401f13f7 azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)
* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt
2018-03-22 09:16:32 +10:00
Dag Wieers
fdc0e5c5fb
win_defrag: Fix pslint issues (#37719) 2018-03-22 00:06:42 +01:00
Dag Wieers
f78b415db0
win_wakeonlan: Fix pslint issues (#37717) 2018-03-21 23:45:17 +01:00
Yuwei Zhou
8c819dd9cb Support MSI for ansible on Azure resources (#36634)
* msi

* add env and param

* add msi in default

* add azure_rm

* add document

* subscription param

* if not enabled msi

* remove the msi in default mode since the infinite loop will block if not enabled msi

* lint

* lint

* Update azure_rm_common.py

* fix

* catch exc and make error message more friendly

* lint

* Minor docs changes to the msi source option
2018-03-22 06:01:44 +10:00
Matt Clay
aee01564a9 Clean up non-standard module shebangs. 2018-03-21 11:04:55 -07:00
Abhijeet Kasurde
0ae7a0e88c
VMware: Use environment variable for connection (#37726)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 13:31:24 -04:00
Dmitry Ulyanov
1d6bc094cf Add http(s)_proxy support in yum module (#36800)
* added set_env_proxy function for setting proxy environment

Added set_env_proxy function, that set system http(s)_proxy
environment for fetching RPM if proxy settings set in yum.conf file
that fix Issue - #18979

* fix automatic field numbering specification

* changed if statement in setting http_proxy environment

* Change set_env_proxy function to function with decorator

That decorator set system proxy environment from yum.conf and revert
back to system configuration after fetching RPM

* Minor fix

- rename variable schem  to scheme
- change 'in' to 'startswith'

* change decorator set_env_proxy to decorating through contextmanager

- added import contextmanager from contextlib
- set_env_proxy now decorating through contextmanager
- fix http/https setting environment principle
2018-03-21 11:55:36 -05:00
Nathaniel Case
6aed74a97d Fix edgeos_config: {backup: yes} (#37619)
* Fix edgeos_config: {backup: yes}

* Add actual plugin copy
2018-03-21 12:48:09 -04:00
Alexander Bethke
eebe728ae8 Fix SteamOS ansible_distribution fact (Fixes #33628) (#37576)
Fixes #33628
2018-03-21 11:50:54 -04:00
Andreas Mosti
ca634486f1 added parameter for allowing prerelease packages in win_chocolatey for #33243 (#37205)
make sure we don't pass it to state absent

removed trailing whitespace

forcing CI
2018-03-21 15:46:40 +01:00
Abhijeet Kasurde
aadbb6c0b4 VMware: Handle exception gracefully (#36619)
This fix adds logic to handle exception raised from conversion of
user parameter 'memory_mb'.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 10:29:46 -04:00
Murali krishnaswamy
7a4c3e5cad ovrit_cluster: fix for CPU arch entity #37425 (#37436)
* ovrit_cluster: fix for CPU arch entity #37425

* Corrected Indentation

* Condition to check if `architecture` is defined
2018-03-21 09:57:00 -04:00
Julien Vey
ec2e027980 cloudfront_distribution: fix the order of headers to avoid updates again and again (#37340)
* Fix python2/3 compatibilities issues

* Sort cloudfront_distribution headers to avoid useless updates
2018-03-21 22:16:42 +10:00
Alexander Braverman Masis
062a5551e0 ManageIQ module - provider refresh (#37573) 2018-03-21 05:34:24 -04:00
Chaitanya Deshpande
5bdc32ff8d Updated modules for Avi version 17.2.8 (#37344) 2018-03-21 02:47:09 -04:00
Charles V Bock
0214a85382 Correct module name in vcenter_license.py (#37672)
Module name should be vcenter_license not vmware_license.
2018-03-21 00:30:46 +01:00
Julien Vey
850ab534d7 iam_role_facts: Add information about instance profiles associated with the iam roles (#37641) 2018-03-21 09:29:18 +10:00
Ludek Finstrle
81cfbbbeb9 constructed inventory does not use group variables from previous inventory #37397
* Add support for loading invenotry group variables in constructed plugin
2018-03-20 18:26:27 -04:00
alu
b7aa41b9b9 Fix crash in py3: 'TypeError: a bytes-like object is required, not 'str' (#37504)
* Fix crash in py3: 'TypeError: a bytes-like object is required, not 'str'

Fixes #37387

* Review applied https://github.com/ansible/ansible/pull/37504#pullrequestreview-104799823
2018-03-20 14:33:14 -07:00
Toshio Kuratomi
09325b619e
Fix csvfile traceback on Python3 (#37625)
* Fix csvfile traceback on Python3

The csvfile lookup uses some custom iterators.  These needed to be
ported to handle the python3 iterator protocol.  In addition, the
csvfile module takes an iterator of byte strings in Python2 and an
iterator of text strings in Python3

Fixes #36808
2018-03-20 12:58:51 -07:00
Izuke
e02c72d856 Fixes #32146 Fixes reconcile inventory to correctly remove hosts from ungrouped 2018-03-20 15:37:39 -04:00
Toshio Kuratomi
b98ad3a12b Compare byte strings to byte strings
* Fix a traceback in ansible-pull on python3 comparing output from
  subprocess with a text string.
* Rename variables that hold byte strings so we are clear that those are
  not text strings.
* Use to_text() to transform variable that's being displayed as it's
  less fragile than str().

Fixes #36962
2018-03-20 12:04:05 -07:00
Toshio Kuratomi
0d55081ba8 Fix use of user_data field with spot_price in ec2 module (#37628)
The user_data field is base64 encoded inside of the boto library.  In
Python3, base64 must be used with byte strings.  So we make sure to
encode the user_data into a byte string before passing it on to the boto
library.

Fixes #34978
2018-03-20 15:01:24 -04:00
Matt Clay
775539a8b8 Fix api_profile choices in Azure docs fragment. 2018-03-20 11:07:34 -07:00
Phil Nelson
54e70fc783 Fix name parameter templating in include_role module (#36372)
An IncludedFile() object built using the original_task will have
its _task bound to the original_task. The iterative reassignment of
original_task._role_name during with_item loops leaves all returned
included_files with the same ._task._role_name (the final name from
the with_items list). This commit builds IncludedFile() objects
from an original_task.copy() to avoid the problematic binding.
2018-03-20 14:01:48 -04:00
Matt Martz
6c3e565ba3
Fix py3 issue in wait_for_connection (#37646) 2018-03-20 11:21:19 -05:00
Matt Martz
b95b077993 Restore skipped/failed in JSON callback, add custom facts (#37204)
* Restore skipped/failed keys. Fixes #37050

* Display custom stats. Fixes #37184

* Add version_added

* Drop fallback, use self.get_option

* Remove unused import
2018-03-20 10:32:33 -04:00
Aleksander Kovtunenko
f51a6ea832 implemented installroot option (#33613)
* fix

* move version to 2.6
2018-03-20 10:41:50 +00:00
Chaitanya Deshpande
334b291720 Added module for L4 Policy Set (#37346)
* Added module for L4 Policy Set

* Fixed review comments
2018-03-20 10:30:23 +00:00
Chaitanya Deshpande
b0a8d823d2 Added module for User Account (#37347) 2018-03-20 10:13:10 +00:00
Samer Deeb
a89bafce2e issue:37306 Fix issue with vlan support for onyx version 3.6.6000 (#37310)
* issue:37306 Fix issue with vlan support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-20 10:08:35 +00:00
Claes Nästén
6308047dc9 nso_verify handle leaf-list in 4.5 and identityref (#37393)
NSO verify did not handle leaf-list value verification in 4.5 and
later due to changes made for configuration writing made.

map prefix for identityref types in verification.
2018-03-20 10:01:36 +00:00
Trishna Guha
00abe6dbe7
fix UnboundLocalError nxos_bgp_af module (#37610)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-20 01:53:08 +05:30
Fabian von Feilitzsch
716e170821 Auth method for the k8s lookup plugin now matches other modules (#37533) 2018-03-19 15:00:05 -04:00
Alessandro Arnone
ffd1200948 [cloud] ec2_asg: wait for the lifecycle hooks - Fixes #37281 (#37282)
Wait for the lifecycle hooks by matching states `Terminating:Wait` and `Terminating:Proceed` in addition to `Terminating`.
2018-03-19 14:59:07 -04:00
JP Mens
357beeb7ae Address some language in EXAMPLES (#37555) 2018-03-19 13:51:23 -04:00
Andrew Gaffney
0d0bdbec62 Load plugin config defs on first load only (fixes #37553) (#37584) 2018-03-19 13:34:15 -04:00
René Moser
3e44186137
cs_instance: add new template filter all (#37571) 2018-03-19 17:27:16 +01:00
Claes Nästén
9c668fb167 nso_action use json result format if available in NSO (#37395)
Use JSON result format when it is available and make the result format
returned look like it when JSON result format is not available in NSO.
2018-03-19 15:17:12 +00:00
Claes Nästén
458a07d5a4 add timeout parameter and increase default timeout for nso modules (#37391)
NSO operations can take much longer than 10 seconds as they operate on
real network equipment, set default timeout to 5 minutes and allow for
user override.
2018-03-19 15:12:58 +00:00
Adrian Likins
e166946a0a Fix redundant yaml error blurbs on ModArgs parse errors (#36923)
* Fix redundant yaml error blurbs on ModArgs parse errors

Some of the AnsibleParserErrors from parsing.mod_args
are created with the obj=some_yaml_ds options but
some are not.

If they were, we don't want to add another yaml_ds to
it, because that will result in double yaml error blurbs.
And since we dont need to add info, we can just re raise it.

But if there is no ._obj, add it here so we get the extra
detail in the error message (see issue #14790) and raise
a new AnsibleParserError instance.

Fixes #36848

* cleanup existing test_tasks pep8/sanity issues
2018-03-19 10:55:29 -04:00
Julien Vey
6281441e4d cloudformation: add create_timeout attribute (#36445)
* cloudformation: add create_timeout attribute
* No default value
* Only applies on stack creation
* In minutes
2018-03-19 10:38:17 -04:00
Claes Nästén
f8d20f970f Update Cisco NSO module required versions. (#36736)
NSO modules will now work with older versions of NSO, update version
requirements.
2018-03-19 14:18:44 +00:00
Julien Vey
26d9de6f3e apt_repository: check attribute repo for None value (#36944) 2018-03-19 10:16:43 -04:00
Martin Krizek
5be9315603 apt: use to_native instead of str for exc (#37595) 2018-03-19 19:00:58 +05:30
Felix Fontein
60fee5154b letsencrypt: don't mask values specified in data (#37556)
* Don't mask values specified in data.

This heavily improves readability of error messages such as
'Authorization for ******** returned in********:  CHALLENGE: ********-01 DETAILS: Incorrect TXT record "********" (and 1 more) found at ********.********;'
(verbatim quote).

* Added documentation.
2018-03-18 16:51:50 -04:00
Toshio Kuratomi
e356e13d66 Fix the initial value of a variable
This should be a dict, not a string.

Fixes #37455
2018-03-18 09:45:29 -07:00
Diogo Baeder de Paula Pinto
5d9090fbd7 Adding metadata from existing app to the JSON results, so that, for example, the app port can be referenced later 2018-03-18 09:43:41 -07:00
Diogo Baeder de Paula Pinto
a97d8dff5a Fix argspec for webfaction modules
* Fixing webfaction_domain "subdomains" argument parsing - must coerce to list, not string
* Fixing webfaction_db and webfaction_app "machine" argument default
2018-03-18 09:43:41 -07:00
cclauss
d30554bc90 Network F5: Adjust for Python 3 scoping rules (#37554)
This PR makes and adjustment for Python 3 scoping rules which differ from Python 2.  In Python 3, the variable __ex__ goes out of scope at the exit of the __try-except__ block.  This means that when __ex__ is referred to on the lines that follow, it would be an _undefined name_ causing a __NameError__ to be raised instead of the expected __ConnectionError__.

flake8 testing of https://github.com/ansible/ansible on Python 3.6.3
The command "echo ; echo -n "flake8 testing of ${URL} on " ; python -V" exited with 0.
130.72s$ time flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./lib/ansible/module_utils/api.py:114:21: F823 local variable 'retry_count' (defined in enclosing scope on line 107) referenced before assignment
                    retry_count += 1  # pylint: disable=undefined-variable
                    ^
./lib/ansible/module_utils/six/__init__.py:54:20: F821 undefined name 'basestring'
    string_types = basestring,
                   ^
./lib/ansible/module_utils/six/__init__.py:55:27: F821 undefined name 'long'
    integer_types = (int, long)
                          ^
./lib/ansible/module_utils/six/__init__.py:57:17: F821 undefined name 'unicode'
    text_type = unicode
                ^
./lib/ansible/module_utils/six/__init__.py:658:16: F821 undefined name 'unicode'
        return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
               ^
./lib/ansible/module_utils/six/__init__.py:754:37: F821 undefined name 'basestring'
            if not isinstance(data, basestring):
                                    ^
./lib/ansible/module_utils/six/__init__.py:757:32: F821 undefined name 'file'
            if (isinstance(fp, file) and
                               ^
./lib/ansible/module_utils/six/__init__.py:758:38: F821 undefined name 'unicode'
                    isinstance(data, unicode) and
                                     ^
./lib/ansible/module_utils/six/__init__.py:768:32: F821 undefined name 'unicode'
            if isinstance(sep, unicode):
                               ^
./lib/ansible/module_utils/six/__init__.py:774:32: F821 undefined name 'unicode'
            if isinstance(end, unicode):
                               ^
./lib/ansible/module_utils/six/__init__.py:782:36: F821 undefined name 'unicode'
                if isinstance(arg, unicode):
                                   ^
./lib/ansible/module_utils/six/__init__.py:786:23: F821 undefined name 'unicode'
            newline = unicode("\n")
                      ^
./lib/ansible/module_utils/six/__init__.py:787:21: F821 undefined name 'unicode'
            space = unicode(" ")
                    ^
./lib/ansible/modules/cloud/misc/rhevm.py:594:24: F821 undefined name 'e'
            setMsg(str(e))
                       ^
./lib/ansible/modules/cloud/openstack/os_user.py:202:38: F821 undefined name 'shade'
    if description and StrictVersion(shade.__version__) < StrictVersion('1.13.0'):
                                     ^
./lib/ansible/modules/cloud/openstack/os_volume.py:153:27: F821 undefined name 'shade'
            StrictVersion(shade.__version__) < StrictVersion('1.22')):
                          ^
./lib/ansible/modules/files/archive.py:391:92: F821 undefined name 'e'
                module.fail_json(dest=dest, msg='Error deleting some source files: ' + str(e), files=errors)
                                                                                           ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:379:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:399:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:403:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:418:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/f5/bigip_device_httpd.py:461:40: F821 undefined name 'ex'
        if 'Connection aborted' in str(ex) and 'redirectHttpToHttps' in params:
                                       ^
./lib/ansible/modules/network/f5/bigip_device_httpd.py:465:33: F821 undefined name 'ex'
        raise F5ModuleError(str(ex))
                                ^
./lib/ansible/modules/network/ironware/ironware_facts.py:274:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/ironware/ironware_facts.py:514:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
24    F821 undefined name 'basestring'
1     F823 local variable 'retry_count' (defined in enclosing scope on line 107) referenced before assignment
25
2018-03-17 19:19:43 -07:00
Felix Fontein
190755ff65 Fixing domain to authorization matching for ACME v2. (#37558) 2018-03-17 19:03:16 -04:00
Dag Wieers
51662acc6c
Clean up Grafana docs a bit (#37516)
* Clean up Grafana docs a bit

But more is needed, default values, missing choices, proper
descriptions, actual sentences :-)

* Remove validate-modules entries
2018-03-17 02:53:26 +01:00
Luca Lorenzetto
e541bed186 Added parameters to na_cdot_volume (#37202)
* Added parameters to na_cdot_volume

Before this commit there were no parameter for creating a volume
and exporting it as NFS volume. The added parameters are:
- *junction-path* for specifying where to mount the volume in the namespace
- *export-policy* for specifying which export policy to apply to the given namespace
- *snapshot-policy* if required, applying a snapshot policy for scheduling data protection tasks

* Sanity fixes

* Sanity fixes (2)
2018-03-16 15:14:06 -04:00
Ryan Petrello
872a7b4a7a add some Tower module integration tests (and fix a bug or two) (#37421)
* add additional test coverage for tower modules

* add test coverage for the tower_credential module

* add test coverage for the tower_user module

* fix a bug in py3 for tower_credential when ssh_key_data is specified

* add test coverage for tower_host, tower_label, and tower_project

* add test coverage for tower_inventory and tower_job_template

* add more test coverage for tower modules

- tower_job_launch
- tower_job_list
- tower_job_wait
- tower_job_cancel

* add a check mode/version assertion for tower module integration tests

* add test coverage for the tower_role module

* add test coverage for the tower_group module

* add more integration test edge cases for various tower modules

* give the job_wait module more time before failing

* randomize passwords in the tower_user and tower_group tests
2018-03-16 13:28:19 -04:00
Nathaniel Case
594840c1d6
Close & remove paramiko connection where appropriate (#37528)
* Close & remove paramiko connection where appropriate

* Update unit test
2018-03-16 13:28:04 -04:00
Jack
93d2761551 Fix typo in timezone.py (#37442) 2018-03-16 11:18:03 +05:30
Sloane Hertel
16f8a993a0 Increase delay and tries for ec2_vpc_net backoff - fixes #36063, fixes #37323, fixes #36078 (#37354)
* Increase delay and tries for ec2_vpc_net backoff

Wait for DHCP option to be created in ec2_vpc_dhcp_option

Wait for all modifications to the VPC

* Use the vpc_available waiter because is uses Filters

* Missed one

* Optimize retries to only occur if the functionality is available

* Increase max wait time

* Add comments to explain what the waiters are doing
2018-03-16 08:07:54 +10:00
Dag Wieers
cdd21e2170
Clean up module documentation (#36909)
* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
2018-03-15 22:15:24 +01:00
Ondra Machacek
a6617e4357 ovirt: Fix documentation for interface parameter (#37459) 2018-03-15 13:31:22 -04:00
Nathaniel Case
85cc5ea129
Raise error when trying to use older iosxr modules with netconf (#37423) 2018-03-15 12:49:35 -04:00
Martin Krizek
a6d31b6fb1
apt: better error msg when update_cache fails (#37410) 2018-03-15 17:32:25 +01:00
Mans Matulewicz
6292fe1116 small typo fix
small typo fix
2018-03-15 11:01:32 -04:00
S. Veyrié
d3df0249af maven_artifact: add verify_checksum option - fixes #31799 (#33370)
* maven_artifact: add verify_checksum option - fixes #31799

* maven_artifact: some cleaning

* Remove blank lines to please the format checker

* Now targeting 2.6...
2018-03-15 06:43:08 -04:00
saichint
05b266cc66 fix nxos_udld issues (#37418) 2018-03-15 15:37:46 +05:30
Martin Krizek
995f6c7689
apt: clarify allow_unauthenticated docs (#37453)
* apt: clarify allow_unauthenticated docs

* Fix sanity check
2018-03-15 10:07:18 +01:00
Toshio Kuratomi
5bdc8fe9f6 Clarify the apt module force documentation (#37353)
The force parameter is inherently insecure.  Be clearer in the
documentation that this is the case.

Fixes #25242
2018-03-15 01:24:32 -07:00
Shinichi TAMURA
73512eeb78 timezone module: allow suse linux as target (#36719)
* timezone module: allow suse linux as target

* use with statement for file handling
2018-03-15 04:00:28 -04:00
Trishna Guha
dd37857884
fix ios_l2_interface (#37389)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-15 11:33:59 +05:30
Pilou
c718c42df4 ansible_tower modules doc: fix typos, use formatting functions (#37414)
* fix typos

* use formatting functions

* use 'job template' instead of 'job_template'

* acronyms: user uppercase

* become_enabled param is about privilege escalation
2018-03-15 13:58:50 +10:00
Simon Legner
4bba66e664 doc: Update pscx examples (#37245)
* win_chocolatey: replace pscx example

PSCX is no longer distributed via Chocolatey: https://chocolatey.org/packages/pscx#comment-3762408157

* win_unzip example: install psxc via win_psmodule
2018-03-15 09:10:58 +10:00
jjshoe
ff15a9e7e2 Document that this module was renamed recently (#37420) 2018-03-14 11:36:42 -07:00
Ricardo Carrillo Cruz
dd0140dfed
Add a note to iosxr_(command|config|facts) stating netconf is not supported (#37394) 2018-03-14 13:24:31 +01:00
Simon Dodsley
841cb0e6a4 Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
Pilou
4378542ac7 Connection error messages are unsafe: wrap them (#37329)
* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied
2018-03-13 16:20:24 -07:00
Felix Fontein
042ad70da0 Production ACME v2 endpoint is available. (#37369) 2018-03-13 16:59:50 -04:00
Ryan Brown
93946ba627 Use NormalizedOperationMethod to catch ClientErrors so the waiter can handle them properly (#37356) 2018-03-13 16:02:39 -04:00
Adrian Joian
123694397a [openstack][docs] Fixing spelling error (#37351) 2018-03-13 14:21:23 -04:00
Toshio Kuratomi
31878ee0ea Fix ansible_lo being used inside of ansible_facts
The logic was keeping ansible_facts['ansible_lo'] instead of fixing it
to be ansible_facts['lo']
2018-03-13 12:05:14 -04:00
Sam Doran
aeb56e4bbe
Accept list or string for ports is seport module (#36661)
* Accept list or string for ports is seport module

Fixes #36466

* Update docs
2018-03-13 12:04:27 -04:00
Deepak Agrawal
a1026dbce5
Eos :do not push config to device if check_mode is enabled (#37287)
* eos can not check config without config session support

* add testcase for check_mode without config session

* fix eos eapi to read use_session env var
2018-03-13 17:13:23 +05:30
saichint
dc61f4c6b1 Fix nxos_vrf issues (#37092)
* fix nxos_vrf issues

* fix doc
2018-03-13 17:08:37 +05:30
Trishna Guha
ba5e562c76
Fix nxos_l2_interface and test typo (#37336)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-13 13:36:38 +05:30
Mike Wiebe
ff57fd0bb4 Fix nxos_switchport (#37328) 2018-03-13 12:03:05 +05:30
Samer Deeb
9031533c0c issue:36955 remove creating temp file for debug
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-12 23:06:08 -04:00
Dag Wieers
80ba7b7402 Various module doc fixes (#37256)
This PR includes:
- A fix for multiple-choice defaults
- A fix for messed up dictionary samples
- Cleaner defaults when they don't appear part of choices
2018-03-12 13:50:52 -07:00
Toshio Kuratomi
b945846814 Remove dead code
I wrote this code because we had a traceback at some point with pyyaml
not able to handle our AnsibleUnicode type (the C library was doing an
exact match to python's unicode type rather than testing with the object
inheritance hierarchy.) Neither jimi think that AnsibleUnicode gets
passed into this function anymore, though, so we think it is safe to remove.
2018-03-12 12:13:19 -07:00
Julien Vey
099d8f0b56 route53_zone: enable check mode (#37201) 2018-03-12 14:43:43 -04:00
jeffreykoetsier
d54675b44b Add support for Cloudformation's parameter attribute UsePreviousValue (#31775)
* Add support for Cloudformation's parameter attribute UsePreviousValue
2018-03-12 13:46:36 -04:00
Felix Fontein
3ce325e35e Improving EC account key parsing (see #37275). (#37293) 2018-03-12 06:54:06 -04:00
William L Thomson Jr
d1332b83ee Add support for --quiet-build and --quiet-fail to portage module
PR #36452
2018-03-12 11:19:07 +01:00
Sebastian Gumprich
16c564c4b4 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes
2018-03-12 11:00:19 +01:00
Abhijeet Kasurde
a50db37c6c New module : digital_ocean_image_facts (#35887)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-11 11:43:23 -04:00
Mikhail Naletov
3bf6c50fa9 terraform: fixed typo, name error sdtout -> stdout (#37253) 2018-03-10 23:44:37 +01:00
Ondra Machacek
c5c78ab045 ovirt_vms: Pass correct VM entity to create method (#37249) 2018-03-10 04:41:23 -05:00
Ed Costello
1ceaf84108 Document compare_policies utility in AWS guidelines. (#37174) 2018-03-09 16:19:55 -05:00
Victor da Costa
cb53b717a4 Ansible Galaxy: skel for network role #37241 (#37251)
* Skel for network role (#37241)

Skel and boilerplate for network role.

* Add network option as valid type
2018-03-09 13:31:27 -05:00
mikedlr
c2a063a5c0 aws ssm parameter lookup - testing and documentation around negative and failure cases (#36550) 2018-03-09 12:30:33 -05:00
Dennis Glindhart
5506229e79 Remove restriction of SRV protocols (#36709) 2018-03-09 09:22:01 -05:00
Ganesh Nalawade
b440544e73
eos_config module exit session gracefully (#37244)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.
2018-03-09 19:24:23 +05:30
Trishna Guha
2501834c42
add nxos_snapshot test for missing required param (#37248)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-09 17:47:14 +05:30
Dylan Murray
90943a3362 Add APB role_type to ansible-galaxy init (#36789)
* Add APB role_type to ansible-galaxy init

* Add handlers scaffolding

* Fix shippable errors by setting default

* Add unit tests and fix shippable

* Updates init description
2018-03-09 06:50:17 -05:00
Trishna Guha
a10df8b0b5
fix required args for nxos_snapshot and docs improvement (#37232)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-09 14:08:01 +05:30
Markos Chandras
5234b78b5f modules: zypper: Optimize the 'search' subcommand (#37191)
When looking for installed packages we do not need to query
repositories since we only care about the rpmdb. As such, we can
disable all the repositories operations in order to improve the
performance of that step

Before this patch, when using 'state: present' in the zypper module,
the operation was taking about 12 seconds to complete:

time ansible-playbook foo.yml 1>/dev/null

real	0m12.614s
user	0m10.880s
sys	0m0.683s

After this patch:

time ansible-playbook foo.yml 1>/dev/null

real	0m4.193s
user	0m2.560s
sys	0m0.575s

see:
https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
2018-03-09 03:28:36 -05:00
saichint
74e79d9f5e fix nxos_vrf_af issues (#37211) 2018-03-09 12:20:27 +05:30
Abhijeet Kasurde
c25a42bef6 VMware: New module : vmware_datastore_cluster (#36365)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-08 23:44:15 -05:00
Abhijeet Kasurde
1ec3d1f768 VMware: refactor vmware_datacenter (#36214)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-08 23:36:27 -05:00
Tim Smith
e479e55f59 Fix the docs link to Ohai in the Ohai module (#33788) 2018-03-08 17:00:17 -08:00
Jordan Borean
708869edd6
win: handle non string as an environment value (#37215)
* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars
2018-03-09 08:02:54 +10:00
Ivan Mikheykin
58261a42e9 Auto install of python-apt without recommends.
debian:9

`apt-get install python-apt` - this will install python2.7 and python3
After this operation, *88.4 MB* of additional disk space will be used.

`apt-get install --no-install-recommends python-apt` - only python2.7
After this operation, *35.0 MB* of additional disk space will be used.

(cherry picked from commit c542e62)
2018-03-08 16:21:30 -05:00
Sam Doran
3134ba6bee
Do not try to add an entry if none exist (#37152)
When commit revisions are disabled, there will be no revision items returned.
Add note about setting ANSIBLE_PERSISTENT_COMMAND_TIMEOUT to a higer value to avoid timeouts.
2018-03-08 14:36:32 -05:00
René Moser
0130490faa
cs_instance: fix py3 user_data base64 (#37135)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3
2018-03-08 17:05:57 +01:00
René Moser
4b6b2d4206
vultr: fix py3 compat (#37171)
* vr_server: fix base64 encoding with py3

* vultr: fix AttributeError with py3
2018-03-08 16:46:06 +01:00
Felix Fontein
155adb1631 Using correct content type (as per version 10 of ACME draft). (#37165)
* Using correct content type (as per version 10 of ACME draft).

* Another incompatibility with ACME v2: body must be {} and not contain v1 data (Pebble fails otherwise).

* Fixing bug: self.args in a subclass of Exception is apparently always a tuple.
2018-03-08 09:11:20 -05:00
Trishna Guha
02999b77a4
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-08 18:10:04 +05:30
Ondra Machacek
d45ceb3a4f ovirt_hosts: Add option to choose to reboot the host (#35956) 2018-03-08 06:07:03 -05:00
Rene Moser
190d3fbbed cs_instance: fix error when state destroyed but querying user_data 2018-03-08 10:32:01 +01:00
John R Barker
6c8d40f653
yum is Python 2 only. If Python 3 use dnf (#37140)
* PY3 = dnf

Red Hat are unlikely to provide a Python 2 version of the yum bindings
as they are moving to `dnf`.

If Ansible can't find the yum Python library give the user a hint about
dnf and Python 3
2018-03-08 08:10:07 +00:00
Aren
2a0971435f examples fix: mode selection (#37128)
Mode selection in the examples didn't match (or work) for system: true.
It should be 
`mode: <mode here>`
2018-03-07 23:28:06 -05:00
Toshio Kuratomi
cca0ccaf97
Fix unarchive with strip-components in extra_opts (#37048)
* Fix unarchive with strip-components in extra_opts

When unarchive is given extra_opts to strip all leading directories, it
could end up trying to change the permissions on the root directory.
Tar archives shouldn't contain absolute paths anyways so make sure that
all paths are relative as we handle them.

Fixes #21397
2018-03-07 17:14:51 -08:00
Jordan Borean
c1f5e11cdf
win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104) 2018-03-08 09:43:42 +10:00
Abhijeet Kasurde
8f3f7f104f DigitalOcean: typecast map function for Python3 (#37126)
In Python2, `map` returns list whereas Python3, `map` function
 returns iterator. This fix typecast map function for Python3.

Fixes: #37114

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-07 11:31:23 -05:00
Julien Vey
51d491f8f0 route53_zone: move to boto3, and enable comment update (#36641) 2018-03-07 11:16:04 -05:00
TJ Tang
11f9286ab6 Fixes #37042
* correctly check that the no_device attribute is specified
 * ignore volume_size requirement if no_device is specified
2018-03-07 10:28:54 -05:00
Ondra Machacek
99ce712259 ovirt_host_networks: Fix idempotency (#37075) 2018-03-07 10:25:32 -05:00
bdowling
0fee332643 Added missing store regex pattern for prompt found after error (#35820) 2018-03-07 09:35:35 -05:00
Pilou
bc6b96d42e webfaction modules: fix broken import (#35024)
* webfaction_app: fix broken import
* doc: use formatting functions
* webaction_db: fix broken import
* webfaction_domain: fix broken import
* webfaction_mailbox: fix broken import
* webaction_site: fix broken import
* webfaction modules: fix doc
2018-03-07 06:22:06 -08:00
René Moser
e1297af18a cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt
2018-03-07 13:34:39 +00:00
René Moser
67d8c8f5c6 cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc

* update ignore.txt
2018-03-07 13:15:39 +00:00
René Moser
2559e832df
cloudstack: fix common E324 in docs (#37082)
Notes about precedence of common args.
Partly fixes E324.
2018-03-07 11:09:08 +01:00
radixdlt
c6a6ea5d98 Add reference to VNET resource group (#34576)
Ported #26052
2018-03-07 04:01:33 -05:00
Nathaniel Case
efb8b539c1
Don't fail on configure in command (#37011)
* Don't fail on configure in command

* Change test to check mode
2018-03-06 18:10:09 -05:00
Jordan Borean
67ffde4ac1
win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used (#36762)
* win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used

* removed reverse dns lookup in port check
2018-03-07 08:40:57 +10:00
René Moser
4705edd1a7
letsencrypt: add new param force (#37077)
* letsencrypt: add new param force to ignore remaining days

* letsencrypt: fix E325
2018-03-06 20:51:24 +01:00
Nathaniel Case
f0dc0b28d4
Fix side-effect of flags being passed to ios get_config again (#37084) 2018-03-06 13:55:36 -05:00
Anil Kumar Muraleedharan
23f15e6ff6 Lenovo license update (#36840)
* Editing the License text after Review of Lenovo Legal team.
2018-03-06 18:02:46 +00:00
Alvaro Aleman
c9cb0016a0 Fix consul module service deregistration (#34847)
* Fix consul module service deregistration

Upstream pr in the python-consul library:
https://github.com/cablehead/python-consul/pull/174

This is based on work from https://github.com/bobh

Fixes ansible/ansible#34628

* Pass ACL token when deregistering consul service
2018-03-06 11:57:04 -05:00
skylerbunny
d984afa5ba Add compatibility for docker-py version 3 (#36973) 2018-03-06 07:14:31 -05:00
John R Barker
ebc71bcb16
Network modules to link to network guide (#37033)
* Network modules to link to network guide

* Make it clear what's deprecated
* enable -> become
* Detail when provider is still needed (eAPI/NX-API)
* Link to specific sections
* rx_rate & tx_rate to link to conditional docs
2018-03-06 12:01:07 +00:00
Trishna Guha
5f3feac7fa
remove unused tx_rate and rx_rate from vyos_interface (#37062)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-06 16:38:48 +05:30
saichint
4ed0e5072d fix nxos_vrrp issues (#36930) 2018-03-06 13:36:50 +05:30
Mike Wiebe
51e8eab9db Fix n3k separate to combined image upgrade (#37017)
* Fix n3k separate to combined image upgrade

* Address review comments
2018-03-06 10:05:08 +05:30
Ganesh Nalawade
ba3201cd2f
Fix eos integration test failures (#37020)
Fixes #36919

Fix other eos modules integration test failure in dci
2018-03-06 10:04:40 +05:30
Dag Wieers
cb79957b5f
Make use of named links in documentation notes (#37027)
* Make use of named links in documentation notes

Now that it is possible to name external links, we are making use of
this to make the documentation better.

* Add improvements to ACI documentation

* Disable QA for long line

* Add :menuselection: and :guilabel:

* Improve links on some modules
2018-03-06 00:05:13 +01:00
Ryan Brown
c8ef07e015 Route custom waiter (#36922)
This creates a way for us to use boto3's data-driven waiter support to use custom waiters where Boto3 hasn't implemented them yet.

The only waiter implemented so far is for VPC Route Tables to check that they exist, and this replaces some custom retry code.
2018-03-06 08:22:16 +10:00
Mikhail Naletov
51558f12f4 Added variables to destroy command (#37028) 2018-03-05 16:09:03 -05:00
Toshio Kuratomi
1bc860fafd
Python3 issues in maven_artifact (#37035)
Fixes #33761
2018-03-05 12:11:27 -08:00
Grigory Starinkin
2d98a2de68 fix python3 compatibility for znode module
kazoo client requires bytes and not string
2018-03-05 12:00:46 -08:00
David Newswanger
905b3e2f65
fix NIOS DNS lookup example (#36737) 2018-03-05 13:52:02 -05:00
msven
a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
2018-03-05 11:47:31 -05:00
Mike Klebolt
ce416f247f Fixes commit a28eb94, which broke validate_certs = False for python < 2.7.9 (#34887) 2018-03-05 11:34:03 -05:00
Guillaume Coré
daeec920b0 ini_file: add allow_no_value param (#24442) 2018-03-05 17:05:41 +01:00
Mikhail Naletov
7d0e1f92f4 [terraform] Support initializing modules and providers at runtime (#36996)
* Fixes #36994

Added function for force initializing modules and providers

Added type for force_init parameter
2018-03-05 11:01:53 -05:00
Nathaniel Case
7016b3b9ca
ios_static_route idempotence fix (#35912)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate
2018-03-05 09:28:37 -05:00
Nathaniel Case
0feea66988
Move _start_connection() to module_utils/connection and fix Popen() call (#36249)
* Fix Popen() call to use ansible python

* Remove PATH searching, reuse location of ansible instead
2018-03-05 09:12:01 -05:00
Peter Sprygada
6cbc69447b adds fix for terminal plugins 2018-03-05 08:54:40 -05:00
Peter Sprygada
18d605a132 ugh q 2018-03-05 08:54:40 -05:00
Peter Sprygada
d1ff03e84c fixes cliconf and netconf plugin loaders
This change updates the configuration and plugin loader objects for
cliconf and netconf to pull be able to configure where to find the
plugins.
2018-03-05 08:54:40 -05:00
abirami-n
4021194532 Fix_regex (#36569) 2018-03-05 06:30:37 -05:00
René Moser
6578403288
cs_zone_facts: implement return facts as ansible returns (#36993) 2018-03-05 11:42:38 +01:00
Abhijeet Kasurde
d1eb4fe58c
VMware: Refactor vmware_target_canonical_facts (#36964)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:20:47 +05:30
Abhijeet Kasurde
e0945900df
New module: digital_ocean_snapshot_facts (#35897)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:19:58 +05:30
John Smith
8824a8fe23 Assume firewall is offline on DBUS_ERROR during init (#36486)
During init, the FirewallClient tries to connect to the DBUS socket.  If it
fails to connect it should be safe to assume firewalld is offline.
2018-03-03 21:59:10 -06:00
Patrick Marques
83aaa8137a Fix Base64 decode TypeError (#36968)
```
TypeError: expected bytes-like object, not str
```
2018-03-03 16:33:07 -05:00
Abhijeet Kasurde
b973fff276
New module: digital_ocean_load_balancer_facts (#36966)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:54 +05:30
Abhijeet Kasurde
3ead89e3c5
New module: digital_ocean_tag_facts (#36965)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:21 +05:30
Will Thames
aa1e491244 [cloud aws_s3] Enforce required parameters for the various aws_s3 modes (#36767)
[cloud aws_s3] Most modes require `object` parameter, and this is easy to
get wrong (e.g. through confusion with the `dest` parameter). As
it's as easy to enforce, let's do that.
2018-03-02 16:33:04 -05:00
Will Thames
836d7a42a4 Remove old boto documentation and promote AnsibleAWSModule (#36763)
There should no longer be a need for boto documentation - it
just adds significant extra clutter to the guidelines.

AnsibleAWSModule greatly improves the codebase to such an extent
that we should mandate it for new code unless there is a
documented good reason.
2018-03-02 14:03:12 -05:00
Abhijeet Kasurde
3a161fa157
VMware: new module : vmware_datastore_maintenancemode (#36436)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-02 23:35:53 +05:30
Ryan Brown
2f72d082c0 Use Tower v2 API when available, falling back to v1 where necessary (#36663)
* Use Tower v2 API when available, falling back to v1 where necessary
2018-03-02 11:31:53 -05:00
Kevin Breit
a3390b63fe Reversed orser of icmp_type and icmp_code per bug 36378 (#36380) 2018-03-02 16:09:32 +01:00
Trishna Guha
ef7f3fcab6
eos_static_route fix (#36903)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-02 08:50:27 +05:30
Ed Costello
07bc98f019 Additions to AWS Module Guidlines from Pull Request Feedback (#36834)
* Update doc of AnsibleAWSModule to remove incorrect connect example.

Current example uses aws_connect method which no longer exists. Replace
this with the client and resource methods that do exist.

Also remove try/except block in connect example as guidelines imply that
there aren't connection errors thrown on connection, just when later
sing the connection.

* Update AWS module guidelines to include the AnsibleAWSModule connection methods.

* Add information on integration testing to the AWS module guidelines.

* Add information on common documentation fragments to AWS module
Guidelines.

* Changes as requested on PR.

* Restructure connection section to start with current best practice
* Explain the use of the CI build groups
* Use YAML Anchors for aws credentials example

* Replace guidance on use of test groups with link to aliases file.

This achieves the goal of explaining why this file is necessary without
introducing overhead of keeping documentation up to date when test
groups change.
2018-03-02 11:40:01 +10:00
Dag Wieers
858d10a91a
Clean up VMware BOTMETA and author/license info (#36873)
* Clean up vmware BOTMETA

This removes everything that's already part of the module docs. So
basically the BOTMETA file only extends the information from the module.

* Updated author information and copyright statement
2018-03-02 01:07:17 +01:00
Sloane Hertel
9deef5626f Only create tags if tags are provided (#36921) 2018-03-01 15:30:08 -05:00
Ryan Petrello
0e7106b106 properly pass /api/v1/ credential fields for older Towers (#36917) 2018-03-01 15:22:29 -05:00
Mikhail Naletov
7ade607525 Add variables and variable_file in terraform module (#36879)
* Fixes #36837

Added terraform variables for validate command

* Fixes #36837

Changed method from append to extend.
2018-03-01 12:50:49 -05:00
Ganesh Nalawade
b12e90311f
map network_os to ncclient device_params (#36819)
* map network_os to ncclient device_params

Fixes #36786

* update device map

* Add default netconf fallback plugin
2018-03-01 22:23:14 +05:30
Ryan Petrello
a82043939b properly detect the absence of credential_type in older tower-cli (#36908) 2018-03-01 10:36:18 -05:00
Chris Houseknecht
ac11027d58
Convert key to snake. Fixes #36845. (#36887) (#36904) 2018-03-01 10:03:32 -05:00
Pierrick Caillon
808f45db55 Allow configuration of manual mac address (#35504) 2018-03-01 20:24:40 +05:30
Kevin M. Gallagher
3a6f0fbb9c Allow inversion of uid_owner match in iptables module (#36073)
Fixes #20747 and updates documentation for uid_owner in iptables.py
2018-03-01 12:24:02 +00:00
Shawn Q Jackson
9db509db80 corrected typo in documentation examples (#36894) 2018-03-01 08:55:28 +01:00
Ganesh Nalawade
41d75783b5
Fix junos_command py3 related issues (#36782)
Fixes #36204

*  tostring() input string shoulb be in byte string format
*  to_ele() input is required in unicode format
2018-03-01 12:09:11 +05:30
Trishna Guha
2fbfce06e7
Fix nxos_interface multiple issues (#36827)
* fix interface_type

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

* fix setting mtu, doc for state check param, doc for params applicable for ethernet intf

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

* speed idempotence and add unittest

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

* fabric_forwarding_anycast_gateway applicable for svi type intf only

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

* fix speed

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-01 10:56:16 +05:30
ABond
e2615308f9 Include Digital Ocean Token Alias (#36810) 2018-03-01 09:56:53 +05:30
Abhijeet Kasurde
0694aca2a0
VMware: refactor configure disk logic (#36617)
This fix corrects logic related to disk parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-01 09:36:54 +05:30
Brian Coca
809106ba77 fix unixy when debug's msg is not text (#36882)
fixes #36850
2018-03-01 09:23:39 +10:00
Pilou
274a4b0688 gitlab_project: don't ignore errors (#36702)
* gitlab_project: check that errors are reported

* gitlab_project: report encountered errors

Fix #36495
2018-02-28 23:22:47 +01:00
Jordan Borean
c3a805aa3c minor wording changes to remove ambiguity 2018-02-28 16:47:41 -05:00
Michael Gajda
45e7689335 Fix lineinfile example
The examples comment said 'Add a line to a file if it does not exist, without passing regexp' which suggests, that the file is being created. But the default for 'create' is false. Thus the example lacked this option.
2018-02-28 16:47:41 -05:00
Yanis Guenane
6633eaa2c1 crypto: Fix incorrect type for privatekey_passphrase (#36868)
Fix incorrect type for privatekey_passphrase path -> str
2018-02-28 17:19:22 +01:00
Abhijeet Kasurde
529bc0edc6
New module: digital_ocean_size_facts (#35898)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 20:11:53 +05:30
mikedlr
3f19ef680a aws_ssm_parameter_store module - value parameter should be no_log since it's often a secret (#36843) 2018-02-28 14:40:58 +00:00
Gaurav Rastogi
60e39b9718 Updated the documentation of modules to match argspec including the type setting for bool parameters (#36821) 2018-02-28 14:38:03 +00:00
Ondra Machacek
365220bea5 ovirt_vms: Fix NoneType in placement policy check (#36775)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549082
2018-02-28 08:05:58 -05:00
maorlipchuk
5859c102ee Add documentation for import FCP storage domain (#36780)
FCP storage domain task, does not need to contain port or address
since the storage domain is already on the Host.
Added an example for FCP import.
2018-02-28 08:05:48 -05:00
Ondra Machacek
a0db015454 ovirt_host_networks: Fix removing the label (#36783) 2018-02-28 08:05:32 -05:00
Ondra Machacek
d1214484e6 ovirt_vms: Fix boot devices idempotence (#36833) 2018-02-28 08:04:28 -05:00
Claes Nästén
042c111563 nso_config break cycles in dependency sorting (#36828)
False assumption that values can not have cyclic dependencies. Fix by
removing dependency on self and look for cycles, if found remove
dependency to get a partial sort done.
2018-02-28 11:16:49 +00:00
Ed Costello
645952c139 Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml

This removes the dependency on having the command line AWS tools
installed.
2018-02-28 16:30:34 +10:00
saichint
db43fe6a76 nxos_facts fix and integration tests (#36796)
* fix nxos_facts ipv6 error

* time_range not supported for N35
2018-02-28 10:45:50 +05:30
Abhijeet Kasurde
8d49bb6eee
VMware: new module: vmware_host_capability_facts (#36497)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 09:54:52 +05:30