Commit graph

22337 commits

Author SHA1 Message Date
Rémy Léone
3113c68053 Fix author name in the documentation 2018-07-24 12:01:37 -04:00
Gregory Hellings
6f007c35c1 Improved the documentation of known_hosts
The documentation for the key parameter was lacking in specificity and
also lacking in testing. These parts are both remedied herein.

Fixes #43157
2018-07-24 09:25:12 -04:00
Brian Coca
0718a53b07 also get checksum on 'any' if it is a file
fixes #42785
2018-07-24 08:59:52 -04:00
Brian Coca
cdc762dd9e
don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests
2018-07-24 08:54:58 -04:00
Deepak Agrawal
bf544c2200
Add support for commit label in iosxr_config (#42931)
* Add support for commit label in iosxr_config

* sanity pep8 etc fixes
2018-07-24 17:16:26 +05:30
Abhijeet Kasurde
4f1746ee1d
vault: check dir value before passing (#43184)
This fix checks if dirname is not equal to '' before proceeding
to create actual directory with name.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-24 16:27:17 +05:30
Trishna Guha
dd6ef3355f
get_device_info nxos zero or more whitespace regex (#43178)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-24 10:55:37 +05:30
Andreas Olsson
c6854fde29 Fix cloudflare_dns JSON response error handling (#42894)
* The JSONDecodeError exception only exists in Python 3.

* Without a properly parsed JSON response there is no more error
  processing to be done, no matter the http response code.

Relates to #38178
2018-07-24 09:51:44 +05:30
Lindsay Hill
42a9fb1337 Fix broken IPv6 regex (#43175) 2018-07-24 09:13:24 +05:30
uwila
c0048007a9 Detect failed sysvinit module (#43127)
* Detect failed sysvinit module

- This checks the stderr instead of the rc to detect whether the
  sysvinit module was successful or not, as even when failing, the
  rc would be 0.
- It immediatly became obvious that the debug info when failing
  was far too little to properly debug the role. To improve this,
  I also added the rc, stderr and stdout to the debug output.

* Revert stderr check to rc check, rename out->stdout, err->stderr
2018-07-23 19:58:42 -04:00
Jordan Borean
d5d29f4cfa
ssh - skip connection reset if controlpath does not exist (#43062) 2018-07-24 08:20:54 +10:00
Jordan Borean
04431216e7
win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2
2018-07-24 08:16:42 +10:00
Jordan Borean
48ad90ac8e
powershell: support recursive requires statements (#43143) 2018-07-24 08:16:16 +10:00
Jordan Borean
93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
2018-07-24 07:52:13 +10:00
Jarryd Tilbrook
460f858640 Enable check_mode in command module (#40428)
* Enable check_mode in command module

This only works if supplying creates or removes since it needs
something to base the heuristic off. If none are supplied it will just
skip as usual.
Fixes #15828

* Add documentation for new check_mode behavior
2018-07-23 14:06:41 -07:00
Charles
7fedda4c1d move the TLS detection block of win_uri before creating WebRequest (#43168)
* move the TLS detection block of win_url before creating WebRequest

* fix typo security_protocols
2018-07-24 07:02:05 +10:00
Nathaniel Case
8a0967554f
Actually fix eos_facts feature detection (#43155) 2018-07-23 14:51:44 -04:00
Trishna Guha
1d5f881f5c
Add text output along with structured output in nxos_facts (#42886)
* nxos_facts to use default output instead of structured output

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

* fix shippable error

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

* nxos_facts refactor

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

* Add structured output back

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-23 22:45:55 +05:30
Mo Balaa
3c0a3a1de1 Add debug messasge to aws_ec2 inventory plugin (#43112) 2018-07-23 12:55:28 -04:00
Jonathan Lozada D
d48415ed57 Fixed typo in gitlab_group (#41349)
Changed 'requried' to 'required'
2018-07-23 22:20:36 +05:30
Deric Crago
5522e9e934 VMware: fixed network['vlan'] str / int mismatch (#42984)
Typecast network vlan into string.
2018-07-23 21:53:24 +05:30
Matt Martz
35b4b1923d Allow adhoc to execute includes and imports 2018-07-23 11:59:12 -04:00
Julien PRIGENT
151419b87a ec2.py: Set source_dest_check default value to None (#42863)
* ec2.py:
  * source_dest_check default value is now None, updated docs
  * Refactor restart_instances and startstop_instances -> Two new functions to prevent repetition: check_source_dest_attr and check_termination_protection
2018-07-23 11:57:30 -04:00
Seuf
9faadce0b2 Add new grafana dashboard lookup plugin (#41319) 2018-07-23 11:11:42 -04:00
Adam Miller
562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

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

* remove q debugging output I accidentally left behind

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

* add os_family to the conditional so we're only hitting that code path when needed

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

* setup for a _check* pattern for general os_family group pkg_mgr checking

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

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-07-23 10:56:09 -04:00
Eric Coutu
ab3475e3f9 Explicitly pass HTTP method to fetch_url 2018-07-23 07:42:19 -07:00
Matt Martz
8d933928d2 Only assume GET if no data, otherwise POST (#43133)
* Only assume GET if no data, otherwise POST. Fixes #42876 #43091 #42750
2018-07-23 07:30:10 -07:00
Will Thames
0b77262288 Add merge_type parameter to k8s module (#42219)
Allows patching of custom Kubernetes resources that
don't support strategic merge patching

Check that openshift module supports content_type param
(requires version newer than 0.6.0)
2018-07-22 21:05:25 -07:00
Yunge Zhu
40fbee6369 Fix azure_rm_keyvaultkey/azure_rm_keyvaultsecret bugs (#41683)
* fix keyvault tests

* missing keyvault requirement

* fix keyvault auth bug

* apply fix in secret

* fix lint

* enable keyvault key and secret tests

* add azure service principal object_id lookup plugin

* fix lint

* add dependency in integration test

* fix bug

* put azure sp lookup plugin into test

* fix lint

* move lookup plugin

* repath lookup plugin

* repath lookup plugin

* repath files

* put az sp lookup plugin to lookup_plugins folder
2018-07-23 11:49:30 +08:00
Deepak Agrawal
20769de560
Don't close persistent connection socket on command timeout (#43071)
* Don't close persistent connection socket on command timeout

* handle exception in client of ansible-connection instead removing socket removal
2018-07-23 07:07:06 +05:30
Nathaniel Case
8c620a17d4
Let called functions use method keyword (#43086)
Hopefully we can live without `method_` instead
2018-07-22 15:26:44 -04:00
Jordan Borean
64f5f9c2f9
win_acl: fix recent bug and add basic tests (#43054) 2018-07-23 05:16:42 +10:00
Dusan Matejka
d43b2b54d5 Fixed incompatible unicode and int comparison in zabbix_host module when using proxy option (#43097) 2018-07-22 07:19:21 -04:00
Joe Abbey
a9b077f763 Stop throwing TypeErrors (#43036) 2018-07-22 02:31:46 -04:00
Abhijeet Kasurde
b02e0c07d8
dnsimple: refactor dnsimple module (#42548)
* Update dnsimple-python minimum version to 1.0.0 as it supports API v2 and API v1 is deprecated.
* Update examples.
* Update documentation.

Fixes: #42495

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-21 08:58:39 +05:30
Chris Smolen
bb35973e37 nxos_logging: add example using aggregate (#41052)
* add example using aggregate
+label: docsite_pr
+label: issue ansible/community#311
* Update nxos_logging.py
2018-07-20 15:51:13 -05:00
Yanis Guenane
b1c60eaa83 Vultr: Introducing vr_startup_script_facts module (#43004)
This commit introduces a new module called vr_startup_script_facts.

This module aims to return the list of startup scripts avaiable
avaiable in Vultr.

Sample available here:

```
"vultr_startup_script_facts": [
  {
    "date_created": "2018-07-19 08:52:55",
    "date_modified": "2018-07-19 08:52:55",
    "id": 327140,
    "name": "myteststartupscript",
    "script": "#!/bin/bash\necho Hello World > /root/hello",
    "type": "boot"
  }
]
```
2018-07-20 20:32:32 +02:00
abirami-n
1152f86ba1 Fixes #41549 (#41551)
* Fix_module_correction
2018-07-20 09:19:20 -07:00
Sandra McCann
87f004c503 Merge branch 'devel' of github.com:ansible/ansible into devel 2018-07-20 11:47:51 -04:00
Daniel Schneller
40b1ecf38a Add src parameter to elasticsearch_plugin (#39915)
* Add src parameter to elasticsearch_plugin

Previously specifying a URL or a file name (which is supported by the
Elasticsearch plugin tooling) would not work correctly with Ansible, because the
detection of the current installation state did not handle this well.

This commit adds a new "src" parameter for the module, which can be specified in
addition to the plugin name. It will be used to retrieve the plugin from
a custom location while keeping the final plugin name available to determine if
it is already present or not.

The url parameter remains for ES 1.x compatiblity.

* Fix sanity test errors

* Add version_added for src option

* Increase first added version to 2.7
2018-07-20 11:40:11 -04:00
Barry Peddycord III
dc42b43cd1 NCLU Module: Improve performance by not operating on empty lines (#43024)
* Update nclu.py

Stop module from running `net` on empty commands.

* Update nclu.py

Updated the copyright date

* Update nclu.py

Returned metadata version to 1.1

* Update nclu.py

Fix indentation to be a multiple of 4.

* Create changelog fragment
2018-07-20 11:38:29 -04:00
Thierry Bouvet
5d23406926 Fix ssl_version default value. (#42955)
* Fix ssl_version default value.

* Add changelog
2018-07-20 11:32:04 -04:00
Sandra McCann
2e93eab920 pr 42271 - fixed merge conflicts 2018-07-20 11:22:30 -04:00
Nathaniel Case
dba975470d
Eos subnet overlap fix (#43023)
* Detect overlapping subnet & provide better errors
2018-07-20 11:02:21 -04:00
Alexander Gubin
e129616ba6 sysvinit: Fix for false changed messages (#42956) 2018-07-20 10:57:58 -04:00
Ryan Brown
b6f8de9204 [aws] Enable SQS events for lambda_event module (#43019)
* Enable SQS events for `lambda_event` module

* Handle SQS event type properly

* PEP8
2018-07-20 10:52:21 -04:00
Julien PRIGENT
3272188170 elasticache_parameter_group.py: add parameter group compatibility with redis4.0 (#43041) 2018-07-20 09:52:03 -04:00
Ryan Brown
07927edfac
[AWS] Fix SSM Parameter Store module when description is missing (#43020) 2018-07-20 09:32:13 -04:00
Andrey Laguta
2e62e36590 Fix multiple var files combining (followup to #36357) 2018-07-20 09:29:20 -04:00
Abhijeet Kasurde
cadbd6ea9c
VMWare: update documentation for linked_clone (#42881)
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.

Fixes: #42349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-20 10:34:26 +05:30
Ganesh Nalawade
97d4e53131
Support setting persistent command timeout per task basis (#42847)
* Support setting persistent command timeout per task basis

Fixes #42200

*  Add variable `ansible_command_timeout` to `persistent_command_timeout`
   option for `network_cli` and `netconf` connection plugin so that the
   command_timeout can be set per task basis while using `connection=network_cli`
   or `connection=netconf`
   eg:
   ```
   - name: run copy command
     ios_command:
       commands:
       - show version
     vars:
      ansible_command_timeout: 40
   ```

* Modify `ansible-connection` to read command_timeout value from
  connection plugin options.

* Add `ansible_command_timeout` to `persistent_command_timeout`
  option in `persistent` to support `connection=local` so that
  it is backward compatibilty

* To support `connection=local` pass the timeout value as variables
  from persistent connection to `ansible-connection` instead of sending
  it in playcontext

* Fix CI failure

* Fix review comment
2018-07-20 10:04:53 +05:30
Tim Rupp
867dedc787
Updates F5 module utils (#43047)
New functions and fixes/refactorings for existing functions for
the 2.7 work
2018-07-19 18:39:12 -07:00
Rémy Léone
267c7667f6 Fix archived machine bu (#43017) 2018-07-19 14:03:34 -04:00
Pilou
06f5e49dfb inventory plugins: add test about config API usage (#41888)
* Check get_option method works with inventory plugins

This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.

* AnsiblePlugin: Fix typo in docstring
2018-07-19 10:45:45 -07:00
Martin Szulecki
2653bd3f50 Fix docker_image archive features to work with Python 3
Without binary mode, ansible shows a "write() argument must be str,
not bytes" error when using Python 3.
2018-07-19 12:30:07 -04:00
Sumit Jaiswal
8759d97071 infoblox list requirements as infoblox_client and should be infoblox-client (#42993)
* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client
2018-07-19 12:19:46 -04:00
Brian Coca
9217fbb7dd
better error messasge (#42770)
* better error messasge
2018-07-19 12:13:09 -04:00
Matej Vadnjal
7c318d4e30 ios_user module - implement sshkey option (#38782)
* ios_user module - add sshkey support

* ios_user - Add version_added to sshkey option

* ios_user - pep8 indentation fixes in unit tests

* ios_user - use b64decode method that works on python 2 and 3
2018-07-19 10:28:52 -04:00
Sam Doran
0ca61e9d87
Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
2018-07-19 10:07:00 -04:00
Will Thames
786613f426 Handle FieldLevelEncryptionId in cloudfront_distribution (#41770)
Ensure that FieldLevelEncryptionId is properly handled - passing it if
set, and keeping it if returned by GetDistribution

Update cloudfront_distribution tests to remove references to
test_identifier so test suite actually works

Fixes #40724
2018-07-19 08:27:13 -04:00
Roberto Barreda
f0f335d2bd parametrize allow_reassignment in ec2_eni (#41982)
* parametrize allow_reassignment

* fix documentation

* fix version_added
2018-07-19 08:27:04 -04:00
yaakov kuperman
61b0981341 [AWS] check mode for ec2_elb and elb_instance (#42694)
what ELBs an instance will be deregistered from prior to actually
executing
2018-07-19 08:13:16 -04:00
Andy Eff
26fd05c288 Update wait_for.py (#43002)
<!--- Your description here -->
This change is intended to help users know that a win_wait_for module exists and should be used for working on Windows hosts, as the documentation gives the impression that this module works on Windows - but if tried, it produces a large amount of stderr output.
+label: docsite_pr
2018-07-19 13:59:18 +02:00
Abhijeet Kasurde
f2640d3394
VMware: handle pnic in proxyswitch (#42996)
Fixes: #42943

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-19 16:46:44 +05:30
Raoul Scarazzini
86387df8b3 Fix docker_container stop/start image dependency (#41678)
This commit adds a conditional inside the constructor so that if a user
didn't specified an image parameter all the code related to the image
version comparison is omitted.
This is extremely useful when a user want to just stop and start
containers using just the name, keeping everything as it is, without the
need of specifying all the image and command stuff used at creation.
Today if you don't specify the image you get an error, and this is a
confusing [1] behavior.

[1] https://github.com/ansible/ansible/issues/27960
2018-07-19 06:40:23 -04:00
Jez McKinley
0f6488bb15 JM: allow choco to install 32 bit version (#42946)
* JM: allow choco to install 32 bit version

* JM: style corrections

* Revert style changes in lists

* JM: changing from boolean to string choice

* JM: updating example
2018-07-19 20:15:31 +10:00
John McDonough
f89d3721b4 UCS NTP Server module (#42375)
* UCS NTP Server module initial commit

* change name to ntp_server, keep name as alias for ntp_server
2018-07-19 11:32:26 +02:00
David Soper
c527af58f1 ucs_storage_profile module and integration tests (#42205)
* ucs_storage_profile module and integration tests

* Remove space in doc link to fix docs-build issue.

* Added suboption documentation and argument spec supporting list suboptions.

* Various small edits
2018-07-19 11:30:38 +02:00
Yanis Guenane
1754f533b5 Vultr: Introducing vr_firewall_group_facts module (#42997)
This commit introduces a new module called vr_firewall_group_facts.

This module aims to return the list of firewall groups avaiable
avaiable in Vultr.

Sample available here:

```
"vultr_firewall_group_facts": [
  {
    "date_created": "2018-07-17 12:22:51",
    "date_modified": "2018-07-17 12:24:47",
    "description": "ansible-firewall-group",
    "id": "fb5a0876",
    "instance_count": 0,
    "max_rule_count": 50,
    "rule_count": 1
  }
]
```
2018-07-19 11:02:25 +02:00
Yanis Guenane
f6ca231729 Vultr: Introducing vr_dns_domain_facts module (#42994)
This commit introduces a new module called vr_dns_domain_facts.

This module aims to return the list of DNS domains avaiable avaiable in
Vultr.

Sample available here:

```
"vultr_dns_domain_facts": [
  {
    "date_created": "2018-07-19 07:31:14",
    "domain": "ansibletest.com",
  }
]
```
2018-07-19 10:13:24 +02:00
hitsumabushi
c43e51e39e print vyos_config diff (#42494) 2018-07-19 11:19:51 +05:30
saichint
bea8e0200c warning message improved (#42969) 2018-07-19 09:33:28 +05:30
Lindsay Hill
70564ffd89 Missing close " (#42985)
Command was missing a close `"`. This was still interpreted properly by the switch, and was not breaking anything, but this is tidier.
2018-07-19 09:24:52 +05:30
FragmentedPacket
d2409fb165 Add example of using loop: with when: statements (#42776) 2018-07-19 13:48:08 +10:00
Adam Harwell
a9b1af8bdd Yum: Add support for --downloadonly (#41506) 2018-07-18 23:34:54 -04:00
Yanis Guenane
2c4ba7a9e9 Vultr: Introducing vr_user_facts module (#42951)
This commit introduces a new module called vr_user_facts.

This module aims to return the list of user avaiable avaiable in Vultr.

Sample available here:

```
"vultr_user_facts": [
  {
    "acls": [],
    "api_enabled": "yes",
    "email": "mytestuser@example.com",
    "id": "a235b4f45e87f",
    "name": "mytestuser"
  }
]
```
2018-07-18 21:49:02 +02:00
Bryce Verdier
b16fef9aad removing duplicate operations from the use of list comprehensions. None of the logic within the code has been changed, just more refined. (#41098) 2018-07-18 15:48:12 -04:00
Frank Vissing
66adabfd42 disable_excludes (#42510)
* implementing disable_excludes

* add check for yum version

* limit choices

* add testcases for disable_exclude

* fix formating

* add documentation

* syntax fix for test case

* fix indentation

* need to ignore errors when we want to do a test that fails

* test disable_excludes with zip and not sos

* add tests for yum < 3.4 not supported

* fix formating

* centos 6.1 does not support map

* drop unsupported selectattr

* cleanup testcases

* fix test cases beloging to wrong test scenarion (propper when)

* evaluate expression

* minor test fixes

* check output of msg
2018-07-18 15:37:50 -04:00
Dag Wieers
f2acc97b84 Windows: Get rid of remaining Get-Attr modules (#42921)
This is the final cleanup of modules still using the old Get-Attr
interface. Ready to deprecate this mechanism.
2018-07-19 05:37:07 +10:00
Orion Poplawski
32436ea9a5 dnf: Call dnf.Base.close() before exit to cleanup. (#41810) 2018-07-18 15:11:32 -04:00
Sloane Hertel
67cf2da2a1 Fix error when removing S3 lifecycle rules (#42762) 2018-07-18 13:13:33 -04:00
Vladimir Pavljuchenkov
a7d0804279 Update cloudformation.py (#42948)
missed space

+label: docsite_pr
2018-07-18 13:06:38 -04:00
Samer Deeb
3ca4a35334 Add support for global IGMP configuration on onyx switches (#42164)
* Add support for global IGMP configuration on onyx switches

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add support for global IGMP configuration on onyx switches

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-07-18 12:20:21 -04:00
Anil Kumar Muraleedharan
0897e79bd1 Persistence connection for cnos_vlan (#42500)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Changing cnos_vlan from paramiko to persistence connection of Ansible. Also talking care of CLI changes in CNOS commands with backward compatibility.

* Fixing Validation issues

* Trailing lines removal

* Review comments of Gundalow are getting addressed. He mentioned only at one place for cnos.py. But I have covered the entire file.

* Changes to incorporate Review comments from Qalthos

* Removing configure terminal command from module code

* Aligning with change in run_cnos_commands method changes

* Editing cliconf for latest CNOS CLIs
2018-07-18 12:17:08 -04:00
Hossein Zolfi
e756ef8265 Fix example of nmap plugin (#42925) 2018-07-18 10:07:21 -04:00
Yanis Guenane
a826ac3ea9 vultr: Add proper extension to vr_region_facts(.py) (#42944) 2018-07-18 14:49:27 +02:00
Guy Templeton
841b063d12 Fixes #37752 Delete all versions and deletemarkers in S3_Bucket when force paramet… (#39781)
* Delete all versions and deletemarkers in S3_Bucket when force parameter is passed

* Fix PEP8 style conformance

* Clarify explanation of force parameter
2018-07-18 08:49:01 -04:00
Yanis Guenane
9a1185e57c Vultr: Introducing vr_plan_facts module (#42470)
This commit introduces a new module called vr_plan_facts.

This module aims to return the list of plan avaiable avaiable to use on
booted servers.

Sample available here:

```
"vultr_plan_facts": [
  {
    "available_locations": [
      1
    ],
    "bandwidth": 40.0,
    "bandwidth_gb": 40960,
    "disk": 110,
    "id": 118,
    "name": "32768 MB RAM,110 GB SSD,40.00 TB BW",
    "plan_type": "DEDICATED",
    "price_per_month": 240.0,
    "ram": 32768,
    "vcpu_count": 8,
    "windows": false
  }
]
```
2018-07-18 12:39:55 +02:00
Yanis Guenane
aef97c5ac4 Vultr: Introducing vr_os_facts module (#42473)
This commit introduces a new module called vr_os_facts.

This module aims to return the list of OSes avaiable avaiable to use to
boot servers.

Sample available here:

```
"vultr_os_facts": [
  {
    "arch": "i386",
    "family": "ubuntu",
    "id": 216,
    "name": "Ubuntu 16.04 i386",
    "windows": false
  }
]
```
2018-07-18 11:32:04 +02:00
Yanis Guenane
11fd20b5ea Vultr: Introducing vr_region_facts module (#42471)
This commit introduces a new module called vr_region_facts.

This module aims to return the list of region avaiable avaiable to use
where boot servers.

Sample available here:

```
"vultr_region_facts": [
    {
      "block_storage": false,
      "continent": "Europe",
      "country": "FR",
      "ddos_protection": true,
      "id": 24,
      "name": "Paris",
      "regioncode": "CDG",
      "state": ""
     }
  ]
```
2018-07-18 10:42:20 +02:00
Yanis Guenane
9b898ebc20 Vultr: Introducing vr_sshkey_facts module (#42615)
This commit introduces a new module called vr_sshkey_facts.

This module aims to return the list of SSH keys avaiable in Vultr.

Sample available here:

```
"vultr_sshkey_facts": [
   {
    "date_created": "2018-07-10 14:49:13",
    "id": "5b43c760d7d84",
    "name": "me@home",
    "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+ZFQv3MyjtL1BMpSA0o0gIkzLVVC711rthT29hBNeORdNowQ7FSvVWUdAbTq00U7Xzak1ANIYLJyn+0r7olsdG4XEiUR0dqgC99kbT/QhY5mLe5lpl7JUjW9ctn00hNmt+TswpatCKWPNwdeAJT2ERynZaqPobENgewrwerqewqIVew7qFeZygxsPVn36EUr2Cdq7Nb7U0XFXh3x1p0v0+MbL4tiJwPlMAGvFTKIMt+EaA+AsRIxiOo9CMk5ZuOl9pT8h5vNuEOcvS0qx4v44EAD2VOsCVCcrPNMcpuSzZP8dRTGU9wRREAWXngD0Zq9YJMH38VTxHiskoBw1NnPz me@home"
  }
]
```
2018-07-18 09:53:58 +02:00
sevs44936
7dbdc8a92e Fix for cloudflare_dns SRV record and Python3 (#42914)
This fix adds correct way of comparing dict with dict while managing cloudflare_dns SRV record.

Fixes: #40445
2018-07-18 09:43:16 +05:30
Jordan Borean
8447f25e10
win_chocolatey_config: added module to manage Chocolatey config (#42915) 2018-07-18 10:36:59 +10:00
Jordan Borean
7ae5912d91
win_chocolatey_feature: new module (#42848)
* win_chocolatey_feature: new module

* Fixed up copyright header in PowerShell file
2018-07-18 10:36:43 +10:00
Jordan Borean
933d36b25f
win_chocolatey_source: add new module to manage Chocolatey sources (#42790)
* win_chocolatey_source: add new module to manage Chocolatey sources

* Added examples and fix diff run

* Minor fixes from review

* When editing a source, recreate with the explicit options instead of using the existing source

* Fixed up copyright header in PowerShell file
2018-07-18 10:36:21 +10:00
Abhijeet Kasurde
db9c9e7fc5 VMware: dns_suffix as a list of domain suffixes (#42678)
This fix adds dns_suffix as a list of domain suffixes and
also updates documentation and example.

Fixes: #42229

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-17 17:53:14 -04:00
Michael Steffens
4af16d0c76 Python3: compare bytes with bytes and strings with strings. (Fixes #42677) (#42878) 2018-07-17 17:52:49 -04:00
Dag Wieers
95a1170908 Windows: Add "special" parameter types to docs (#42853)
* Windows: Add special parameter types

Adding explicit parameter types now exposes this information in the
module documentation, and proves really helpful.

We only do this for non-string types as strings, mostly because strings
are implicit.

PS We also make copyright statements consistent and use #Requires for
explicit library imports

* Type "string" must be type "str"

* A few more Copyright corrections

* More fixes

* Don't add file encoding to Powershell files

* Don't add missing interfacetypes parameter

Otherwise CI demands an incorrect version_added

* Small fix
2018-07-17 14:29:05 -07:00
Tim Rupp
290df027e3
Adds the ipaddress compat library backport from Python 3.x (#42265)
This library is a backport (to 2.x versions of Python) of the code
that is found in the mainline versions of Python 3.x. It is being
included so that networking vendors, and others, can make use of it
without needing to add a python module dependency to their own modules.

A separate dependency would add to user burden of satisfying those
dependencies before using some Ansible modules.

In a previous core meeting, this was approved. Naming of the directory
it is found in was up for debate, but "compat" was the first directory
to have some sort of concensus.
2018-07-17 11:37:23 -07:00
Fabian von Feilitzsch
9eccc96586 Special case project creation so that it is possible (#42132) 2018-07-17 13:35:21 -05:00
Dag Wieers
e899824c49
ACI: Add parameter types to module docs (#42893)
* ACI: Add parameter types to module docs

* Update validate-modules ignore list
2018-07-17 18:03:55 +02:00
Gregory DEPUILLE
0d1c06814f vmware_vmotion: added storage vmotion capabilities. (#21421)
This fix adds vmotion capabilities to vmware_vmotion across different datastores and different hostsystem.
2018-07-17 20:43:30 +05:30
Yanis Guenane
577427b1c2 vultr: Make get_result handle list (#42890)
Currently get_result() can only handle a dict. When requiring facts, and
when there is more than one fact, get_result() should be able to handle
a list of dicts, so the normalization process happens to all the items.
2018-07-17 16:24:21 +02:00
Adam Conway
b6e9df2065 Update yum_repository.py (#42859)
* Update yum_repository.py

Having spent some time trying and googling how to enable an installed repo with this, I discovered that the thread at https://github.com/ansible/ansible-modules-extras/issues/2384 had decided that this would not be supported and recommended use of ini_file instead.  Since I am sure I'm not alone in expecting yum-repository to support enabling/disabling a configured repo, I suggest adding a note so people find this easier.
2018-07-17 16:57:36 +05:30
Fran Fitzpatrick
27a3a90fc8 FreeIPA: new module ipa_config (#42279)
* Adds new ipa_config module

* Modify _post_json to handle config_show/config_mod

* Doc: Add periods

* More documentation

* Added aliases
2018-07-17 06:57:54 -04:00
Rémy Léone
2177d37d5a Use IP address instead of server id to index servers (#41658) 2018-07-17 04:10:17 -04:00
Abhijeet Kasurde
cb1396b5be VMware: vmware_vm_facts check for template config (#42354)
This fix adds additional check for getting template from
virtual machine before using it.

Fixes: #42011

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-17 00:15:39 -04:00
Derek Whatley
24a3669662 Fix invalid Dockerfile created by "galaxy init --type apb" (#42017) 2018-07-17 08:11:42 +05:30
Abhijeet Kasurde
e8c90b47eb
VMware: support for 2.6 and sslContext (#42237)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-17 08:00:33 +05:30
uwila
f26272a492 Fix 2 issues in sysvinit module (#42786)
* Do not compare result to unset parameter in sysvinit module

* Fix misformed command in sysvinit module

* Small None-comparison style fix in sysvinit module
2018-07-16 21:33:01 -04:00
dgeo
ae96ba0d4f fix a (forgotten?) change in moving createhome -> create_home (#42711)
* fix a (forgotten?) change in moving createhome -> create_home

Fix for following bug on FreeBSD host whith user module:
```
fatal: [webssp]: FAILED! => {"changed": false, "module_stderr": "X11 forwarding request failed
Traceback (most recent call last):
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2487, in <module>
    main()\n  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2426, in main
    (rc, out, err) = user.modify_user()
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 1011, in modify_user
    if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.createhome):
AttributeError: 'FreeBsdUser' object has no attribute 'createhome'
", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
```
It happenned with 'createhome' AND with 'create_home' form, with python 2.7 AND python 3.6

* Add changelog


Co-authored-by: dgeo <dgeo@users.noreply.github.com>
2018-07-16 16:55:57 -04:00
Jiri Tyr
92c58e9a66 Adding namespace option into the xattr module (#42755)
* Adding namespace option into the xattr module

* Include namespace into the tests

* Make it backward compatible, remove re and operator module
2018-07-16 13:26:06 -04:00
Abhijeet Kasurde
7f0fe1898e urls: handle incorrect parsing of https_proxy env (#41472)
If user exports https_proxy without scheme, then generic_urlparse
fails to parse SCHEME and HOSTNAME from https_proxy variable.
This fix raises ProxyError is generic_urlparse API fails to parse
either of them.

Fixes: #25421

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-16 10:16:46 -04:00
Yanis Guenane
08acc74056 vultr.py: fix env var handling (#42659) 2018-07-16 15:00:08 +02:00
Wojciech Sciesinski
cf4e7fd70a Make the code more PowerShell compliant (#39464)
* Make the code more PowerShell compliant

* Correction of the mistaken comment

* Revert style changes to If/Else/Elseif

* Remove an ignored PSScriptAnalyzer rule due to the code correction

* Decreasing of an entropy ;-) and replacing the next to aliases

* minor whitespace changes
2018-07-16 11:34:01 +10:00
Matt Martz
27b4d7ed31
Add feature to expose vars/defaults with include/import_role (#41330)
* First pass at making 'private' work on include_role, imports are always public

* Prevent dupe task execution and overwriting handlers

* New functionality will use public instead of deprecated private

* Add tests for public exposure

* Validate vars before import/include to ensure they don't expose too early

* Add porting guide docs about public argument and change to import_role

* Add additional docs about public and vars exposure to module docs

* Insert role handlers at parse time, exposing them globally
2018-07-15 09:59:30 -05:00
Kevin Breit
106e4b374a Meraki utility - construct_path() now supports custom keys (#42286)
* construct_path() now supports custom keys

- Allows for much more flexible test substitution
- Implemented functionality in meraki_vlan for test case

* Fix comments for PEP8
2018-07-14 02:26:37 +02:00
Matt Davis
5d76b627ef
fix py3 string error in ssh failure handling (#42655) 2018-07-13 14:36:46 -07:00
Fabian von Feilitzsch
0421305254 Properly format API key when set in an enviroment variable (#42202) 2018-07-13 16:31:22 -04:00
Fabian von Feilitzsch
4f63134d78 Use top level values as defaults if metadata is not provided (#42277) 2018-07-13 16:01:25 -04:00
Brian Coca
f1dcfe4f4c
use get_option instead of directly internal dict (#42199)
* use get_option instead of directly internal dict

as get_option can populate it, while direct access cannot
also setup fallback values for derived plugins not using config system correctly
2018-07-13 15:54:52 -04:00
MedicMomcilo
a97618b486 Add option to control CDATA tags stripping (#42689)
* Add option to control CDATA tags stripping

* Fix remaining issues before merging.

* Add missing trailing dot.
2018-07-13 21:54:38 +02:00
Fabian von Feilitzsch
fa8de0c384 [k8s] Fix typo that breaks check mode when a resource is created (#42763) 2018-07-13 15:30:16 -04:00
Sloane Hertel
2c3e6f8bd3 [elb_target_group] fix docs and add default for wait_timeout - fixes #42324 (#42477)
Add default for wait_timeout and version_added flag
2018-07-13 15:09:33 -04:00
Toshio Kuratomi
a0748c0837 Don't use deepcopy when creating attributes unless really needed 2018-07-13 10:05:48 -07:00
Andrew Gaffney
e4af3a8957
Mark vars from facts cache as unsafe (fixes #42656) (#42682)
Facts are marked as unsafe when originally gathered, but they lose that
marking when they are serialized to JSON and parsed back out.
2018-07-13 11:15:03 -05:00
Brian Coca
44d4327bc7 moved to use 'get_option'
also fixed bad str() usage
2018-07-13 11:41:04 -04:00
Dennis Conrad
f0463befc7 Fixes #42734 - typo in update-rc.d detection 2018-07-13 11:04:39 -04:00
Kevin Mooney
7a0c28cc37 Put umask value in quotation marks (#41409)
The given example causes the pip module to fail. If the umask is given as an octal string without quotation marks, the pip module converts it into an integer (i.e., an invalid umask). 

+label: docsite_pr
2018-07-13 10:35:23 -04:00
Jared Hocutt
7e97380664 Fix docs for the volume parameter in the ec2_instance module (#42710)
The existing docs specified valid keys of ebs.device_type and ebs.device_size
but they should instead be ebs.volume_type and ebs.volume_size.
2018-07-13 09:48:25 -04:00
Trishna Guha
d5e9653c96
Add get_capabilities in nxapi module_utils (#42688)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-13 11:11:35 +05:30
jamessemai
dc32842573 win_security_policy: Allow setting a value to empty (#42051)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison

* Make idempotent

* Adding idempotency and diff test

* added changelog fragment
2018-07-13 14:08:14 +10:00
Avi Shefi
b2527c55c3 fix win_unzip and win_share Powershell cmdlets output invalid JSONs (#42713) 2018-07-13 14:03:57 +10:00
Jordan Borean
e3521776f5
win_chocolatey: add TLSv1.2 support for install phase (#41992) 2018-07-13 13:38:24 +10:00
Brian Coca
006f08da99
Fix fact cleaning (#42595)
* fix fact cleanup

fixes #41684
2018-07-12 16:12:42 -04:00
Chris Brown
a4a37e8dfb Fixed a typo in documentation (#42702)
"Therefor" to "Therefore"

+label: docsite_pr
2018-07-12 14:09:33 -05:00
Gennady Aleksandrov
12057de1c6 Fix #38038 cloudfront_facts module returns only first page of response (#38045) 2018-07-12 15:07:57 -04:00
Clement Trebuchet
7c97bb5077 Devel ios vrf submode (#41659)
* add submode features ipv4/ipv6

* add tests for submode

* the parameters both_ * were not idempotent, in what is read in the configuration we have a list with 2 entries (import, export) while the input parameter has only one parameter which will be applied twice

* add docstring to the ios_vrf module + provide a fix for: https://github.com/ansible/ansible/issues/41581

* complete tests

* add missing description

* fix KeyError for address-family ipv*

* fix both_* tests

* fix E231, W292, W293

* fix W293

* remove set has it doesn't preserve order of routes

* fix E106

* remove ImportError: cannot import name OrderedDict

* We should be able to mix the parameters for the routes targets , while remaining imdepotent. During the first implementation we did not take this into account, which did not correspond to the reality of the needs in production (to be able to use each parameter indifemently together)

* remove epdb reference

* FIX E111, E106

* FIX E302

* using loop produce a result who  was not imdepotent

* FIX E241

* fix: used pass intead of list
2018-07-12 20:27:10 +05:30
Kevin Breit
2038ff5569 meraki_mx_l3_firewall - Fix idempotency for default rule logging (#42649)
* Fix idempotency and default syslog bugs

* Fix idempotency check for syslog_default_rule

* Syntax errors
2018-07-12 16:47:17 +02:00
Kevin Breit
9105149595 Cange URL for organization device lookup (#42648) 2018-07-12 16:41:16 +02:00
Peter Sprygada
d086d57d11 adds a new feature to the telnet action plugin
This change adds a new argument to the telnet action plugin that will
cause the module to send a newline character before trying to login.
This is convienent when using telnet over a console connection that
needs an initial newline character to start the login process.

This change also will cause the sent command and command response to be
displayed on stdout when running in verbose mode (5 v's).
2018-07-12 10:11:55 -04:00
Brian Coca
12a8363fae
Error on empty group/host name (#42584)
* error on false host/group name
2018-07-12 09:59:00 -04:00
Martin Krizek
00c88f6497 [aws] Add missing methods to AnsibleAWSModule (#42679) 2018-07-12 09:47:28 -04:00
Henryk Konsek
ebeb46aa61 Added Scaleway volume module (#41667)
* Added Scaleway volume module.

* Fixed imports order.

* Fixed version added.

* Improved sanity checks.

* Fixing style formatting.

* Added new line at the end of file. Fixed typo in comment.
2018-07-12 08:43:23 -05:00
Dag Wieers
5465dca7ec
aci_bd_subnet: Support parameter scope not set (#42675)
If parameter scope is not set (is None) the usual handling of lists does
not apply, and should be avoided or we get an exception.

This needs to be backported to earlier versions of Ansible.
2018-07-12 15:20:33 +02:00
Calvin Wu
7e42e88cc1 ecs_taskdefinition can absent without containers argument (#41398)
* ecs_taskdefinition can absent without containers argument

* add regression test for absent with arn

* Add PassRole privilege for ecs_cluster to pass
2018-07-12 23:16:41 +10:00
Ryan Brown
e4c28571d0 Update to AnsibleAWSModule and remove now-duplicate fail_json_aws function (#42629) 2018-07-12 22:52:28 +10:00
Nathaniel Case
6b162142a7 ios_file: Don't leave leftover files behind (#42622)
* Don't leave leftover files behind

* Fix writing files in python3

* Replace nonascii.bin with one that will not pass for unicode
2018-07-12 12:26:14 +05:30
Ganesh Nalawade
6a94090e7f
Fix junos facts integration test failures (#42623)
*  Make fetching old style facts optional
   and try to fetch the old style facts only when
   `ofacts` value is present in `gather_facts`
* Fix in junos_facts integration test
2018-07-12 09:53:03 +05:30
Jordan Borean
d723b8541d changed winrm _reset to reset and make ssh reset show warning (#42651)
* changed winrm _reset to reset and make ssh reset show warning

* minor changelog update
2018-07-11 20:22:01 -07:00
Matt Davis
a5fc9a17f0
return wu result from inner job (#42647)
fixes #42423
2018-07-11 18:01:42 -07:00
Brian Coca
e115e6496f
preserve delegation info on no_log (#42577)
* preserve delegation info on no_log

fixes #42344
2018-07-11 20:41:37 -04:00
Pavel Eremeev
2a90bea311 Several kubectl fixes (#40882)
* Fixed typo

* Fixed namespace parameter and tmp dir
2018-07-12 09:06:26 +10:00
Felix Fontein
765a5130d5 Docker modules: improve documentation on docker vs. docker-py Python package requirements (#42457)
* Make sure all docker-py/docker requirements are listed, and clarify about docker vs. docker-py.

* Adjusting changes made in #40839.
2018-07-11 17:57:39 -04:00
Dag Wieers
27f540ac5c
Add parameter types to documentation (#42572)
Few documentation fixes
2018-07-11 23:03:24 +02:00
rhorer
28820d3de0 Very slightly clean up the inline documentation 2018-07-11 15:54:08 -04:00
Samir Musali
985768b2af LogDNA Callback Plugin (#40296)
* LogDNA Callback Plugin...
2018-07-11 15:37:01 -04:00
Clement Trebuchet
c7981c4cc8 Add the NIOS RECORD PTR Module (#41900)
* Add the NIOS RECORD PTR Module

* FIX E241,E231, E105

* FIX module should not be executable

* FIX module RWX

* Remove change in nios_srv_record

* Remove change in nios_srv_record

* FIX test_nios_ptr_record_update_comment

* ADD: Integration and target tests for the NIOS PTR RECORD module.

* FIX module name in integrations tests

* Update integration

* Refactor nios_ptr_record module

* Refactor the nios_ptr_record_idempotence

* FIX name

* Smoketests for the NIOS modules does not take care of the PTR:RECORD object

* REM the default for view

* Add finals test, after adding the PR (https://github.com/ansible/nios-test-container/pull/1) in order to handle PTR:RECORD

* add the define nios specific constant for PTR:RECORD

* fix: documentation style

* add create an ipv6 ptr record

* rename class name, add ipv6 unittest
2018-07-11 23:55:28 +05:30
Fran Fitzpatrick
5928ec04ca Adds an ipmath filter (#41985) 2018-07-11 10:52:31 -07:00
Sloane Hertel
7086863c52 [s3_bucket] import urlparse (#42474) 2018-07-11 12:40:45 -04:00
Toshio Kuratomi
ccbac66128 Revert "Make ansible doesn't parse template-like password in user's input (#42275)"
This reverts commit de40ac02a5.

Passwords from the cli need to remain bytes on input otherwise we have
encoding problems when users input non-utf8
2018-07-11 09:30:42 -07:00
Jerry Chong
42f44b24c6 Fix NameError in pause module (#42038)
* Fix NameError in pause module

* Add comment and changelog

Co-authored-by: Jerry Chong <jchong@netbase.com>
2018-07-11 11:49:32 -04:00
Grzegorz Śliwiński
d6f20952fe Fix ec2_asg metric* option's version introduction - refs #25168 (#42626)
Introduced in 404f9260d9 during 2.6, so version_added: 2.5 was incorrect.
2018-07-11 10:57:11 -04:00
Nilashish Chakraborty
fa624eba29 Fixed regex to pick correct items (#42557) 2018-07-11 19:20:50 +05:30
Will Thames
42eaa00371 Provide kubernetes definition diffs in check_mode (#41471)
Move dict_merge from azure_rm_resource module to
module_utils.common.dict_transformations and add tests.

Use dict_merge to provide a fairly realistic, reliable
diff output when k8s-based modules are run in check_mode.

Rename unit tests so that they actually run and reflect
the module_utils they're based on.
2018-07-11 16:32:03 +10:00
hitsumabushi
cf7a42b4f4 allow empty line in src template file (#42493) 2018-07-11 11:29:07 +05:30
Jordan Borean
940d4a0e89
win_reboot: fix 2.6 issues and better handle post reboot reboot (#42330)
* win_reboot: fix 2.6 issues and better handle post reboot reboot

* changed winrm _reset to reset

* Add handler to reset calls when .reset() throws an AnsibleError on older hosts

* Moving back to _reset to get the issue fixed
2018-07-11 09:12:29 +10:00
Toshio Kuratomi
780c8986af Add boilerplate from __future__ and type declarations 2018-07-10 15:26:48 -07:00
Andreas Calminder
577e66660d Simple file locking feature (#42024)
* class for file locking feature
2018-07-10 14:13:27 -07:00
Marcos Alano
2d6bb2500e Add support for espeak-ng. Closes #42438 2018-07-10 15:53:00 -04:00
Andrew Gaffney
824524c67a
Display task banner before showing file diff (#42573) 2018-07-10 14:27:44 -05:00
Matt Martz
8aea8901c3 Add config to fail on invalid task attributes. Fixes #42479 2018-07-10 09:49:16 -04:00
Brian Coca
937e710485
ensure 'text' source assumptions (#42522)
* ensure 'text' source assumptions
2018-07-10 09:45:37 -04:00
Brian Coca
1c08eb8b27
fix irc module to work with py3 (#42267)
* fix irc module to work with py3

fixes #42256
2018-07-10 09:42:14 -04:00
Brian Coca
4a7940c562
Ensure string types (#42362)
* actually enforce string types

* unquote after its text

* fixed incorrect template type

* fixing string showed error in template typing
2018-07-10 09:41:33 -04:00
Kevin Breit
a65d9257fd Removed any temporary get_net() methods (#42391)
- Made appropriate changes where needed
2018-07-10 11:34:34 +02:00
Yuwei Zhou
e9bf3c70e6 disk fact should return create_option value (#42398) 2018-07-10 16:16:28 +08:00
Yanis Guenane
593f484d77 Fix E324 for vultr modules. (#42464) 2018-07-10 07:51:05 +02:00
Toshio Kuratomi
673c55f2ef Separate some 255 exit codes that are not ssh errors
The ssh connection plugin is overzealous in thinking that error code 255
can only come from ssh.  Python can return 255 in some circumstances and
error from php does as well.
2018-07-09 15:51:20 -07:00
Toshio Kuratomi
9350a81ae4 Port modules away from __file__
* __file__ won't work if we want to invoke modules via -m or if we
  figure out how to keep modules from hitting the disk with pipelining.
* module.tmpdir is the new way to place a file where it will be cleaned
  automatically.

Change format string to not depend on __file__:

* cloud/amazon/ec2_elb_lb.py
* cloud/amazon/elb_classic_lb.py

Use module.tempdir:

* packaging/os/apt.py
* files/unarchive.py
2018-07-09 15:51:20 -07:00
Pilou
72d7a1eb5c Setup module: use C() formatting function in parameter descriptions, add a task based example (#42411)
* setup module: use C() in parameters description

* setup module: use a task example
2018-07-09 15:08:01 -04:00
Matt Martz
abb05c98f3 Make sure we are comparing bytes extensions in inventory plugins (#42475)
* Ensure we are comparing text paths with extensions. Fixes #42118

* Add changelog
2018-07-09 12:24:51 -04:00
Brian Coca
8e1d223301
complete plugin docs (#42355)
* complete plugin docs

  * add missing 'plugin' option
  * user and password are now 'correctly' required
  * added  inventory source example and extension information for user
2018-07-09 11:50:50 -04:00
Brian Coca
2496fd35fb added required missing field for common yaml fmt 2018-07-09 11:43:21 -04:00
Matt Martz
50905b980d Support item label in v2_playbook_on_include (#42478)
* Support item label in v2_playbook_on_include. Fixes #42301

* test fixes
2018-07-09 11:27:00 -04:00
bpetit
9bd7bd5d46 [docs] Document requirements for plan_file option in terraform module (#42514)
plan_file is required if state: planned is used. This should be mentionned in the documentation.

+label: docsite_pr
2018-07-09 10:19:29 -04:00
Zhikang Zhang
70e33ef92c
Make ios_vlan identify vlans starting with 9 (#42247)
* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9
2018-07-09 09:50:06 -04:00
Jakub Libosvar
26b0908270 openvswitch_db: Make 'key' parameter optional (#42110)
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.

Fixes #42108
2018-07-09 19:12:41 +05:30
Fabian von Feilitzsch
e9c7b513a1 [k8s] allow user to pass list of resources in to definition parameter (#42377)
* allow user to pass list of resources in to definition parameter

* Add new validator for list|dict|string

* use string_types instead of string

* state/force information is lost after the first item in the list

* Add tests

* Appease ansibot
2018-07-09 08:33:16 -05:00
Paul Neumann
dfb2b3fdd5 ios_facts: Report space of file systems (#41850)
* ios_facts: Report file system space

Parse total and free space from dir output. For this, add a hash
filesystems_info containing the keys spacetotal_kb and spacefree_kb.

* ios_facts: Add unit test for file system space reporting

* ios_facts: Add integration test for file system space reporting
2018-07-09 09:15:31 -04:00
Felix Fontein
dbb58b34c3 Version must be quoted (otherwise it is printed as 2.1) (#42496) 2018-07-09 06:53:59 -04:00
Dag Wieers
3c35b1dbc5
sefcontext: Improve documentation (#42416)
* sefcontext: Improve documentation

* Clarify why this module does not apply changes to filesystems

* Fix

* More clarity
2018-07-09 12:13:25 +02:00
Dag Wieers
0fbaf9940f
cobbler_sync: New module to sync Cobbler changes (#39910)
This module is required if you're using Cobbler for provisioning
systems using Ansible.
2018-07-09 11:27:44 +02:00
Dag Wieers
198b62b906
file: Recover from unexpectedly disappearing files (#42281) 2018-07-09 11:27:25 +02:00
Dag Wieers
8eb1e8c0e6
Ensure boolean value 'yes' is shown and add types (#42361)
And a few small cosmetic changes.
2018-07-09 11:27:06 +02:00
Kevin Breit
7b07c9b220 meraki_network - Add support for disableMyMerakiCom (#42418)
* Add support for disable_my_meraki parameter

- Meraki added support for the disabling access to Meraki websites on
devices. This module now supports this.
- I haven't tested this as it was developed on an iPad. It will work
before submitting PR.
- Rework of payload generation code is required or at least
recommended.
- Integration tests need to be developed.

* Added support for disableMyMerakiCom parameter

* - Remove proposed functions as it isn't required for updates
- Add integration tests
- Still pending a case response from Meraki since I can't seem to
set disableMyMerakiCom to false after it's true

* Fixed word wrap problem

* Add version_added to disable_my_meraki
2018-07-09 11:21:34 +02:00
Kevin Breit
c644e3da79 meraki_network - Added proper response documentation (#42393)
* Added proper response documentation to meraki_network

* Missing colon
2018-07-09 11:21:12 +02:00
Kevin Breit
78fd5ce651 Improve documentation of module (#42332) 2018-07-09 11:19:19 +02:00
Kevin Breit
9cd2388d1a New module - meraki_ssid (#42329)
* Initial commit of meraki_ssid module
- CRUD functionality for Meraki wireless SSIDs
- Much more testing is needed
- Module is not currently idempotent

* Improve integration tests
- Original integration tests didn't have any assertions in it
- Single bug fix in module found via integration test

* Added idempotency support
- Changes are only made when needed.
- Added integration test to check for idempotency.
- Relies on a forthcoming PR to make idempotency check a single pass.

* Improved documentation
2018-07-09 11:18:12 +02:00
Kevin Breit
132943cac5 New module - meraki_mr_l3_firewall (#42328)
* Initial commit for meraki_mr_l3_firewall module

- CRUD functionality for layer 3 firewall rules on the Meraki MR access points
- Complimentary integration test
- Need to add support for SSID lookup

* Added support for specifying SSID name and improved documentation

* Added examples to documentation

* Removed whitespace
2018-07-09 11:17:14 +02:00
Kevin Breit
3d3d919c11 New module - meraki_mx_l3_firewall (#42326)
* Initial commig for meraki_mx_l3_firewall
- View and modify L3 firewalls applied to Meraki MX firewalls
- Initial integration tests included

* Added example documentation

* Added documentation for responses

* Documentation tweaks for typos

* PEP8 fix
2018-07-09 11:16:30 +02:00
Kevin Breit
ca5f9aab1e Meraki module utility - get_net() downloads networks if data isn't provided (#41423)
* Enable get_net() to download nets if data isn't provided

- Currently, get_net() requires data to be passed to it
- PR enables get_net() to download all networks if data isn't passed
- Slightly simpler code
- Best practice is to download nets early in execution

* Apply fixes related to get_net()

* Removed extra code from the rebase
2018-07-09 11:13:38 +02:00
Kevin Breit
eeada86554 Add net_id support to config_template (#42446)
- Added net_id support to config_template
- Changed integration test to use blocks to cleanup on failure
2018-07-09 11:11:16 +02:00
Kevin Breit
9036f846a3 meraki - Enabled support for configuration template configuration (#42392)
* Enabled support for configuration template configuration
- get_nets() now pulls down templates and networks
- A few changes in VLAN and network to operate as a POC

* Ansibot changes

- Fix undefined variable
- Document net_id in meraki_vlan

* Fix indentation
2018-07-09 11:10:27 +02:00
Kevin Breit
779f3c0c1a Allow module to claim devices into an organization (#42448)
- Before this, it allowed claiming devices into a network only
- Make integration tests a block
- Note, API doesn't allow unclaiming in an organization, only net
- Added an integration test for claiming into an org
	- Requires unclaiming manually
- There is a bug in the API which isn't showing claimed devices
2018-07-09 11:08:37 +02:00
Kevin Breit
5960b215bb meraki_admin - Added full return documentation for normal responses (#42487)
* Added full return documentation for normal responses

* Changed returned for responses

- Old responses were saying always returned, should have been success
or something more refined
2018-07-09 11:05:21 +02:00
Kevin Breit
0c59a3bc48 meraki_snmp - Added full response documentation for normal responses (#42488)
* Added full response documentation.

* Changed always to success for responses
2018-07-09 11:04:51 +02:00
René Moser
d7c3d5501b
cs_vpc: fix disabled or wrong vpc offering taken (#42465) 2018-07-09 08:31:13 +02:00
Pilou
3301a0b530 docker_container: fix init check requirements (#40839)
* docker_container: ensure 'init' is supported

Check docker-py version too.

Move API version check in docker_container module since 'init' module
parameter isn't defined by other docker modules.

docker-py supports 'init' since 2.2.0:
https://github.com/docker/docker-py/blob/2.2.0/docs/change-log.md

* docker_container: fix compat with docker-py<2.2

Exception was:
TypeError: create_host_config() got an unexpected keyword argument 'init'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):
                        File ansible_module_docker_container.py, line 2089, in <module>
                          main()
                        File ansible_module_docker_container.py, line 2084, in main
                          cm = ContainerManager(client)
                        File ansible_module_docker_container.py, line 1704, in __init__
                            self.present(state)
                        File ansible_module_docker_container.py, line 1724, in present
                            new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
                        File ansible_module_docker_container.py, line 826, in create_parameters
                            host_config=self._host_config(),
                        File ansible_module_docker_container.py, line 932, in _host_config
                            return self.client.create_host_config(**params)
                        File lib/python3.6/site-packages/docker/api/container.py, line 157, in create_host_config
                            return utils.create_host_config(*args, **kwargs)
                      TypeError: create_host_config() got an unexpected keyword argument 'init'",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}
2018-07-09 07:32:51 +02:00
Julien Vey
0f612d1b76 efs_facts: improve performance by reducing the number of api calls (#36520)
* efs_facts: improve performance by reducing the number of api calls

* Remove efs_facts tests from running in CI
2018-07-08 16:34:22 -04:00
René Moser
0e6628395a
cs_firewall: fix idempotence and tests for cloudstack v4.11 (#42458) 2018-07-08 00:51:46 +02:00
Sam Doran
1d1595b990
Fix pause module so it does not stack trace when redirecting stdout. (#42217)
* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY
2018-07-06 17:19:55 -04:00
Jackson Isaac
39ec12f395 junos/junos_config.py: Add RVI Example (#41867) 2018-07-06 14:33:16 -05:00
Jackson Isaac
0cced31795 junos_config: Add VLAN trunking example (#41972) 2018-07-06 14:31:15 -05:00
Jill R
8606fb33f0 Add additional puppet options (#42218)
* Add additional puppet options

Add support for puppet options --debug, --verbose, --summary,
and extend logdest to support logging to stdout and syslog at
the same time.

Fixes issue: #37986

* Fix docs

* Doc fix, add release note

* Fix silly yaml error

* Correct changelog, add C() to params in doc
2018-07-06 13:52:17 -04:00
Jordan Borean
8bdd04c147 Fix remote_tmp when become with non admin user (#42396)
* Fix tmpdir on non root become

 - also avoid exception if tmpdir and remote_tmp are None
 - give 'None' on deescalation so tempfile will fallback to it's default behaviour
   and use system dirs
 - fix issue with bad tempdir (not existing/not createable/not writeable)
   i.e nobody and ~/.ansible/tmp
 - added tests for blockfile case

* Revert "Temporarily revert c119d54"

This reverts commit 5c614a59a6.

* changes based on PR feedback and changelog fragment

* changes based on the review

* Fix tmpdir when makedirs failed so we just use the system tmp

* Let missing remote_tmp fail

If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side.  It's better to
be alerted in this case than to silently ignore it.

jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side.  empty string
triggers the warning because it is probably not a directory that the
become user is able to use).
2018-07-06 10:49:19 -07:00
rcgoodfellow
3a695acf37 Update docker package version (#42394)
The docker API init parameter is the dependency requiring this bump. It was introduced 2.3.0 release of the docker package as per commit 13b5f785a7ab459960aae82fae00e4245e391387 in github.com/docker/docker-py.
2018-07-06 10:48:24 -04:00
nishiokay
7ee86ae370 [cloudstack] fix cs_host example (#42419) 2018-07-06 09:47:42 -04:00
Dag Wieers
f98a0b521f
Add querying all bindings (#42366)
Also fix an issue with one of the check-mode tests.
2018-07-06 13:32:39 +02:00
Ganesh Nalawade
5635848654
Fix typo in cliconf pluign (#42399)
* Fix capability key typo error in ios, eos and
  vyos cliconf plugins.
2018-07-06 12:18:24 +05:30
Agris
5df01abd58 Fix for starttls connections for notification mail module (#42381)
* Fixes #42338

Fixes #42338
Fixed starttls connection usage by adding smtp.ehlo before smtp.has_extn function.

* remove Trailing whitespace

remove Trailing whitespace
Fixes #42338

* marged bcoca requested changes

Fixes #42338
move ehlo for starttls section only.

* Remove spaces
2018-07-05 19:09:42 -04:00
Brian Coca
475abc0af7
inventory plugin docs (#42022)
* inventory plugin docs
* added set options
* minor wording and formatting fixes
* changed headers to std as per #35520, also added to main readme
* unified inventory plugin devel, referenced from generic plugin dev
* fixed typos and update as per feedback
2018-07-05 17:30:46 -04:00
Carlos Mendible
133b70ff45 Added missing type for both template and parameters variables. (#42033)
* Added missing type for both template and parameters variables.

* changed object to dict
2018-07-05 16:05:45 -04:00
rcgoodfellow
e3478e0da5 Update docker_container.py (#42370)
`docker-py` is no longer a thing.

https://github.com/docker/docker-py/issues/1431
2018-07-05 14:03:50 -04:00
Dag Wieers
b90ae65e5c
aci_static_binding_to_epg: Add description parameter (#42244)
* aci_static_binding_to_epg: Add description parameter

This PR adds the description parameter to this module.

Tis fixes #42154

* Fix added_version
2018-07-05 18:01:28 +02:00
Deepak Agrawal
30688fecf3
Idempotency for net_get and net_put modules (#42307)
* Idempotency for net_get and net_put modules

* pep8 warnings fix

* remove import q
2018-07-05 20:15:25 +05:30
Zhikang Zhang
de40ac02a5
Make ansible doesn't parse template-like password in user's input (#42275)
NOTE:
1. Use unsafe decorator but not builtin escape wrapper in jinja2
since ansible will try parse ssh password twice, the builtin
escape wrapper will be removed during the first parse.
2. Use class AnsibleUnsafeText but not '!unsafe' syntax since
passwords are not loaded by YAML env, '!unsafe' syntax doesn't
work for them.
2018-07-05 10:26:12 -04:00
Ganesh Nalawade
31dd41e4c5 Fix fetching old style facts in junos_facts module (#42336)
* Fix fetching old style facts in junos_facts module

Fixes #42298
* To fetch old style facts from junos device it requires
  login credentials in provider, hence while using
  connection=nectonf do not delete provider values
  as it might not be ignored

* Add `ofacts` as one of the options in `gather_subset`

* Minor update in documentation

* Fix CI failure
2018-07-05 18:21:44 +05:30
Will Thames
62e7a65459 k8s_facts trivially supports check_mode (#42335) 2018-07-05 07:53:23 -04:00
Jared Hocutt
8b711d9874 Fix examples in azure_rm_securitygroup (#42121) 2018-07-05 17:59:23 +08:00
Ganesh Nalawade
75382814f0
Add fetching default filter in ios cliconf plugin (#42339)
* Add capability to fetch default filter flag in
  ios cliconf plugin.
2018-07-05 14:57:27 +05:30
Nilashish Chakraborty
ed5a0f2d9c
nxos_logging new feature - remote logging (#41237)
* Added feature - Remote Logging + More tests

* Fixed Shippable Errors

* Fixes - new feature version added error
2018-07-05 12:17:14 +05:30
Rémi REY
da0f58787e callback/grafana_annotations: define validate_grafana_certs type as bool (#42318)
Fixes #42317
2018-07-05 15:49:58 +10:00
Sumit Jaiswal
828dd1a663
To fix the NoneType error raised in ios_l2_interface when Access Mode VLAN is unassigned (#42312)
* to fix the bug41657

* to fix review comment
2018-07-05 10:58:54 +05:30
Juan Manuel Parrilla
376b30ece4 FreeIPA: ipa_vault module to manage idm secure vault resource (#41902) 2018-07-05 10:16:35 +05:30
Alexandre Vicenzi
df2e0c7c00 Fix broken links. (#42323) 2018-07-04 18:54:49 -07:00
Julien Brochet
2762c4fe1a Fix error message when using the params option (#42305) 2018-07-04 21:08:25 +05:30
Ganesh Nalawade
c068b88b38
Update eos, ios, vyos cliconf plugin (#42300)
* Update eos cliconf plugin methods

*  Refactor eos cliconf plugin
*  Changes in eos module_utils as per cliconf plugin refactor

* Fix unit test and sanity failures

* Fix review comment
2018-07-04 19:45:21 +05:30
Felix Fontein
6b6c017dd1 ACME modules: documentation improvements (#42165)
* Always using current draft when referring to ACME v2.

* Adding URL for ACME v1 protocol.

* Improve cross-referencing of acme_* modules.

* General improvements.

* Fixing syntax error.
2018-07-04 15:22:11 +02:00
Deiwin Sarjas
6412cbf84b aws_eks_cluster: Add wait functionality (#42259)
* aws_eks_cluster: Improve output documentation

This data is already returned by the module, it just wasn't documented. These
fields are required for accessing the created Kubernetes API with e.g. the
k8s_raw module.

* aws_eks_cluster: Add wait functionality

This enables further cluster configuration once it's created and active.

20 minutes was chosen as an arbitrary default, so that if it takes longer than
the documented "usually less than 10 minutes" it's still likely to succeed.

* Correct security group name in aws_eks tests

* Improve teardown of aws_eks tests

Fix minor teardown issues. The `pause` step is a placeholder until
a waiter for `state: absent`
2018-07-04 22:30:57 +10:00
Ganesh B. Nalawade
c43beef258 Minor changes 2018-07-04 17:45:12 +05:30
gstaicu
8590465d96 Update pause.py (#42297)
Change spelling from 'contols' to 'controls'
2018-07-04 16:48:55 +05:30
Ganesh B. Nalawade
d1ff8e2dca Update ssh_config to accept file path 2018-07-04 11:37:35 +05:30
Trishna Guha
df8ad8ebf9
fix regex cliconf nxos (#42288)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-04 10:46:28 +05:30
Dave Thelen
51092c6ea5 Update eos_l2_interface.py (#42270) 2018-07-04 10:17:46 +05:30
mjmayer
b60fc33eef Add execution_role_arn parameter (#41849)
* Add execution_role_arn parameter

* Change ecs_taskdefinition to use AnsibleAWSmodule

Botocore version checking is becomming more common. Changing the ecs_taskdefinition
to use AnsibleAWSmodule allows more easily for this.

* Change launch type check to use botocore_at_least function

* Remove execution_role_arn param from params dict

* Change check to use parameter

* Fix typo

* Add test for old botocore version

* Add test for execution role parameter

* Remove iam_role_facts task

Task was unecessary. The same information could be gathered by registering
the iam_role task.
2018-07-04 14:34:11 +10:00
fxfitz
f92b95b8cb Remove ipa_ modules from sanity ignore; fix the docs 2018-07-03 18:16:09 -07:00
cahlchang
92dce2943f [AWS] Add check Iam Role description update (#39773)
* add check description update

* Ensure 'Description' is in the role so KeyError isn't caused

* Fix changed when modifying the description with check mode
2018-07-03 18:01:14 -04:00
Ganesh B. Nalawade
8d8d4b3d86 Add options for jumphost in netconf connetion
Fixes #37262
Fixes #36284

*  Updates options in netconf connection to enable
   bastion/jump host setting using configuration/enviornment
   varaibles.
*  Update troubleshooting docs from using bastion host with netconf
   connection
2018-07-03 23:54:26 +05:30
Manu Pascual
313e7ba55e Fix set the correct key option in the docs (#42251)
In vmware_vmkernel, parameter is subnet_mask instead of netmask
2018-07-03 20:12:51 +05:30