Commit graph

18951 commits

Author SHA1 Message Date
David M. Lee
1fd454e5b5 Add yaml output plugin (#32246)
* Add yaml output plugin

Using YAML instead of JSON for detailed output can (IMO) improve
readability; especially for tasks with either lots of output, or
multi-line output.

* Fix yaml output plugin documentation

 * Added copyright header to yaml.py
 * Moved mention of yaml output plugin to `New Modules` section

* Use AnsibleDumper in yaml output plugin

Also moved the `represent_scalar` setup into the init method. As a
global statement, it was causing exceptions trying to get an `id`
field that does not exist.

* Remove trailing whitespace

* Remove useless json.loads/dumps from yaml output
2017-11-07 22:00:11 -05:00
Luka
431042da8e OC Module - Disable complex list merging. Fixes #31196 (#31387)
* Minor fix.  Fixes #31196

* Disable complex list comparison and merge. Fixes #31196
2017-11-07 21:52:43 -05:00
Dag Wieers
90b867b7a5 bigip_virtual_server: PEP8 compliancy and documentation fixes (#32652)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-07 20:52:30 -05:00
Sloane Hertel
134b9f50c3 Do not set a default value for description in the iam_role module. (#32629) 2017-11-07 20:14:13 -05:00
Brian Coca
d22627d944 handle ignore_errors in loop
ensures we get both a templated ignore_errors and a
correct 'summary' result for ignore_errors when used in loops

fixes #32384
2017-11-07 19:53:03 -05:00
Sloane Hertel
680d06d1ab [cloud] remove ec2_asg usage of Python base logging - fixes #32476 (#32508)
* replace logging with module.debug in ec2_asg

* Make module global in ec2_asg.

* Fix the debug messages

* pep8
2017-11-07 16:46:49 -05:00
Dominik Holler
2b08fd3fb8 ovirt_cluster: Add external network providers (#32433) 2017-11-07 16:01:42 -05:00
Dag Wieers
10bfa89f06 zfs: PEP8 compliancy and documentation changes (#32648)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-07 15:33:32 -05:00
Will Thames
c93ddf5473 Move profile and region checking to module_utils.ec2 (#31921)
* Move profile and region checking to module_utils.ec2

Remove ProfileNotFound checking from individual modules

There are plenty of `if not region:` checks that could be removed,
once more thorough testing of this change has occured

The ec2_asg, iam_managed_policy and ec2_vpc_subnet_facts modules
would also benefit from this change but as they do not have tests
and are marked stableinterface, they do not get this change.
2017-11-07 13:56:17 -05:00
Dag Wieers
5a1006452b
Fix typos 2017-11-07 17:45:07 +01:00
Dag Wieers
d3e16fa15b
win_defrag: Fixes to documentation (#32634) 2017-11-07 16:35:54 +01:00
Dag Wieers
dace517133
Fix error in YAML example 2017-11-07 16:30:53 +01:00
Dag Wieers
9d156c6cb1
docker: PEP8 compliancy and documentation changes (#32628)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-07 15:35:50 +01:00
Dag Wieers
4afb3bf76c
Fix small typo (#32625) 2017-11-07 14:22:15 +01:00
Nikhil Kathole
585ecc2867 gce: PEP8 compliancy Fixes (#32311)
* gce: PEP8 compliancy Fixes

* Documentation updates

* Documentation updates

* Documentation update
2017-11-07 14:19:17 +01:00
nilhase25
6ddc7c8524 Pep8 puppet.py (#32313)
* fix pep8 issue in consul_kv.py

* fix pep8 issue in aos_login.py

* fix pep8 issue in puppet.py

* Restore legacy-files.txt
2017-11-07 14:00:39 +01:00
Yadnyawalkya Tale
d21a6aa147 Ansible system module: sanity pep8 fixes (#32314)
* Ansible system module: pep8 fixes

* Clean up documentation

* Blank line change not required by PEP8

* Update legacy-files.txt

* Documentation updates

* Update documentation

* Documentation update
2017-11-07 13:46:55 +01:00
Trishna Guha
48ab1a1334
eos_static_route DI module (#32587)
* eos_static_route DI module

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

* Integration test

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

* Add net_static_route test

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

* Validate ip address

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-07 11:13:03 +00:00
Satyajit Bulage
1857d11034 ovirt: PEP8 compliancy fixes (#32316)
* ovirt: PEP8 compliancy fixes
This PR includes:
- PEP8 compliancy fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>

* Improve documentation

* Update documentation

* Update documentation

* Update documentation

* Fix legacy-files.txt

* Update documentation

* Fix PEP8 issue

* Fix PEP8 issue

* Fix another PEP8 issue

* More typo fixes

* Yet another PEP8 typo
2017-11-07 11:50:33 +01:00
Yadnyawalkya Tale
a2d34e914e PEP8 fixes: Ansible system module and playbook base.py (#32322)
* Ansible files module sanity pep8 fixes

* Ansible system module and playbook base.py

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank line changes not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Missing piece after merge

* Blank lines

* Blank line

* Line too long

* Fix typo

* Unnecessary quotes

* Fix example error
2017-11-07 09:38:59 +01:00
paulquack
a5da2e44a1 ironware_config module (#32187) 2017-11-07 08:22:22 +00:00
paulquack
806f43a9c0 ironware_facts module (#32186) 2017-11-07 08:19:56 +00:00
Tim Rupp
2bf6ac6c78
Adds bigip_device_trust module (#32608)
This module can be used to manage trusts between two bigip devices.
2017-11-06 20:14:49 -08:00
Kenneth D. Evensen
4eccb447cf Lookup plugin for the OpenShift Container Platform. 2017-11-06 19:21:52 -05:00
Matt Davis
8a24116dcb
remove experimental warning from become/runas (#32604)
* updated docs/changelog accordingly
2017-11-06 15:37:45 -08:00
Rob
8b3ca4c537 Fix returning module parameters for iam_role (#30669)
* remove iam_role= from module.exit_json() to match return docs.

* Add back old iam_role= for backwards compat
2017-11-06 16:34:51 -05:00
Dan O'Brien
a026d64c08 [cloud] Option to add description to iam_role (#32582)
* Option to add description to role

* set default to remove conditional
2017-11-06 15:12:12 -05:00
Will Thames
6b9faaf90e [cloud][docs] Improve exception handling guidelines for AWS modules(#30745)
Better document what exceptions to handle, when and why.
Describe how to handle client auth exceptions, and that
AWSRetry retries on `XYZNotFound` exceptions.
2017-11-06 15:05:32 -05:00
Matt Davis
8ecc7bc4a1
minor become/runas cleanup (#32564)
* removed/blobified unused PInvoke stuff
* added try/finally around impersonation to ensure RevertToSelf is called in all cases
* added a few explanatory comments
2017-11-06 11:24:04 -08:00
Thom Wiggers
16e98c8c5b Fix a typo in the examples (#32599) 2017-11-06 19:39:10 +01:00
Toshio Kuratomi
f79a6040ab
Create a short license for PSF and MIT. (#32212)
Modify selectors, six, and urls.py (match_hostname) to use the short license
2017-11-06 10:25:30 -08:00
James Mighion
749197b436 Updating the options to allow decryption and new save_when. (#32602) 2017-11-06 18:20:12 +00:00
David Hain
708829fab9 Use to_native when validating proxy result (#32596)
* Use bytes directly instead of converting to text
2017-11-06 09:20:07 -08:00
Philippe Dellaert
930fde5f70 vmware_dvs_portgroup: Add configuration of vlan trunk, security settings and port policies and integration tests (#32298)
* Add configuration of vlan trunk, security settings and port policies, and tests

This commit adds the following capabilities to the
vmware_dvs_portgroup module:
- Support for VLAN trunk portgroup
- Support for all security settings (promiscuous, forged transmits & mac
address changes)
- Support for all the port specific policies
- port specific policies match the vCenter UI behaviour (for instance:
block override is enabled by default)
- Cleanup and use of proper API entities not root entities
- Integration testing

* Cleanup of docs and adding more examples
2017-11-06 11:46:51 -05:00
Elad Alfassa
03a06fdc0f module_utils/manageiq: add find_collection_resource_or_fail 2017-11-06 11:41:57 -05:00
Toshio Kuratomi
28b86b1148 **Temporary**
The copy module has been failing since we changed the default of the
file module's follow parameter.  Make this change to try to get tests
working and then we'll diagnose and fix this afterwards.
2017-11-06 07:56:01 -08:00
Dag Wieers
91ce5c70d3
Fix duplicate type keyword 2017-11-06 14:10:17 +01:00
Yadnyawalkya Tale
fcab13a668 PEP8 fixes: Ansible source_control module (#32323)
* PEP8 fixes: Ansible source_control module

* Some more cleanup changes

* More cleanups

* Fix copyright statement
2017-11-06 14:00:33 +01:00
Jimmy Hedman
dc40efc13f ipa_dnsrecord: Allow for TXT Records (#32427)
* ipa_dnsrecord: Allow for TXT Records

* Clarified version.

- Added note about in which version TXT-record was added.
2017-11-06 04:15:18 -05:00
Jordan Borean
978a979566
win_dsc: improved parameter handling (#31556)
* win_dsc: improved parameter handling

* removed uneeded try/catch leftover from testing

* removed undeed return values

* added custom DSC to fully test out casting

* fix up codestyle issues

* using new Requires ps version check

* fixed up error message check on earlier ps version
2017-11-06 09:44:04 +10:00
Julian
55bc8291d6 Add the uid-/gidnumber as an argument to ipa_user (#32561)
* Adds the uid-/gidnumber as an argument to ipa_user

* Fixes issue #32555
* Adds the uidnumber which is called UID in the IPA web interface most
often, but called uidnumber in the JSON-API of IPA's `user_mod`
call.
* Adds the gidnumber which is called GID in the IPA web interface, but
called gidnumber in the JSON-API
* Code changes analogue to PR #32369

* Removed wrong version_number from telephonenumber

Remove wrongly placed version_number information

* Put arguments in different lines

Following PEP-8 the uidnumber and gidnumber are on different lines in the update method
2017-11-05 22:53:36 +01:00
Martin Krizek
a8ab1a0b20 yum: use the C locale when screen scraping (#32203) 2017-11-05 09:28:05 -05:00
Abhijeet Kasurde
b5f1fc850b Allow user to specify maintenance DB (#32510)
This fix allows user to specify alternative maintenance DB
required for initial connection in Postgresql_db module.
Also, adds pep8 related fixes.

Fixes: #30017

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-05 05:44:40 -05:00
Dag Wieers
9a6615a905
Make newer stuff PEP8 compliant (#26951)
So we fixed everything that was not a module to be PEP8 compliant, and
in the meantime these 5 new files were additionally disabled from PEP8
testing.

This fixes it.

Also update Copyright/License statements.
2017-11-05 11:27:41 +01:00
Strahinja Kustudic
769881198f Sets sane defaults for follow in file modules (#31430)
* Sets sane defaults for follow in file modules
* Add a note in replace for removal of `follow` option
2017-11-03 17:13:58 -07:00
Jordan Borean
15b492ca57 win_become: get admin token and fix async (#32485)
* win_become: make it easier to become with an admin token

* Fixed up pep8 whitespace

* fix for Server 2008

* Added support for async and become on newer hosts and fix warnings
2017-11-03 16:14:48 -07:00
Sloane Hertel
9cfd0a58b0
Use region derived from get_aws_connection_info() in dynamodb_table to fix tagging bug (#32557) 2017-11-03 16:15:53 -04:00
Sam Doran
e65045f51f Add echo option to pause module (#32205)
* Enable ECHO in prompt module

Fixes #14160

* Add option for controlling echo behavior with pause module

* Improve option logic

Allow all options to be used in varying combinations, rather than being mutually exclusive.
Always capture output and return it, even when a time limit is set.

* Add version_added to docs

* Improve behavior of echo output

Set a few more flags to allow interactive deletion and hide control characters.
Do not capture or echo input when a time is set. Tried to get this working nicely, but ran into too many issues/oddities to keep it. Maybe in the future if there is demand for capturing/echoing input when a time is set I'll take another pass at it.
2017-11-03 13:32:36 -04:00
Bryan Weber
6bc3f98eee Adding missing arguments: 'values' and adding default value for 'tags' argument in AWS Data Pipeline (#32517) 2017-11-03 10:05:23 -04:00
Tim Rupp
06363f6ede
Removes bigip_snmp from skip file (#32530) 2017-11-03 07:00:49 -07:00
patlachance
45e35be4c1 iam.py: return iam.role dict when creating roles (#28964) 2017-11-03 09:55:27 -04:00
Tim Rupp
53940670fd
Removes bigip_qkview from skip file (#32529) 2017-11-02 21:27:11 -07:00
jctanner
c76ce54aee
Add -f/--list_files option to the ansible-doc command for faster list (#32524)
Add -f/--list_files option to the ansible-doc command for faster listing of plugins and show where they were found.
2017-11-02 21:29:55 -04:00
Tim Rupp
45787f6ef2
Removes bigip_provision from skip file (#32525) 2017-11-02 17:40:41 -07:00
Jordan Borean
5b1db00b65
win_service: quoted path fix (#32469)
* win_service: fix for path in quotes

* Added tests to verify behaviour doesn't regress
2017-11-03 09:55:03 +10:00
Brian Coca
e582a69e9c
show specific undefined var errors on -v in debug (#32206)
* show specific undefined var errors on -v in debug

allows users to get more specific information about undefined errors
as they might be looking at a complex data structure and need to find
the specific leaf that has the issue

* now tests works at all verbosity levels

* updated to unicode objects
2017-11-02 18:11:31 -04:00
Brian Coca
9d28973b5e ini plugin should recursively instantiate pending
solves inconsistent behaviour on ini host format depending on definition order
fixes #32196
2017-11-02 17:57:20 -04:00
Tim Rupp
9a13bf9bff
Adds partition support to bigip_asm_policy (#32519)
This functionality requires version 3.0.4 of the f5-sdk
2017-11-02 13:23:59 -07:00
Tim Rupp
64871470e2
Removes bigip_pool from the skip file (#32516) 2017-11-02 13:10:37 -07:00
Tim Rupp
ab71a9de14
Removes bigip_irule from the skip file (#32509) 2017-11-02 11:38:39 -07:00
Toshio Kuratomi
d166bba126 Fix non-ascii errors in config manager 2017-11-02 11:05:13 -07:00
Matt Davis
1e340b1940 fix typo in azure_rm_vm plan 2017-11-02 09:11:43 -07:00
Jonathan Nuñez
67b1d0f274 CloudFormation module: get StackEvents when ClientRequestToken is not used (#32434)
* When getting the stack events we need to consider the case where we don't have ClientRequestToken fixes #32396

* Adding tests for the case when the ClientRequestToken is not present in the stack creation.

* Renaming the stack that the test for Client Request Token requires so it won't cause collisions with the basic test.
2017-11-02 11:41:49 -04:00
Tim Rupp
6b6df43eae
Removes bigip_iapp_template from the skip file (#32488) 2017-11-02 07:47:28 -07:00
Ondra Machacek
ee26ecfcfd ovirt_templates: wait for OK state when importing (#31634) 2017-11-02 09:24:42 -04:00
Pilou
7fe69daa4d Modules metadata: fix invalid GitHub ID in author field (#31856)
* Replace Twitter username with GitHub ID

See 8bfa19c4af

* Replace Twitter username with GitHub ID

See 22766906b0

* Fix GitHub ID: add missing letters

See:
- nxos_banner.py: 9c6ee8d0bb
- nxos_logging.py: e37e736ddb
- net_user.py: f6a4803669

* Remove nonexistent author, use GitHub organization

See https://github.com/ansible/ansible-modules-core/pull/2880

Not sure how Ansibullbot will handle an organization ID, but
other deprecated modules already use it.

* Replace Twitter username with GitHub ID

* Replace Twitter username with GitHub ID

See bf59d1cc1e

* Replace Twitter username with GitHub ID

See d02a9016a2

* Author: use GitHub ID

See 0847bfecd6

* Replace Twitter username with GitHub ID

See a59684fddd

* Replace Twitter username with GitHub ID

See 94f9bb962f

* Replace Twitter username with GitHub ID

See 40b7dffea8
2017-11-02 06:52:18 -04:00
Suan Kan
690a626d0d Issue #32416. Fix exit from configuration mode in case of command failure (#32417) 2017-11-02 11:55:37 +05:30
Tim Rupp
015baf5149
Removes bigip_iapp_service from skip list (#32482) 2017-11-01 21:47:56 -07:00
Tim Rupp
60281b85fe
Refactored bigip_device_dns (#32483)
Module was using old coding standards. This updates the module
2017-11-01 20:31:26 -07:00
Tim Rupp
cbc5c2d556
Removes bigip_hostname from skip file (#32479) 2017-11-01 19:56:20 -07:00
Jordan Borean
9dc9313c65
win_package: add support for arguments as list (#32024)
* win_package: add support for arguments as list

* re-added failure tests as they were accidentally commented out

* changed exit_code in failure messages to rc
2017-11-02 09:39:21 +10:00
Jordan Borean
56a7278256
win_find: allow module to skip on files it fails to check (#32105)
* win_find: allow module to skip on files it fails to check

* fixed up test creation to work pre psv5
2017-11-02 09:35:19 +10:00
Michael
3e080ad53d Fixes typos in changelog/comment (#32464) 2017-11-02 09:07:42 +10:00
Prasad Katti
86141c3e03 [ec2_ami_facts] new boto3-based module as a replacement for ec2_ami_find (#32252)
* [ec2_ami_facts] new boto3-based module as a replacement for ec2_ami_find

- new boto3-based module to gather facts about ec2 images
- intended to replace ec2_ami_find which uses boto
- an ami find task (using new module) added to the ec2_ami integration test

* [ec2_ami_facts] Use AnsibleAWSModule. Catch BotoCoreError.

* add ec2_ami_facts alias to tests

* [ec2_ami_facts] return ami launch permissions as well
2017-11-02 08:56:58 +10:00
Peter Sprygada
e33c24f585
fix issue with eos config replace not working (#32468) 2017-11-01 18:56:32 -04:00
akatch
ea2afc6ebc Fixes #32092 (#32412)
* Fixes #32092

* Linter fix
2017-11-02 08:54:11 +10:00
Matt Davis
ded023bb3b add plan support to azure_rm_virtualmachine (#32401)
* allows third party billing plans to be specified for an instance
2017-11-02 08:50:29 +10:00
Tim Rupp
d5d4683047
Removes bigip_snmp_trap from skip file (#32470) 2017-11-01 15:20:28 -07:00
Tim Rupp
e3f1198a67
Removes bigip_ucs from skip file (#32462) 2017-11-01 14:22:35 -07:00
Jacob Floyd
ca8668f08b Use playbook callbacks for adhoc commands too
This makes adhoc mirror playbook callback functionality by running a
callback before and after all tasks have run. Adhoc commands now call:

- v2_playbook_on_start
- v2_playbook_on_stats

NOTE: When v2_playbook_on_start is called, a dummy playbook is provided
that says its _file_name is __adhoc_playbook__. All callback plugins
that provide v2_playbook_on_start access the _file_name attribute, so
this should maintain backward compatibility when those plugins are
called with adhoc commands even though they would not have been called
previously. The adhoc play is also added to _entries for any private
callback plugins that might be using this callback.
2017-11-01 16:46:22 -04:00
Brian Coca
0f7fcd2b40
config lookup plugin (#32392)
* config lookup plugin

* added info about ansible-config list

* fixed typoes

* now with option and error handling

* fixed import, better docs
2017-11-01 16:38:03 -04:00
Abhijeet Kasurde
51c5b51ea3 Handle error message from psycopg2 using to_native (#32371)
This fix adds handling of error/exception message using
to_native API instead of decoding.
Also, fixes PEP8 errors.

Fixes: #31825

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-01 16:11:52 -04:00
Abhijeet Kasurde
61ca2a711d Update docs for expire option in postgresql_user (#32418)
This fix adds documentation update and example update
for user's password expiration option 'expire' in postgresql_user.
Now, option is more clear and explicit about default value.

Fixes: #30195

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-01 16:04:34 -04:00
René Moser
c098c42ab9
vultr: new module utils and common docs (#30868)
* vultr: new module utils and common docs

* vultr: minor fixes after review
2017-11-01 20:16:59 +01:00
u571kills
869cf3fbdb Fix example on comparing master config (#32406)
Current example produces error message: 

"msg": "Unsupported parameters for (ios_config) module: diff_config Supported parameters include: after,auth_pass,authorize,backup,before,defaults,diff_against,diff_ignore_lines,force,host,intended_config,lines,match,multiline_delimiter,parents,password,port,provider,replace,running_config,save,save_when,src,ssh_keyfile,timeout,username"
2017-11-01 19:03:38 +00:00
Tim Rupp
27188d46a9
Adds bigip_iapplx_package module (#32456)
This module can be used to manage the iAppLX packages you have
installed on a device. It can install and remove packages in
their RPM format.
2017-11-01 12:00:06 -07:00
Tim Rupp
c239749052
Removes bigip_user from skip file (#32451) 2017-11-01 10:37:23 -07:00
Tim Rupp
83674af284
Removes virtual_address from skip file (#32425) 2017-11-01 09:49:06 -07:00
Dave Thelen
2c99cbc874 eos_eapi: adding the desired state config to the new vrf fixes #32111 (#32112)
* adding the desired state config to the new vrf fixes #32111

* fix default vrf initial configured

* add unit test
2017-11-01 22:18:52 +05:30
Abhijeet Kasurde
2b22d36b88 Handle error in user addition in postgresql_user (#32443)
The fix adds exception handling while user add operation in
postgresql_user module.

Fixes: #29738

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-01 12:21:50 -04:00
Brian Coca
4fb9e54c50 calculate max fail against all hosts in batch
currently it is doing only from the 'active' hosts in the batch which means
the percentage goes up as hosts fail instead of staying the same.
added debug info for max fail

fixes #32255
2017-11-01 08:45:31 -07:00
Brian Coca
41685fb516 fix precedence issue with facts and vars (#32302)
avoid making gathered facts high precedence, only set_fact is supposed to be.
vars set via set_fact with cacheable are higher precedence than plain facts.

Previously (after 6fbd0a8bb5) regular facts would end up with a
higher precedence than host or play vars, but they should not be. Facts were getting added to 'non_persistent_facts' (equivalent to 'register' vars) which is higher precedence than facts should be.

added 'cacheable set_facts' to precedence docs

'ansible_facts_cacheable' ->  '_ansible_facts_cacheable' (made 'private')
2017-11-01 11:42:17 -04:00
Ganesh Nalawade
26583adb58
Fix wrong prompt issue for network modules (#32426)
* Fix wrong prompt issue for network moodules

Fixes #31161
Fixes #32416

*  Store the device prompt in case of error
   from remote device
*  Check for prompt value in ios action plugin

* Add integration test
2017-11-01 19:38:19 +05:30
Will Thames
0405edcac8 Improve efs_facts (#31817)
Avoid an infinite loop when no EFS resources are present

Use standard ansible approaches to pagination, retries,
exception handling, tag processing
2017-11-01 10:05:14 -04:00
Sébastien DA ROCHA
bc4ba6b638 Iptables unit tests (#30762)
* Add some tests for iptables

* Fix remove bug (calls 2 times check to remove a chain)

* Add me as maintainer

* Fix PEP8

* Doc: Give more information on issue #18988

* Fix #18988 and test it

* Fix doc (thanks Pillou)

* enable PEP8 check for iptables
2017-11-01 12:08:57 +01:00
Sean Cavanaugh
1068aa3ce7 Fixing nxos_vlan to match platform agnostic net_vlan part2 (#32410)
* adding active and suspend to state to match net_vlan module

although this is backwards compatible (for now)

* removing bad config

* getting rid of bad yml syntax
2017-11-01 14:56:38 +05:30
Yawei Wang
d7c8fdbd79 add check mode for acs delete (#32063) 2017-11-01 02:01:59 -04:00
Toshio Kuratomi
42655f737a
Clarify the release and maintenance cycle (#32402)
* Clarify the release and maintenance cycle
* Namespace refs a little
* Fix an unrelated problem with plugin return docs to fix docs build
2017-10-31 22:08:14 -07:00
Tim Rupp
fc4580b4cc
Removes bigip ssl certificate from skip file (#32424) 2017-10-31 21:17:07 -07:00
Tim Rupp
6193d5bc65
Removes gtm wide ip from skip file (#32422) 2017-10-31 20:45:42 -07:00
Tim Rupp
8868b5fa85
Removes gtm pool from skip file (#32419) 2017-10-31 20:12:53 -07:00
David Kretch
312155a641 Add ec2_vpc_route_table example, fix typo (#32415)
* Add an example in the `ec2_vpc_route_table` module of deleting a
route table.
* Fix a typo in the AWS development guidelines, from `fail_json.aws()` to
`fail_json_aws()`.
2017-11-01 12:34:34 +10:00
Dag Wieers
a1d60741a7 consul_kv: PEP8 compliancy and doc fixes (#32340)
This PR includes:
- PEP8 compliancy
- Doc fixes
2017-10-31 22:27:56 -04:00
Tim Rupp
daaf8ca86c
Fixes skip imports for bigip_configsync_action module (#32413) 2017-10-31 19:22:36 -07:00
Kevin Zhao
ef32d67868 add user agent for cloud shell (#32332) 2017-10-31 17:43:48 -07:00
Tim Rupp
8f2b243a3e
Fixes bigip_config to remove from skip file (#32409) 2017-10-31 15:48:23 -07:00
Brian Coca
3e80f9caf4 luseradd defaults to creating w/o need for -m (#32411)
and -M is incorrect in this case
2017-10-31 14:25:29 -07:00
Tim Rupp
8c5cd9c530
Removes bigip_command from the skip file (#32407)
Includes fixes and enhancements to make it unnecessary to include this
module in the skip file
2017-10-31 13:50:28 -07:00
Brian Coca
bd321a0af6 adjust nohome param when using luser
fixes #32199
2017-10-31 16:35:03 -04:00
Brian Coca
95b31a3b61
Playbook dir option (#32275)
* initial add of basedir

Allows you to set a 'playbook dir' for adhoc, inventory and console to allow for 'relative path loading'
2017-10-31 15:41:30 -04:00
Tim Rupp
8037eb7474
Various fixes for bigip_remote_syslog (#32404)
This patch addresses a number of issues, large and small, that were
identified by users in the downstream repo.

* formatting of some code
* specific option combinations leading to errors
* missing includes for unit tests
2017-10-31 12:32:50 -07:00
Brian Coca
43714a0091 corrected package docs 2017-10-31 15:31:42 -04:00
Will Thames
710d1f074e Allow health_check_port to be a string (#32228)
Setting health_check_port to 'traffic-port' allows the health
check to use the target's traffic port.
2017-10-31 10:27:12 -04:00
Jim Gu
d23da2e494 add support to vmware_guest for template => vm conversion (#31607)
* add support to vmware_guest for template => vm conversion

While the vmware_guest currently supports conversion of VMs to templates
using the is_template argument, it does not support the inverse:
converting templates back into VMs.  This change adds that
functionality.

When converting a template back into a VM, the extra config option
"uuid.action" is also set so that VMware will automatically create a new
UUID for the converted VM.  If the "uuid.action" setting is already
configured, it will not be modified.  Setting this prevents an
interactive question from being raised when attempting to boot the VM.

* Add integration tests for vmware_guest is_template

* Add additional idempotency test for vmware_guest is_template
2017-10-31 09:12:40 -04:00
Martin Krizek
e3a847a142
git: fix archive when update is set to no (#31829) 2017-10-31 13:56:40 +01:00
Satyajit Bulage
52aa522c19 google: PEP8 compliancy fixes (#32309)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
2017-10-31 10:53:31 +01:00
Paul Neumann
53fead7c96 ios_logging: Fix some smaller issues, add unit test (#32321)
* ios_logging: Fix typo in documentation

* ios_logging: Fix traceback when setting buffered destination without size

When the size parameter is not configured while configuring the buffered
destination, a traceback occurs due to the fact that validate_size expects the
parameter to be an int. Explicitely converting value to int makes the
check work for every case.

* ios_logging: Update size parameter documentation

Update the documentation of the size paramter to reflect the current behaviour
of setting a default of 4096 for the buffered dest.

* ios_logging: Add unit test

Add unit test for ios_logging testing the behaviour clarified in the previous
commits.

* ios_logging: Fix python 2.6 compliance
2017-10-31 09:25:07 +05:30
Prasad Katti
a2e4196c11 [aws] Document boto3 requirement (#32329) 2017-10-31 09:49:30 +10:00
UnderwayNYC
11faafcbf7 Fix error when there are no docker volumes present yet (#28145)
* Fix error when there are no docker volumes present yet

* fixes suggested by Shippable
2017-10-30 15:53:08 -04:00
Brian Coca
c3564096cd
Inventory and varmanager updates (#32054)
* better parsing erros

* fix inventorydata serialization

* dicts fix
2017-10-30 14:55:13 -04:00
Brian Coca
e70c0afc5e now with_dict allows for direct 'lookup' usage
fixes #32067
2017-10-30 14:52:58 -04:00
Joseph S. Tate
77061f5521 ec2_lc - cast volume_size for an EBS volume to an int (#32291) 2017-10-30 14:41:40 -04:00
Brian Coca
75a6f9dbc2
remove misleading group vars as they are flat (#32276)
* remove misleading group vars as they are flat

* fixed vars display
2017-10-30 12:59:43 -04:00
Brian Coca
e05dacfe91 more info on yaml errors
print yaml's 'problem'
2017-10-30 12:39:30 -04:00
Brian Coca
64220fcbcc ensure we always have a basedir 2017-10-30 12:28:09 -04:00
nilhase25
1a43038bc2 Pep8 aos login.py (#32312)
* fix pep8 issue in consul_kv.py

* fix pep8 issue in aos_login.py
2017-10-30 21:56:34 +05:30
Tim Rightnour
f7f262adc7 Add the ability to rename a snapshot, or change it's description. (#31441)
Also add tests for vmware_guest_snapshot, but disable them due to
vcsim not fully supporting such operations yet.

Implement changes suggested in review.  Also fix same in remove_or_revert_snapshot() for consistency
2017-10-30 12:20:03 -04:00
Prasad Katti
f78f93e646 Added some more info about the aws_s3 module's overwrite option (#31819) 2017-10-30 11:22:05 -04:00
James Tanner
ded0b6ed83 Change the ssh+sudo debug messages to vvv for easier troubleshooting in awx+tower 2017-10-30 10:41:50 -04:00
James Sumners
4a19482413 Add check for sv binary (#32250)
* Add check for sv binary

This commit adds a check for the sv binary. If the binary is not present
then the module will fail.

Resolves issue #32248

* Change sv check to suggestion by @bcoca
2017-10-30 09:59:41 -04:00
nilhase25
9cff2c376b fix pep8 issue in consul_kv.py (#32310) 2017-10-30 11:37:52 +01:00
Dag Wieers
b0954dbeb4
Fix typo 2017-10-30 11:14:06 +01:00
Ken Evensen
8724ff3eae pamd: fix issue with trailing commas in module_arguments 2017-10-30 08:24:21 +01:00
paulquack
7f92741c3d Remove references to provider in documentation, update license (#32242) 2017-10-30 12:34:29 +05:30
Jordan Borean
6bc85744ef
win_uri: fix elif to elseif (#32330) 2017-10-30 10:43:43 +10:00
Willem van Ketwich
310eb833a4 EC2 AMI boto3 modifications (#28506)
Migrate ec2_ami module to boto3
2017-10-30 10:20:27 +10:00
Dag Wieers
16bbc19674
subversion: PEP8 compliancy and doc fixes (#30909)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:09:00 +01:00
Dag Wieers
86bb82a220
user: PEP8 compliancy and doc fixes (#30895)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:06:37 +01:00
Dag Wieers
63edeb1644
systemd: PEP8 compliancy and doc fixes (#30892)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:04:57 +01:00
Dag Wieers
8b2bf09c49
service: PEP8 compliancy and doc fixes (#30890)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:03:54 +01:00
Dag Wieers
edc0ff481c
seboolean: PEP8 compliancy and doc fixes (#30888)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:02:45 +01:00
Dag Wieers
32775b0caa
hostname: PEP8 compliancy and doc fixes (#30886)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 01:00:49 +01:00
Dag Wieers
3ae42afbc7
getent: PEP8 compliancy and doc fixes (#30885)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-30 00:58:04 +01:00
Dag Wieers
11f8d9659d
at: PEP8 compliancy and doc fixes (#30881)
This PR includes:
- PEP8 compliancy fixes
- Documentation changes
2017-10-30 00:56:54 +01:00
Dag Wieers
babc2354a5
lineinfile: pylint fixes and docs (#30854)
This PR includes;
- pylint fixes
- Documentation updates
2017-10-30 00:55:14 +01:00
Dag Wieers
2f8c88b687
file: pylint fixes and docs (#30849)
This PR includes;
- pylint fixes
- Documentation updates
2017-10-30 00:53:44 +01:00
Dag Wieers
a6415f9ad9
copy: pylint and docs (#30847)
This PR includes;
- pylint fixes
- Documentation updates
2017-10-30 00:52:45 +01:00
Dag Wieers
e365085644
acl: pylint fixes and docs (#30841)
This PR includes;
- pylint fixes
- Documentation updates
2017-10-30 00:52:10 +01:00
Dag Wieers
c46401e41f
tempfile: PEP8 compliancy, pylint and docs (#30859)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-10-30 00:51:19 +01:00
Dag Wieers
f64a8f58a3
synchronize: PEP8 compliancy, pylint and docs (#30858)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-10-30 00:49:47 +01:00
Dag Wieers
19c3c7fe44
blockinfile: PEP8 compliancy, pylint and docs (#30845)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-10-30 00:43:18 +01:00
Dag Wieers
fb18e27d87
assemble: PEP8 compliancy, pylint and docs (#30844)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-10-30 00:41:47 +01:00
Dag Wieers
0129b96065
archive: PEP8 compliancy, pylint and docs (#30842)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-10-30 00:39:30 +01:00
Dag Wieers
a4e077b357
Fix typos and docs 2017-10-30 00:37:06 +01:00
Will Thames
08d81b970d
Amazon kms_facts module (#26733)
* Amazon kms_facts module

Facts module for Amazon's Key Management Service

* kms_facts provide aliases

Return aliases for keys
Provide `alias` as a filter
Cope when tags can't be listed
Ensure everything is properly snake cased

* Rename kms_facts to aws_kms_facts

There may be conflicting KMS modules for other providers otherwise.

* Fix documentation, add aliases cache

Aliases are called many times, so add a cache

* Reduce amount of info on deleted keys

Getting info on a key is costly (2s) per key, so reduce
info on deleted keys.

* Add policy information to facts

* aws_kms_facts version update

Fix ridiculously long RETURN line

* Remove dangerous-default-value from aws_kms_facts
2017-10-30 09:10:11 +10:00
Trond Hindenes
e3fc53b6fc Added info to win_service docs (#32320)
* Added info to win_service docs

* minor typo fix
2017-10-30 05:43:18 +10:00
Aniket Khisti
27694f6909 PEP8 compliancy for os_server_volume module (#32306) 2017-10-29 14:15:32 +05:30
Toshio Kuratomi
2e12a5f8c2 Revert "Removed a force conditional (#28851)" (#32282)
This reverts commit 07acc579db.

On closer examination of this code, the conditional that had force in it
was not a parent of this one.  So handling of force is needed i both
branches.

See the recent comments on #23391
2017-10-28 18:35:32 +10:00
Tim Rupp
2a5f6c28cf
Adds bigip_asm_policy module (#32281)
This module can be used to import asm policies from file or existing
template. Supported file types are xml, compact xml, and binary
2017-10-27 22:31:52 -07:00
Tim Rupp
a16db95ddb
Adds the bigip_ssl_key module (#32270)
This module's purpose is to specifically manage the ssl keys. It
is essentially the key component of the bigip_ssl_certificate module.
The modules were separated and the key portion deprecated from
bigip_ssl_certificate in favor of this module.
2017-10-27 12:52:52 -07:00
Brian Coca
e010fcf7e1 added debug info when skipping undef 2017-10-27 12:16:16 -04:00
Sloane Hertel
27b2c3bd25 lambda: fix undefined variable and initially define account_id as None (#32249) 2017-10-27 09:40:01 -04:00
Prasad Katti
033a6a1560 [ec2_ami_copy] Add return documentation (#32012) 2017-10-27 09:05:50 -04:00
Patrick Ogenstad
81f34cd01c Remove asa_template action plugin (#32233)
Since the asa_template module has been deprecated this action plugin
is no longer needed.
2017-10-27 13:53:09 +01:00
Stanley Karunditu
7553c42e09 Fixes #31090. In network parse_cli filter plugin, this change moves the creation of a (#31092)
new match(block). It previously only occurred if a new match occurred,
but suggest it should occur when an end of a block match is found.
2017-10-27 17:45:36 +05:30
Kedar K
7d5dccefe5 - Fix logging module issue where facility is being deleted along with host (#32234)
- Remove default facility, as facility is not standard on remote syslog server
2017-10-27 15:31:17 +05:30
Trishna Guha
a5f6c726f0 Add vyos_vlan DI module (#32072)
* Add vyos_vlan DI module

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

* Add integration tests

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

* Improve logic and add more test

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

* update boilerplate

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-27 15:21:37 +05:30
Ricardo Carrillo Cruz
80c8b99a62 Handle ip name-server lines containing multiple nameservers (#32235)
In CSR, multiple nameservers are defined in one line, whereas on IOS
it's on multiple ones.
This change handles both.
2017-10-27 10:55:52 +02:00
Prasad Katti
d088b7ab93 Route53 return values (#31962) 2017-10-27 13:27:01 +10:00
Prasad Katti
a199d9d91e [ec2_vpc_nacl_id] Add nacl_id alias for nacl_ids option (#32223) 2017-10-27 13:21:53 +10:00
Benjamin Schweizer
f2023a84a6 Enable TLS1.1 and TLS1.2 for win_package (#32184) 2017-10-27 12:03:52 +10:00
Toshio Kuratomi
8c41fee7bf Fix typo 2017-10-26 17:37:11 -07:00
Evgeni Golov
0769460820 format error messages from module_utils.basic nicer
* lists are printed as a string, separated by a comma and a space
* require_if tells if is_one_of was True or False
2017-10-26 17:37:11 -07:00
Sloane Hertel
c714da7fac cloudformation_facts: don't fail on nonexistent stack - fixes #23419 (#23758)
* Allow cloudformation_facts to exit gracefully if stack does not exist

make cloudformation_facts pep8

remove from legacy files

remove unnecessary if statement

Allow cloudformation_facts to exit gracefully if stack does not exist version 2

fix documentation errors

add an example for a hard-fail if a stack doesn't exist

* Remove extra whitespace

* Use the .response attribute since .message isn't present with Python 3

* Don't fail if no stack name is provided and no stacks exist.
2017-10-26 15:18:31 -04:00
Sam Doran
6a6ea663ea Return all elements in a more robust way
If a trailing ':' is set or not, always return all secrets from a path. This was a bug mostly fixed by this PR.

Update examples.
2017-10-26 13:24:39 -04:00
igor-pinchuk
6b6746dcee Update hashi_vault.py
Add ability to lookup entire objects in HashiCorp Vault.
When used with auth_method allow skipping SSL verify.
2017-10-26 13:24:39 -04:00
Ted Timmons
9322486ac3 Exclude stack policy when running in check mode. (#31940)
Fixes #31931
2017-10-26 12:32:48 -04:00
Marc Mercer
17a008654a Cast target port to an int in elb_target_group. Fixes #32098 (#32202) 2017-10-26 12:09:49 -04:00
Sam Doran
104934c095 Enable ECHO in prompt module (#32083)
* Enable ECHO in prompt module

Fixes #14160

* Set flags to make it possible to edit echoed input as well as hide control charcters

Only do this if a time limit is not set.

* Consolidate settings
2017-10-26 12:05:08 -04:00
Ted Timmons
8ab4412684 aws_kms: handle updated policy format+cleanup (#30728)
* aws_kms: handle updated policy format+cleanup

- create slightly updated policy in that handles lists instead of a single string; the previous version's policy was being rejected if the key was new enough to have the updated base policy.
- removed `dry_run` conditionals, not committing the policy anyhow.
- return the policy in the return data. Leaving undocumented for now.
- update exception handling: don't rethrow in `do_grant`, don't pass anything to `format_exc`.

* whitespace/indent fail

* fix list-plus-brackets

* str and list fixes for ryansb

* port changes from #31667 over, better listification
2017-10-26 09:13:29 -04:00
Luca Lorenzetto
ea05035be2 Use latest available template (#31780)
* Use latest available template

Documentation states:
template_version: version number of the template to be used for VM. By default the latest available version of the template is used.

This was not true because if parameter was not specified, template[0] is choosen, without checking if is the latest. Now, sorting + selecting the latest selects the one with the latest version number.

* Sort in reverse order, style cleanup

Applied fixes from comment
2017-10-26 09:12:34 -04:00
Ondra Machacek
4f01ad41bd ovirt_hosts: Don't fail upgrade when NON_RESPONSIVE state (#32123) 2017-10-26 09:03:29 -04:00
Prasad Katti
13807e7ee8 [cloud][docs] Add a cloudformation_facts example (#31964) 2017-10-26 08:29:10 -04:00
Ryan Brown
838c1ba6c7 [cloud] Bugfix for aws_s3 empty directory creation (#32169)
* [cloud] Bugfix for aws_s3 empty directory creation

* Update integration tests
2017-10-26 08:17:13 -04:00
Prasad Katti
0b357ba223 [ec2] Move note about state=restarted (#31961) 2017-10-26 21:37:33 +10:00
Prasad Katti
91b5a9b868 [ec2-ami] make examples less verbose; fix default values in docs (#32008)
* make ec2-ami examples less verbose

* Fix default values in docs to be the actual default values

Fix default values for `architecture`, `virtualization_type` and
`wait_timeout` in docs to be the actual default values.

* Added note about examples not containing auth details
2017-10-26 21:33:39 +10:00
Prasad Katti
3e0f67786f [ec2_vpc_subnet_facts] Add subnet_id alias for subnet_ids options (#32023) 2017-10-26 21:32:46 +10:00
Prasad Katti
61554143d0 Document return values of ec2_eip (#32018)
- added RETURN value for ec2_eip
- removed note about what is returned
- removed a duplicate example
2017-10-26 21:31:57 +10:00
dgilbert82
78347e12a3 No need to set a default tenancy and it prevents the creation of spot lcs (#31270)
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_82dk2ynr/ansible_module_ec2_lc.py", line 317, in create_launch_config
    connection.create_launch_configuration(**launch_config)
  File "/usr/lib/python3.6/site-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/lib/python3.6/site-packages/botocore/client.py", line 601, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the CreateLaunchConfiguration operation: Placement tenancy is not supported for spot instances.

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "error": {
        "code": "ValidationError", 
        "message": "Placement tenancy is not supported for spot instances.", 
        "type": "Sender"
    }, 
    "failed": true,
2017-10-26 05:43:38 -04:00
Dave Thelen
602a618e60 eos_user: sends user secret first on user creation fixes #31680 (#32162)
* fix command order

* add integration test

* test cleanup

* remove redudant commands
2017-10-26 12:40:58 +05:30
awkspace
87989b5c63 Fix ec2_lc failing to create multi-volume configurations (#32163) 2017-10-26 15:21:47 +10:00
Brian Coca
ca71a50459 Avoid default inventory proccessing for pull (#32135)
* Avoid default inventory proccessing for pull

- now pull's own special inventory processing should work correctly
- also removed ineffective set_defaults

fixes #31449

* use class property instead

* only do localhost for adhoc

(cherry picked from commit aad5d1432583c4aa4105b774f38c80498e85de59)
2017-10-25 19:55:48 -04:00
James Mighion
11153df0a1 Adding a regex for stderr catching. (#31945) 2017-10-25 14:51:49 -07:00
Simon Dodsley
09f55d300b Fix issue #32138 - fix examples typo (#32140) 2017-10-26 07:44:15 +10:00
Michael Wild
8724c069d7 Add delayed start to win_nssm (#32017)
* Adds start_mode=delayed option for win_nssm

It translates to Start=SERVICE_DELAYED_AUTO_START in nssm.

* Adds documentation for the start_mode=delayed option of win_nssm

Also, reformats the start_mode values into a list.
2017-10-26 07:02:14 +10:00
Tim Rupp
23a81af4f1 Adds name fact when retrieving nodes (#32165) 2017-10-25 13:31:20 -07:00
Tim Rupp
cc4bbb2929 Various bigip_pool fixes (#32161)
* corrects copyrights and mocks in unit tests
* fixes module code to include code to cleanup tokens
2017-10-25 12:57:21 -07:00
Daniel Shepherd
8aeb239f73 [cloud] Update ec2_vpc_net_facts to use Boto3 (#25375)
* update ec2_vpc_net_facts module to boto3

updated with RETURN values and other requested changes

removed errant extra blank line

another errant extra line removed...auto-linter not working apparently

updates per review

fix typo in RETURN docs

* fix trailing whitespace issue
2017-10-25 13:26:16 -04:00
Patrick Marques
6790a0f75f [cloud] Add new module digital_ocean_sshkey_facts (#26365)
* do_sshkeys_facts module

* Fix

* Fix version

* Configure timeout and validate_certs for fetch_url

* Add support for new DO_OAUTH_TOKEN env var

* rename module prefix from do_* to digital_ocean_*

* Fix python 2.6 positional index

* Use modules_utils digital ocean lib

* Update metadata version

* Update version added

* Update module from boilerplate

* Update examples

* Add timeout documentation

* Fix typo
2017-10-25 11:34:39 -04:00
otteydw
d2cb676c4c Add a validate example to blockinfile. (#32088) 2017-10-25 15:11:49 +01:00
John R Barker
0e36854213 consul_kv: Fix name & formatting (#32132)
* Fix name & formatting
* Fix examples
2017-10-25 15:39:49 +02:00
Peter Sprygada
1af72afdef inserts enable cmd hash with auth_pass used (#32107)
eapi transport was not passing the auth_pass to the remote device with
it was provided.  this fix will now insert the correct command hash into
the jsonrpc request.

fixes #30802
2017-10-24 21:59:49 -04:00
Sloane Hertel
1dd55acbc2 ec2_group: add rule description support - fixes #29040 (#30273)
* ec2_group: add support for rule descriptions.

* Document rule description feature and add an example using it.

* Fix removing rule descriptions.

* Add integration tests to verify adding/modifying/removing rule descriptions works as expected.

* Add permissions to hacking/aws_config/testing_policies/ec2-policy.json for updating ingress and egress rule descriptions.

* ec2_group: add backwards compatibility with older versions of botocore for rule descriptions.

* Add compatibility with older version of botocore for ec2_group integration tests.

* ec2_group: move HAS_RULE_DESCRIPTION to be checked first.

* Make requested change

* Pass around a variable instead of client

* Make sure has_rule_description defaults to None

* Fail if rule_desc is in any ingress/egress rules and the the botocore version < 1.7.2

* Remove unnecessary variable

* Fix indentation for changed=True when updating rule descriptions.

* minor refactor to remove duplicate code

* add missing parameter

* Fix pep8

* Update test policy.
2017-10-24 21:18:56 -04:00
Tim Rupp
d067166cfc Segment out the update method (#32103)
This patch changes the base parameters class to segment out the
update method. This is done often throughout the f5 modules, so
this just bakes it into the mod utils so that I can delete it
from each module
2017-10-24 16:13:14 -07:00
Sam Doran
4dce9dc796 Add ansible_distribution_major_version to macOS (#31708) 2017-10-24 17:33:27 -04:00
Prasad Katti
8a9a9b84dd [ec2-ami] Use required_if with state parameter (#32009)
* [ec2-ami] Use required_if with state parameter

* Update failure msg on delete ami with no image_id task in integration test
2017-10-24 16:01:33 -04:00
Adrian Likins
6203e899f0 Fix service_mgr fact collection (#32086)
The platform/distro/etc facts were being passed in
correctly, but service_mgr.py was looking up the
wrong names ('system' vs 'ansible_system') resulting
in service_mgr falling back to default 'service' result.

Fixes #30753, #31095
2017-10-24 15:15:01 -04:00
akatch
ad3f4b953a Fun with callbacks (#32031)
* Functional-ish unix-ish callback plugin

* fix var

* Don't display include or include_vars

* Correctly display debug output and failed output in loops

* Linter fixes, documentation, and GPL oneliner
2017-10-24 12:38:49 -04:00
Brian Coca
506e6a0b2d removing deepcopy as it does not work
it cannot  handle deep crossreferenced objects
need to find alternative approach.
2017-10-24 11:12:18 -04:00
Toshio Kuratomi
725ae96e1b Prefer the stdlib SSLContext over urllib3 context
We do not go through the effort of finding the right PROTOCOL setting if
we have SSLContext in the stdlib.  So we do not want to hit the code
that uses PROTOCOL to set the urllib3-provided ssl context when
SSLContext is available.  Also, the urllib3 implementation appears to
have a bug in some recent versions.  Preferring the stdlib version will
work around that for those with Python-2.7.9+ as well.

Fixes #26235
Fixes #25402
Fixes #31998
2017-10-24 07:22:53 -07:00
Martin Krizek
ee6ba5d590 yum: allow for downgrade using rpm file (#31647) 2017-10-24 14:33:38 +02:00
John R Barker
9d6fd4ebcc Network docs should link to network integration pages (#31795) 2017-10-24 08:17:03 +01:00
Patrick Ogenstad
69cf5f9486 Fix documentation bug for asa_config (#32007)
The documentation mentioned the "commit" and "update" parameters which
didn't exist.
2017-10-24 09:24:37 +05:30
Kedar K
e2bed36d12 - Adds iosxr_netconf module to configure netconf service on IOSXR (#31715)
* - Adds iosxr_netconf module to configure netcong service on Cisco
  IOS-XR devices

* - Adds Integration test for module
- Handles diff return from load_config

* - Adds unit test for iosxr_netconf module
2017-10-24 08:49:23 +05:30
Kevin Zhao
b3cf1e39bb add user-agent to Azure API calls (#31872)
* addi Ansible user-agent in Azure API calls

* fix import error
2017-10-23 16:53:35 -07:00
Peter Sprygada
905d71d46a fix eos terminal plugin to recognize ospf error message (#32039)
The eos terminal plugin did not correctly catch the error message
returned with trying to configure more than one ospf instance.  This
change updates the terminal plugin to catch that scenario
2017-10-23 17:27:58 -04:00
Jordan Borean
b004a6373a windows: add #AnsibleRequires for Windows modules (#31683)
* windows: add #AnsibleRequires to set whether a module requires module or a specific version

* fix up pep8 issues

* changed psversion to use the actual ps Requires -Version syntax

* missed the check on #Requires -Version

* fix #Requires module extensions
2017-10-23 14:21:30 -07:00
Matt Davis
0c34cdd0f7 fix #Requires to be valid in real Powershell (#31858)
* module_utils #Requires should not have .psm1 extension if "real" Powershell will ever execute them
* updated validate-modules to enforce this
* added check to disallow multi-module syntax on Ansible.ModuleUtils #Requires
2017-10-23 11:40:54 -07:00
Ryan Brown
11c225e039 Start using ClientRequestTokens in event lists (#31997)
* Start using ClientRequestTokens in event lists

* Include request token in all reqs that support it (basically all but check mode/changeset)

* Update placebo recordings

* Add comments for CRQ popping
2017-10-23 14:39:13 -04:00
Martin Krizek
4bd16216fe ini inventory: document value parsing workaround
Fixes #31656
2017-10-23 09:56:49 -07:00
Charles Tolley
531d6c50bf Added regex to recognize prompt (#31947) 2017-10-23 19:34:10 +05:30
tacatac
4ffd60a406 nosh system module: fixes and improvements (#32014)
* nosh system module: fixes and improvements

documentation:
* fleshed out and fixed to better follow the official guidelines

consistency:
* the following facts will now always be returned on success: name,
service_path, enabled, preset, user, status
* state is only returned when the state option is used
* state and status will be null if the service is not loaded by the end
of the task

* [nosh]: PEP8 fix
2017-10-23 09:19:22 -04:00
Kedar K
465fe5802b -Fixes JSON parsing(use JSON object instead of string) for facts modules. (#31818) 2017-10-23 17:48:52 +05:30
Yaacov Zamir
2765ee4b9a Enable use of empty manageiq arguments (#31774)
* anable use of empty manageiq arguments

* make default verify_ssl true
2017-10-23 13:33:57 +02:00
James Mighion
6693cc3f5a Using shorthand for disabling paging to avoid the syntax difference between versions. (#31942)
Fixes #31855
2017-10-23 10:15:30 +02:00
Trishna Guha
529b7a7b78 fix nxos_igmp_snooping (#31688)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-23 09:40:07 +05:30
Jordan Borean
8e44cd5d10 win_command win_shell: add stdin option (#31619) 2017-10-23 09:50:19 +10:00
Jordan Borean
b663f602bc windows argv to string module utility (#28970)
* windows argv to string module utility

* rebased PR with latest devel branch
2017-10-23 09:49:40 +10:00
Morgan Kesler
ed342e8ce3 Remove toLower on source (#31983)
Having this here breaks any source URLs that require case sensitivity.
2017-10-23 07:18:00 +10:00
René Moser
e7d7a29a46 composer: return skipped if command has no --dry-run (#32010) 2017-10-22 10:04:46 +02:00
Eike Frost
74bd13727a move zabbix modules into their own namespace below monitoring/ (#31992) 2017-10-21 10:07:51 +02:00
Tim Rupp
965e4151df Adds the bigip_policy module (#31915)
this module allows one to manage policies and re-order their
corresponding rules
2017-10-20 18:05:55 -07:00
Tim Rupp
8085c38e05 Refactors the bigip_gtm_facts module (#31917)
Includes pep fixes and inlining code with current conventions
2017-10-20 18:05:45 -07:00
Brian Coca
ab8bacdf5e make sure patterns are strings
fixes #31978
2017-10-20 18:18:41 -04:00
Brian Coca
383170e9e1 dont add all group vars to implicit on create
they already get added in vars manager on use.
fixes #31420
2017-10-20 16:53:35 -04:00
Brian Coca
90e8071d48 fix inventory loading for ansible-doc
fixes #31995
2017-10-20 16:46:56 -04:00
Eike Frost
93288ba9b6 zabbix_proxy: implement validate_certs and use mod_doc_fragment (#31990)
* use zabbix mod_doc_fragment and implement validate_certs

* Fixes example to match documentation and provided choices
2017-10-20 10:29:19 -04:00
Brian Coca
fd574c069e remove fixme from docs 2017-10-20 09:59:23 -04:00
Eike Frost
8f8d5b41d7 Fix description parameter to check_all_properties (which was mangled in an earlier update) (#31987) 2017-10-20 09:53:58 -04:00
George Davis
8f4aab6d28 Updated win_owner.py documentation to reflect recurse options (#31974)
Updated win_owner.py documentation to reflect recurse options 'yes' and 'no' instead of 'True' and 'False'
2017-10-20 12:45:31 +02:00
Ondra Machacek
aca8a3b4d7 ovirt_vms: Don't start VM if state is present (#31698) 2017-10-20 05:59:45 -04:00
Ondra Machacek
d6b564966f ovirt_host_networks: Fix label assignment (#31969) 2017-10-20 05:42:26 -04:00
argo1984
98eac19e81 Added Support for creating a Zabbix Inventory. It is possible to tag the (#23792)
* Rebase with update of remote repository

* Add Example

* Reference to example

* Fix error with collon (ansibot saw a yaml not a string)

* Change inventory mode to manual
add link to inventory documentation of zabbix

* Fix:
The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/monitoring/zabbix_host.py:532:1: E302 expected 2 blank lines, found 1
The test ansible-test sanity --test validate-modules [?] failed with the following error:

lib/ansible/modules/monitoring/zabbix_host.py:0:0: E309 version_added for new option (inventory_zabbix) should be 2.5. Currently 2.4
2017-10-20 04:45:29 -04:00
Victor Mireyev
2fb8df503e Fix typo in ipa_user module documentation example. (#31928) 2017-10-20 09:07:45 +02:00
Will Thames
0c10e1ebe4 Handle timezone updates on Ubuntu 16.04+ on containers (#27546)
* Handle timezone updates on Ubuntu 16.04+ on containers

Although Ubuntu 16.04 will use timedatectl by default,
containers without a working timedatectl need to use the
old method.

A bug in Ubuntu for the old method means having to write
a nasty hack

https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806

* Add tests for timezones

Ensure timezone changes work across various OSs
2017-10-20 16:02:38 +10:00
Alen Komic
9007b51f93 New module: Add monitoring/zabbix_proxy module. (#24657)
* Implements zabbix_proxy module.

* Fixes formatting

* Bugfix

* Bugfix and various module documentation fixes.

* Iteritems python3 compatibility fix.

* PEP8 cleanup
2017-10-20 05:36:51 +02:00
nwsparks
5cccad8ed4 new windows module, win_audit_rule (#30473)
* added win_audit_rule with integration test

* Updated integration testing to target files as well as directories
and registry keys. Split testing files apart to be more organized.

Updated powershell for better handling when targetting file objects
and optimized a bit. Removed duplicated sections that got there from a
previous merge I think.

* Decided to make all the fact names the same in integration testing.
Seemed like there would be less change of accidentally using the wrong
variable when copy/pasting that way, and not much upside to having
unique names.

Did final cleanup and fixed a few errors in the integration testing.

* Fixed a bug where results was displaying a wrong value

Fixed a bug where removal was failing if multiple rules existed due to
inheritance from higher level objects.

* Resolved issue with unhandled error when used didn't have permissions
for get-acl.

Changed from setauditrule to addauditrule, see comment in script for reasoning.

Fixed state absent to be able to remove multiple entries if they exist.

* fixed docs issue

* updated to fail if invalid inheritance_rule when defining a file rather than warn
2017-10-20 11:20:33 +10:00
James Mighion
bb4b98a82e Adds regex for stdout needed for changing root password and regex for stderr catching problems with the password. (#31955) 2017-10-19 16:52:14 -07:00
Adam Miller
5b7d161b10 firewalld: don't reference undefined variable in error case (#31949)
* firewalld: don't reference undefined variable in error case

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* firewalld: don't set exception as var and not use it

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2017-10-19 17:09:06 -04:00
Martin Krizek
c02173880a git: remove duplicate ssh_wrapper cleanup (#31827) 2017-10-19 21:03:27 +02:00