Commit graph

18175 commits

Author SHA1 Message Date
maorlipchuk
81caa837a4 Use data center UUID/name in storage domains module (#28659)
The ansible action ovirt_storage_domains obligates a data center
name of the attached storage domain as part of its action's arguments,
so it will get the attached_sd_service as part of the functionality
of changing the storage domain status (to maintenance for example).

On the other hand, ovirt_storage_domains_facts retrieves a storage
domain entity with information about the data center which the storage
domain is attached to as a UUID identifier (without name).
So for the user to use that storage domain, fetched from the facts
module, one will have to fetch the DC entity to get the name.

We could use the search which is used today using:
   service.list(search=...)
but that type of search does not support search by Guid.
Therefor this patch provides the ability to use ovirt_storage_domains
action with state change using also a DC UUID instead of a DC name.
2017-08-29 09:50:38 -04:00
Brian Coca
c06f8a3f9b allow pesky 'bridge' facts to bypass facts filter (#28401)
* allow pesky 'bridge' facts to bypass facts filter

fixes #27729, #23577

* I ate pepe
2017-08-29 09:47:40 -04:00
Nathaniel Case
40907d7db2 Fix detection of associate-vrf parameter (#28725) 2017-08-29 09:47:27 -04:00
Brian Coca
4f6b270620 minor fixes to playbook imports (#28422)
* minor fixes to playbook imports

* updated per feedback
2017-08-29 09:46:48 -04:00
Giovanni Sciortino
94707d03e8 pam_limits creates custom file if not exist (#26989) (#28616) 2017-08-29 09:43:34 -04:00
David Peterson
ef58d34e96 Update azure_rm_storageaccount.py (#28605)
Edited kind choice. Fixes #25932
2017-08-29 09:37:38 -04:00
Kai
3251aecd95 Fix leading slashes being stripped from mount src (#24013)
* Tidy mount module for testing

Fix spelling mistakes in comments. I *think* the example for omitting parents
root has the wrong parent ID.

Make mountinfo file a parameter for testing.

* Don't strip leading slash from mounts

The current code does not follow the example, it produces src=tmp/aaa instead
of src=/tmp/aaa. This causes problems with bind mounts under /rootfs.

* Use dictionary to store mounts by ID

Instead of looping over each one to check if the ID matches. This does not
preserve the order of the output on < Python3.6, but that is not necessary.

* Make linux_mounts a dict

Always accessed by 'dst', so avoid looping by just making it a key.

* Add test case for get_linux_mounts
2017-08-29 15:16:53 +02:00
Ganesh Nalawade
a914a39975 Convert value of port and timeout in provider to integer (#28732)
Fixes #28361
2017-08-29 18:40:10 +05:30
Daniel Moore
c342866016 HAProxy: add support for draining connections in maintenace mode (#25887)
* HAProxy: Support waiting for nodes to drain before maint mode

A common task when working with a HAProxy-managed node is to first "drain" it
and then place it into maintenance mode (to be repaired or redeployed).
(Draining such a node consists of preventing new connections from being
established while waiting for active sessions to expire/close.)  This commit
creates a new `drain' parameter for Ansible's HAProxy module, which, when set to
`yes` in conjunction with `state: disabled` and `wait: yes`, causes the module
to attempt to set a node to drain, wait for it to finish draining, and put the
node into maintenance mode.  The action is recorded as a success if these steps
are completed before a maximum wait timeout is reached.

Implements: https://github.com/ansible/ansible-modules-extras/issues/521

Acknowledgments: This is based on user krislindgren's pull request #21420

* Correct how drain option is handled

Previously the `drain` parameter would have no effect, since the `disabled`
state would still immediately place backend servers into maintenance mode.
2017-08-29 07:01:52 -04:00
Thomas Krahn
8e6c0ca599 ipa_group: Fix issue 25660 (#26282) 2017-08-29 08:37:16 +02:00
Ondra Machacek
d0bb2a41d4 cloud: ovirt: add developer README.rst (#22685)
* cloud: ovirt: add developer README.rst

* Copy edits
2017-08-28 20:58:30 -04:00
Dag Wieers
61d2201a2d win_get_url: Add use_proxy, headers and timeout (#26612)
* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation

* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation
2017-08-28 20:11:10 -04:00
Jordan Borean
b84a48caef win_msi: deprecated in favour of win_package (#28741) 2017-08-28 19:53:28 -04:00
Jordan Borean
a695f30411 Added powershell SID utils for shared common code (#27091)
* Added powershell SID utils for shared common code

* rebased from upstream and fixed up module util after change
2017-08-28 19:15:58 -04:00
Jordan Borean
adabefd016 win_package: rewrite, check mode, tests, more check options (#27470)
* rewrite of win_package to enable win_msi deprecation

* fix some minor doc issues

* Removed exe tests

* dag's changes seem to be missing, re-add them

* fixed yaml for return values
2017-08-28 19:03:10 -04:00
Dag Wieers
91e2319806 win_shortcut: Support environment variables/UNC paths (#27089)
This was a regression.
Integration tests needs to be adapted too.
2017-08-28 18:58:14 -04:00
Artem Zinenko
1c958af88b [28017] Integration tests for win_rabbitmq_plugin (#28118)
* Check registry to find RabbitMQ installation path

* Integration tests for win_rabbitmq_plugin

* Added himself to BOTMETA.yml

* Skipped running tests on Windows 2008 SP2
2017-08-28 18:48:10 -04:00
pari-
468e71bf71 npm: fix idempotence (#22238)
* npm: fix idempotence

* Better idempotency fix

More intelligently add --production rather than depending on hard coded order in args list
Cleanup boilderplate imports and license
PEP8 fixes
2017-08-28 17:26:01 -04:00
Brian Coca
f9b3f4f934 make groups magic var dependant on inventory (#28677)
* make groups magic var dependant on inventory

it was overtly restricted by 'host'
minor fixes to test_var_manager.py, need to test other values also

* pepe hates extra blank line
2017-08-28 17:21:11 -04:00
Brian Coca
de6ba4daff add toggle to controle inventory parse as error (#28729)
* add toggle to controle inventory parse as error

also rearranged new inventory options into it's own ini section

* updated with inventory features

also minor fixes/consolidation on deprecated/removed modules

* tweaked settings
2017-08-28 17:17:19 -04:00
Nathaniel Case
862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
2017-08-28 17:09:54 -04:00
Trishna Guha
0a8ec4ddef fix nxos_igmp_interface output (#28735)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-28 17:06:30 -04:00
Michael De La Rue
fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
2017-08-28 16:45:53 -04:00
Trishna Guha
c36c34ef7e fix nxos parse response KeyError (#28602)
* fix nxos parse response

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

* use get() method instead
2017-08-28 16:15:20 -04:00
Brayneded
335e804c0c Add junos_vrf vrf-table-label support (#28727)
* Added VRF Table Label Support

* Added table_label docs and set as default=true
2017-08-29 00:44:51 +05:30
Mike Wiebe
3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
2017-08-28 15:00:56 -04:00
Brian Coca
f5743396dc skip all hidden keys, allow exclude list 2017-08-28 12:56:14 -04:00
Will Thames
63df0adc17 [cloud] Update RDS parameter group for boto3 (#25345)
* Update RDS parameter group for boto3

* Update to boto3
* Update to latest ansible standards
* Remove choices list for valid engines (See #19221 for context)
* Allow tagging
* Return some useful information, and document that information

* Add tests for rds_param_group

* Improve testing of rds_param_group

* Add purge_tags option for rds_param_group

* Fix remaining broken rds_param_group tests

* Ensure the group name is lowercased. Fixes integration tests when run on OSX
2017-08-28 12:52:22 -04:00
Joerg Kastning
f08c29924e Added folder and datacenter to the examples (#25221)
* Added folder and datacenter to the examples

From #22644 it seems that the parameter 'folder' is mandatory. While both are required parameters they should be used in the examples.

* Removed 'required: True' from folder documentation

I reverted the documentation of the folder option to be a not required one. This way it stays consistent with the definition of the function.
2017-08-28 18:42:27 +02:00
Reid Wahl
3c65c2bfaf Fixes #20752: Prevent AIX get_vgs_facts from failing on offline lvols (#28701) 2017-08-28 12:38:32 -04:00
Abhijeet Kasurde
3e20acbd79 Refactor code for find_host_by_cluster_datacenter (#26859)
Fix adds refactor of code for find_host_by_cluster_datacenter
API in vmware_host and vmware_resource_pool.
Also, adds strict check for cluster and datacenter object find.
Testcase for vmware_resource_pool.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-28 18:36:46 +02:00
Pat McClory
5065bf169d Fix bug where ansible_lvm facts silently fails if a PV isn't in an VG (#28684)
If a PV hasn't been added to a VG i.e.:

[pmcclory@box ~]$ sudo pvs --noheadings --nosuffix --units g
  /dev/xvdb       lvm2 ---- 10.00 10.00
  /dev/xvdv1 vg0  lvm2 a--u 24.99     0

Than ansible_facts.ansible_lvm will be unset after running setup module.

The issue is that the module splits on whitespace, which causes an
indexing error when the VG column is empty.

Fix is to add the separator field and safely split on that.
2017-08-28 12:25:53 -04:00
René Moser
c1be5b2389 openssl_certificate: consistent param namings (#28521) 2017-08-28 17:29:16 +02:00
Katerina Koukiou
1c9c16a101 cloud: ovirt: Add option to import SD with sd_type != block storage type (#28593) 2017-08-28 11:15:41 -04:00
Ondra Machacek
b9600281d6 ovirt_hosts: Add upgrade_check action (#28437)
* ovirt_hosts: Add upgrade_check action

* Fix pep8 issue
2017-08-28 11:15:05 -04:00
Reid Wahl
f787be3597 Fixes #22335: Adds filename extension to tempfile for Vault 2017-08-28 11:01:04 -04:00
Adrian Likins
1f962bd937 Fix config value type for VAULT_IDENTITY_LIST (#28678)
Was using the 'value_type' key, but didn't get updated
to the new 'type' key in merge.

Fix playbooks cli so it uses VAULT_IDENTITY_LIST as well.
2017-08-28 10:13:14 -04:00
Radu Epure
54c295699e [cloud] Add DBName to RDS Facts if it exists (#27121)
* + Add DBName in RDS Facts if it's not null

* - remove 2 offending lines for automatic tests

* Syntax change for shorter code and improved readability
2017-08-28 08:33:34 -04:00
Ondra Machacek
5be37018a2 cloud: ovirt: present state shouldn't change state if not needed (#28214)
This PR fixes: https://github.com/ansible/ansible/issues/27382
2017-08-28 08:20:55 -04:00
Felipe Garcia Bulsoni
791a029203 Added support to HPE Network Set resources (#28614)
- Added unit tests
2017-08-27 00:49:12 +02:00
Felipe Garcia Bulsoni
978c64afc5 Support retrieving Facts about Fibre Channel resource of HPE OneView (#28608)
* Added FcNetworkFactsModule to query FC Network Resources in HPE OneView

- Added unit tests

* Removing unnecessary quotes from example and documentation
2017-08-27 00:46:35 +02:00
Dag Wieers
a1876bac9c pkg5_publisher: Fix on failed, PEP8 compliancy (#26019) 2017-08-27 00:30:05 +02:00
Dag Wieers
9b31ca8d16 Small cleanup in return values (#28693) 2017-08-27 00:25:20 +02:00
Anil Kumar Muraleedharan
eee6da857f Update CNOS.py to fix error in image download on devices (#28589)
* Update CNOS.py to fix error in image download on devices

* Fixing Bug on Swaping of character indexes of error strings
2017-08-26 13:38:00 -04:00
Mike Rostermund
550c00a745 snmp_facts: Fix typo in example docs (#28689) 2017-08-26 11:09:02 +02:00
Brian Coca
95eaa246aa added keyed_group construction (#28578)
* added keyed_group construction

also added strict config to allow skipping bad templating
more precise error msgs
to_native better than to_text
fixed truthyness
added safe names

* allow keyed expressions to return lists

* PEPE should eat less, he is getting fat
2017-08-25 22:00:07 -04:00
Dag Wieers
1afbe29642 Remove transport_test for some connection types (#28450)
So we are removing the transport_test for the listed connection types,
because they fail to take into account bastion or proxy servers for
testing the transport.

The result of removing this, is that modules using this facility will do
a complete round-trip attempt, running a module, which is a bit heavier but correct.

This fixes #23774
2017-08-26 01:16:40 +02:00
Dag Wieers
357119f3b7 xml module: Improve documentation (#28667)
Missing bits and pieces, clarifications and examples.

This fixes #27951
This fixes #28119
This fixes cmprescott/ansible-xml#59
2017-08-25 23:53:38 +02:00
Peter Sprygada
ebf529f8b8 correctly map to connection_user from remote_user in play_context (#28676)
This change will map the remote_user prop to connection_user if it is
not aleady set.  It also adds a var mapping to ansible_connection_user
in the inventory to override the local user if needed.  This is
primarily used by the network_cli connection plugin today.

fixes #26120
2017-08-25 15:53:25 -04:00
George Nikolopoulos
869eee0762 Deprecate citrix/netscaler module (#28280)
* Deprecate citrix/netscaler module

* 	renamed:    netscaler.py -> _netscaler.py

* Fix legacy files list
2017-08-25 13:51:15 -04:00
George Nikolopoulos
8d14f9d578 Lowercase enabled, disabled option values (#27764) 2017-08-25 13:11:48 -04:00
George Nikolopoulos
c01dd6470c Add disable operation for netscaler_servicegroup (#28327) 2017-08-25 17:03:21 +01:00
George Nikolopoulos
2281a6676b Add enable, disable operation in netscaler_service (#28321) 2017-08-25 16:58:51 +01:00
Nathaniel Case
fbeb3b9ac5 Nxos ping (#28665)
* Update documentation & results, clean up code

* Change numeric results to int/float
2017-08-25 11:45:46 -04:00
Ivan Bojer
9b8abc8a7f panos_sag: static address group (#28041)
* - Create a static address group object in the firewall used for policy rules.

* PEP8 changes

* add function to check for devicegrp name

* fix exception handling

* PEP8 fixes

* update metadata_version
2017-08-25 16:35:35 +01:00
Evgeny Fedoruk
71313ce04d Module for uploading templates into vDirect server (#27570)
* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server

* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server
2017-08-25 16:23:36 +01:00
Peter Sprygada
ed23424b32 reverts 28599 2017-08-25 10:59:01 -04:00
René Moser
cc3bb0a043 cloudstack: cs_instance: warn for changes not applicable to running VMs. (#28664) 2017-08-25 16:47:14 +02:00
Andrew Makousky
9190598096 Set task status correctly for vmware_guest shutdown and reboot. (#26515) 2017-08-25 10:21:02 -04:00
Dag Wieers
11c9756d9c xml module: Make user interface much more restricted (#28657)
So the xml module has a lot of parameters that combined together do
specific things. however it does not really describe which parameters
are required together, or which ones are required.

This PR fixes that situation and makes it impossible to provide
confussing parameters combinations.

Also, `pretty_print` was used as a flag to modify the output, but also
as an action to reformat the file (without other change). This is
problematic the way it was designed. This fixes that too.

This fixes #28194
2017-08-25 15:01:24 +02:00
Peter Sprygada
75293d83ca configures address-families when vrf is created (#28615)
* configures address-families when vrf is created

fixes #26725

* fix up unit test cases
2017-08-25 07:51:20 -04:00
Jacob McGill
a03a1cde88 ACI Tenant SPAN Src Grp to Dst Grp: Add new module to support managin… (#28645)
* ACI Tenant SPAN Src Grp to Dst Grp: Add new module to support managing Tenant SPAN Source Group and Dest Group Bindings

* Fix docstring errors

* Fix Metadata version

* Fix Shippable issues
2017-08-25 11:33:41 +02:00
Jacob McGill
6401478883 ACI Tenant SPAN Src Grp: Add new module to support managing Tenant SP… (#28644)
* ACI Tenant SPAN Src Grp: Add new module to support managing Tenant SPAN Source Groups

* Fix docstring errors

* Fix Metadata version

* Fix Shippable issue
2017-08-25 11:32:41 +02:00
Jacob McGill
05a17164e3 ACI EPG: Update module to use new URL Method (#28647) 2017-08-25 08:37:56 +02:00
Jacob McGill
eaea574e3b ACI Tenant EP Retention Policy: Add new module to support managing En… (#28642)
* ACI Tenant EP Retention Policy: Add new module to support managing End Point Retention Policies

* Fix docstring errors

* Fix Metadata version
2017-08-25 08:37:28 +02:00
Jacob McGill
bac617acef ACI Taboo Contract: Update module to use new URL Method (#28639) 2017-08-25 08:37:12 +02:00
Jacob McGill
8b641688e9 ACI Tenant Action Rule Profile: Update module to use new URL Method (#28641) 2017-08-25 08:36:51 +02:00
Jacob McGill
a12ff4468d ACI SPAN Dest Group: Update module to use new URL Method (#28643) 2017-08-25 08:36:34 +02:00
Jacob McGill
8a966a48c8 ACI VRF: Update module to use new URL Method (#28646) 2017-08-25 08:35:45 +02:00
Jacob McGill
f7a466cbb4 ACI Intf Policy Port Security: Update module to use new URL Method (#28638) 2017-08-25 08:35:26 +02:00
Jacob McGill
f9036133bb ACI Tenant: Update module to use new URL Method (#28640) 2017-08-25 08:35:00 +02:00
Jacob McGill
9c564de765 ACI L3Out Route Tag: Update module to use new URL Method (#28637) 2017-08-25 08:34:35 +02:00
Jacob McGill
a6614a132d ACI Intf Policy Port Channel: Update module to use new URL Method; add support for ctrl (#28636) 2017-08-25 08:33:57 +02:00
Jacob McGill
1bec0e5753 ACI BD: Update module to use new URL Method (#28625)
* ACI BD: Update module to use new URL Method

* fix docstring errors
2017-08-25 08:33:27 +02:00
Jacob McGill
2e61760659 ACI Contract Subject: Add new module to support managing Contract Sub… (#28620)
* ACI Contract Subject: Add new module to support managing Contract Subjects in ACI

* Fix Metadata

* Fix Metadata version
2017-08-25 08:33:00 +02:00
Jacob McGill
e434c291ca ACI Intf Policy MCP: Update module to use new URL Method (#28635) 2017-08-25 04:21:08 +02:00
Jacob McGill
fa6da960db ACI Intf Policy LLDP: Update module to use new URL Method (#28634) 2017-08-25 03:57:03 +02:00
Jacob McGill
6109a6c093 ACI Filter: Update module to use new URL Method (#28630) 2017-08-25 03:56:18 +02:00
Jacob McGill
f5f2a2fac2 ACI Intf Policy L2: Update module to use new URL Method (#28633) 2017-08-25 03:55:45 +02:00
Jacob McGill
25d1ef3493 ACI Intf Policy FC: Update module to use new URL Method (#28632) 2017-08-25 03:55:27 +02:00
Jacob McGill
85ca2234fd ACI Filter Entry: Update module to use new URL Method (#28631) 2017-08-25 03:51:21 +02:00
Jacob McGill
0577bf688c ACI EPG to Contract: Update module to use new URL Method (#28628) 2017-08-25 03:45:32 +02:00
Jacob McGill
a4087841a8 ACI EPG to Domain: Update module to use new URL Method (#28629) 2017-08-25 03:45:12 +02:00
Jacob McGill
d186c9eda2 ACI EPG Mon Policy: Update module to use new URL Method (#28627) 2017-08-25 03:43:10 +02:00
Jacob McGill
9582e7e549 Ap (#28626)
* ACI Ap: Update module to use new URL Method

* ACI Ap: Update module to use new URL Method
2017-08-25 03:21:10 +02:00
Jacob McGill
0b1ea2be9b ACI BD Subnet: Update module to use new URL Method (#28624) 2017-08-25 03:17:01 +02:00
Jacob McGill
dc232737ba ACI BD to L3Out: Update module to use new URL Method (#28623) 2017-08-25 03:16:17 +02:00
Jacob McGill
28f76166d0 ACI Contract: Update module to use new URL Method (#28622) 2017-08-25 03:15:23 +02:00
Jacob McGill
037ef743c3 ACI Contract Subject to Filter: Update module to use new URL Method (#28621) 2017-08-25 03:14:36 +02:00
Nicolas Porcel
ba420c47cd synchronize: Use private_key and ssh_user with delegate_to (Fixes #16215) (#21686) 2017-08-24 21:09:15 -04:00
Jacob McGill
061fe51e9a ACI AEP: Update module to use new URL Method (#28619)
* ACI AEP: Update module to use new URL Method

* ACI AEP: Update module to use new URL Method

* ACI AEP: Update module to use new URL Method
2017-08-25 02:46:09 +02:00
Jacob McGill
ddd3e6fb91 ACI: Update ACIModule to dynamically build URLs (#28618) 2017-08-25 02:37:34 +02:00
Dag Wieers
2634ef955a xml module: Better change detection, improved tests (#28460)
This PR includes:

- Improvements to change-detection by comparing 2 objectified XML trees
- Implement better integration tests by comparing 2 files using copy
2017-08-25 02:07:58 +02:00
banzo
3302248616 [cloud] Amazon Redshift module cluster deletion fix (#25164)
* Fix typo (#25161)

* Fixed cluster deletion: added final snapshot management

This adds 2 new options to the module API (only for the "delete" command):

* skip_final_cluster_snapshot: skip a final snapshot before deleting the cluster
* final_cluster_snapshot_identifier: identifier of the final snapshot to be created before deleting the cluster

Ref: http://boto.cloudhackers.com/en/latest/ref/redshift.html

* Fixed cluster deletion: added final snapshot management

This adds 2 new options to the module API (only for the "delete" command):

* skip_final_cluster_snapshot: skip a final snapshot before deleting the cluster
* final_cluster_snapshot_identifier: identifier of the final snapshot to be created before deleting the cluster

Ref: http://boto.cloudhackers.com/en/latest/ref/redshift.html

* add version_added information

* Review corrections:

* used required_if instead of checking parameters compatibility inside the code
* renamed aliases to be more explicit

Also added an example for the "delete" command

* Review corrections correction - make "delete" command specific parameters mandatory only when the command is "delete"

* updated doc with aliases

* Fix YAML docs syntax

* Set default to match API for skip_final_cluster_snapshot.
2017-08-24 16:41:32 -04:00
Dag Wieers
7a182fc43e xml module: Add backup to pretty_print too (#28604) 2017-08-24 22:14:17 +02:00
Peter Sprygada
b34cfd03b3 implements missing code to handle before and after arguments (#28612)
fixes #21683
2017-08-24 16:00:54 -04:00
Nathaniel Case
07cd4fda0e Remove module_utils.shell (#28560)
* Get rid of module_utils.shell

* There is no way this actually raises ShellError
2017-08-24 14:55:03 -04:00
Peter Sprygada
ac6892efe4 set the play_context connection_user before mapping magic variables (#28599)
This change moves when the connection_user is set in the play_context to
set it before the magic variables are mapped.  If the connection_user
is not set before the mapping, the connection_user will be incorrectly set
for local connections

fixes #26120
2017-08-24 14:49:42 -04:00
Joel Kaasinen
fc7301671e [cloud] Add check mode for cloudformation module (#23483)
* cloudformation: dummy check mode

* cloudformation: use changesets to implement check mode

* cloudformation: wait at most 5min for change set

* cloudformation: handle stack creation and deletion in check mode

* cloudformation: standardize output format in check mode

msg is a string, meta is a list

* cloudformation: use same naming convention in get_changeset as create_changeset

also add comment about code duplication between said functions

* Remove unused imports

* PEP8 whitespace fix

* Fix CI, convert success=True check to for/else
2017-08-24 14:07:48 -04:00
Sloane Hertel
cf1a9d4d22 New module: Add ec2 Vpn Connection module and tests (cloud/amazon/ec2_vpc_vpn) (#24385)
* Add VPN module and unittests

* remove unnecessary imports

* fix documentation

* raise custom exception rather than passing module everywhere

* remove recordings

Rerecord tests

Fix docs

Ensure vpn_connection_id is a list of strings when checking if it exists

* fix check mode

* Rerecord tests

* remove superfluous code and comments and make exception handling uniform

fix docs

* Fix ec2_vpc_vpn documentation

* make ec2_vpc_vpn compatible with python 2.6 and make check mode logic more succinct

* fix comparison of list of dicts

* Fix typos and docstrings

make requested changes for imports

make code clearer

* Fix copyright and metadata version.
2017-08-24 12:18:40 -04:00
CsilLAB
8d3546af60 Update eos_config documentation. (#28512)
Added note to documentation about Jinja2 file used as src.
2017-08-24 21:40:36 +05:30
Felipe Garcia Bulsoni
fb6ed8d76c EthernetNetworkModule for HPE OneView (#28336)
* Adding module to manage ethernet network on HPE OneView

* Adding unit tests to EthernetNetwork module

* Added OneViewModuleException custom exceptions to module

- Removed exception imports from hpOneView
- Updated unit tests

* Fixing mock import inside ethernet network module unit test

* Fixing issues found in METADATA by CI

* Updated paths to use solution name instead of vendor name

* Fixed documentation, removed redundant if and improved readability

* Updated _bulk_present to use and return `result`, same way as _present

* Changed __ to _ in private methods following ansible style

* Fixed some example inconsistencies and turned states doc into a list

* Added adriane-cardozo to list of maintainers
2017-08-24 17:57:13 +02:00
Simon Dodsley
000ccc838a Set protection group enabled by default with option to disable (#28582) 2017-08-24 17:48:01 +02:00
Fabio Alessandro Locati
c850bf15d0 windows/win_command: improve examples (#20465)
* windows/win_command: improve examples

* Improve description

* Improvements

* minor updates based on PR feedback
2017-08-24 11:14:05 -04:00
Ganesh Nalawade
55fa4d54aa Add tested against junos version for junos modules (#28598)
* Add tested against junos version for junos modules
2017-08-24 10:31:47 -04:00
AlexZolotarenko
69bf5331b4 Fix incorrect command-line parameters for Solaris (#22865)
* Fix incorrect command-line parameters for Solaris

* Update mount.py
2017-08-24 10:22:48 -04:00
Trishna Guha
10467efaba Tested against VYOS version (#28562)
* Tested againset VYOS version

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

* fix duplicate dict key error vyos_command

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-24 19:08:05 +05:30
Dag Wieers
11b50671ba win_robocopy: Check-mode support, improved return code and docs (#25410)
* win_robocopy: Cleanup logic, check-mode support

* win_robocopy: Cleanup logic, check-mode support

This PR includes:

- Improved check-mode support
- Clean up documentation
- Clean up code structure
- Add warnings in special cases

* minor fix for typo
2017-08-24 09:35:53 -04:00
Dag Wieers
967fbcb662 xml module: Add backup support (#28595)
This fixes #27949
2017-08-24 15:20:59 +02:00
Brian Coca
725d4d4bc8 added diff as new keyword (#28581)
added diff to fake options in ec2_vpc_nat_gateway test
2017-08-24 14:43:19 +02:00
Kira Rose
46cd8ba7cd Check Windows service status before nssm STOP (#28379)
* Check Windows service status before nssm STOP

Add a condition on calling nssm STOP inside Nssm-Remove, to check whether or not a service has already been stopped. Currently nssm throws an exception:

```
failed: [...] (item=...) => {"changed": false, "failed": true, "item": "...", "msg": "an exception occurred when invoking NSSM: serviceName: STOP: The service has not been started."}
failed: [...] (item=...) => {"changed": false, "failed": true, "item": "...", "msg": "an exception occurred when invoking NSSM: serviceName: The service has not been started."}
```

Behaviour after change:

```
ok: [...] => (item=...)
ok: [...] => (item=...)
```

* Added named parameter to new Get-Service cmdlet
2017-08-24 08:40:48 -04:00
Dag Wieers
e7a525bd4a vmware_vswitch; Improve integration tests (#28484)
So the module was now not doing anything except adding a nic to a
vswitch. This PR adds idempotency checks, and removal checks.

We should probably add modification chacks as well, but I don't know
what the limitations are for vcsim.
2017-08-24 14:31:13 +02:00
Nathaniel Case
ada7f248c0 Add 'Tested on' string to NX-OS modules (#28531) 2017-08-24 08:27:39 -04:00
Dag Wieers
d830186e27 Fix the reboot_required return value (#28579)
As reported in #28565
2017-08-24 08:14:14 -04:00
Dag Wieers
d8429a69c5 xml module: Parse and evaluate xpath on input (#28591)
* xml module: Parse and evaluate xpath on input

This fixes cmprescott/ansible-xml#68

* Update error string
2017-08-24 14:09:26 +02:00
Dag Wieers
26d75144b2 xml module: Implement diff mode (#28592)
This fixes #27952
2017-08-24 14:05:13 +02:00
Reid Wahl
3026e5eb15 Fixes #28584: modules/windows/win_get_url.ps1: Change -msg option to -message (#28585) 2017-08-24 10:48:37 +02:00
Ganesh Nalawade
cd8c1c1108 Create persistent socket path using port and connection type (#28492)
* Create persistent socket path using port and connection type

*  Use remote address, port, connection type and remote user
   to create a socket path.

* Fix review comment
2017-08-23 18:28:44 -04:00
Matt
9407a17c40 Fix example
change count_tags to count_tag
2017-08-23 17:56:38 -04:00
Brian Coca
7b73ee0818 also strip strings to avoid spaces breaking match 2017-08-23 16:01:02 -04:00
Will Thames
fbfa5624c3 [cloud] New module: aws_waf_facts module (#26671)
Initial implementation of waf_facts module

* Enhance waf_facts module to provide more info

Support check_mode trivially
Enhance rule and predicate information
Use AWSretry and wrap proper exception handling
Finish documentation
Remove arbitrary limits
Meet latest ansible standards.

* Rename module to use aws_ prefix.

Fix copyright.

Fix metadata version.
2017-08-23 15:09:27 -04:00
Patrick Murray
b828b5d33b Fixing Issue #27270 - EFS TypeError (#27318)
* Fixing Issue #27270 regarding a TypeError invoked by the addition of a Filter type and List type.

* Fix SecurityGroup from always being reported as changed on PY3

On Python3, filter returns a generator.  This causes us to report that
security groups are always defined on Python3 even when there are none.

Also change filter() calls into list comprehensions.
2017-08-23 11:43:09 -07:00
Michael Tinning
282e743eb0 elb_application_lb: fix issue with boto parameter validation on Rules (#27333) 2017-08-23 13:49:52 -04:00
Trishna Guha
cfc6d9f904 Tested against IOS XR version (#28563)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-23 22:55:21 +05:30
Stephen Jennings
be2d4cc1c9 Check for an existing docker_network before trying to modify it (#24048)
This eliminates a TypeError in check mode.
2017-08-23 12:10:53 -04:00
Will Thames
b1df75fc1c [cloud] Return AMI info on ec2_ami module when changed=false (#27867)
Fixes #27861
2017-08-23 12:01:49 -04:00
Sloane Hertel
24b49c2539 [cloud] New module: AWS Direct Connect connection (#26152)
* New module for AWS Direct Connect connections

Unittests for new module

Added utils that will be used by other Direct Connect modules

* pep8 fixes

* Correct aws_direct_connect_connection EXAMPLES to be valid yaml

* Make requested changes

* remove use of the variable changed

get rid of unnecessary parentheses

* Fix unit test

* Rename variable.

* Fix metadata version
2017-08-23 11:56:19 -04:00
David M. Lee
1d4ca0fd51 amazon: extract copies of boto_exception to module_utils.ec2 (#20403)
* amazon: extract boto_exception to ec2 module

This function was copy/pasted throughout several Amazon modules. This
causes a consistency problem, since some improvements to message
formatting were applied to some modules but not others. Now all modules
use the same, improved function.

* Rebase and make requested changes

* Rebase and make requested changes
2017-08-23 11:40:32 -04:00
mzizzi
587ab33415 [cloud] Add jittered backoff+retries to CloudFormation module (#27907) 2017-08-23 11:38:19 -04:00
Trishna Guha
4070a22c5b Tested against IOS version (#28559)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-23 21:03:09 +05:30
Trishna Guha
340f52ae96 tested against eos version (#28556)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-23 20:39:31 +05:30
Laurent Ribot
f92ae0831b Fix : get proper snapshotVersion when no classifier (#27102) (#27103) 2017-08-23 10:42:48 -04:00
mikedlr
f93515adb9 [MERGE] AWS module Guidelines - multiple changes to bring up to date and start on aws.core (#26871)
* aws module Guidelines - rewrite - add AWS WG - add fail_json_aws - more modern
practices and fix some spelling

* aws module Guidelines - minor further changes with agressive fill to 99 width

* aws module Guidelines - formatting fix as per gundalow request

* aws module Guidelines - mark more keywords and code with backquotes

* AWS module guidelines - fixes from ryansb review + minor other changes
2017-08-23 10:34:30 -04:00
Muhammad Panji
8ed0222eff fix sts_session_token parameter example (#28549) 2017-08-23 09:11:51 -04:00
Lukas Bednar
8c5b9d99ed ovirt_disks: added option to export disk to glance (#27959)
* ovirt_disks: added option to export disk to glance

* ovirt_disks: Moving exporting to separate branch

* ovirt_disks: removed redundant line obtaining disk obj
2017-08-23 08:46:51 -04:00
Yaniv Kaul
6b18a23385 [oVirt] Fix ovirt_disk.py example of adding a disk (#28496)
It was missing a required field - the storage_domain field.
2017-08-23 08:46:19 -04:00
Tareq Alayan
abc5910d86 cloud/ovirt: set mac pools via ovirt_clusters (#28120)
MAC pools are set per cluster since ovirt 4.1. Before that it was set
per data center.
2017-08-23 08:45:25 -04:00
Nijin Ashok
3c1ee57155 [cloud] ovirt: Add VM lease option to the ovirt_vms module (#27710)
Ovirt 4.1 is having new feature of VM lease for high availability.
The commit add support for configuring this in ovirt_vms module.
2017-08-23 08:44:51 -04:00
maorlipchuk
07feec30d3 [oVirt] Update/Add functionalities for import storage domain (#26568)
* ovirt_templates: Update the argument spec of templates.

Add id of template since it is needed for register.

* ovirt_vms: Register unregistered VM.

Use register of VM with id instead of name since an
unregitered entity can be registered also without name attribute.

* ovirt_hosts: Add iscsidiscover to ovirt_hosts

Adding functionality of iscsidiscover to be used to discover iscsi
targets.

* ovirt_storage_domains: Add support for import block storage domain.

* Add functionality of partial import to unregistered VMs.

* Add functionality of partial import to unregistered Templates.

* ovirt_hosts: Add iscsilogin to ovirt hosts.

Add functionality of iscsi login to ovirt hosts to be used to connect to
iscsi targets and to be able to import iSCSI storage domain eventually.

* Add ovirt_storage_templates_facts

Adding fact module for storage templates.
The module should help with registering unregistered templates.

* Add ovirt_storage_vms_facts

Adding fact module for storage VMs.
The module should help with registering unregistered VMs.
2017-08-23 08:44:02 -04:00
Ryan S. Brown
2f3d9566f9 Remove exec bit on elb_application_lb module 2017-08-23 08:32:20 -04:00
René Moser
fbcf6e23af yum: fix state=latest (#28547) 2017-08-23 10:22:16 +02:00
Jordan Borean
4382216e10 win_copy: changes that were missed (#28533) 2017-08-22 23:23:07 -04:00
Jordan Borean
e631676546 fixed up win_robocopy return values (#28538)
* fixed up win_robocopy return values

* reduced lin size for validator
2017-08-22 23:22:08 -04:00
Sloane Hertel
a48e0b5101 New Module to manage AWS direct connect link aggregation groups (#27250)
* Add module_utils/aws/direct_connect.py for frequently used functions

* new AWS Direct Connect link aggregation group module with tests and placebo recordings

* remove extra argument

* Remove use of undefined var

* Fix param name for extra exception codes for AWSRetry to use.

* Fix undefined var and line length and metadata version number

* Fix copyright headers
2017-08-22 18:24:54 -04:00
Eduard Iskandarov
fe21dd272d Kubernetes PATCH operation (#19428)
* add patch_operation parameter for kubernetes module

* Fix test errors
2017-08-22 18:11:10 -04:00
Trishna Guha
4271f6e5e6 fix aggregate doc example (#28528)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-23 02:16:45 +05:30
Trishna Guha
c2e41bf1ef remove net_command (#28525)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-23 02:07:39 +05:30
Martin Krizek
711ae03845 yum: fix reporting group changes in check_mode (#28331) 2017-08-22 16:35:23 -04:00
Felipe Garcia Bulsoni
84005498bc Support Fibre Channel over Ethernet resource of HPE OneView (#28359)
* Added new oneview_fcoe_network module and unit tests

* Fixing metadata issues and importing unittest from ansible.compat.tests

* Fixing shebang and adding correct copyright header

* Renamed remote_management/hpe to remote_management/oneview

* Updated documentation and default state according to review comments

- Added present as the default state
- Added delegate_to: localhost in all examples
- Changed config path from a variable to illustrate a location
- Other documentation fixes
2017-08-22 22:14:10 +02:00
Martin Krizek
c59f3f841e yum: remove duplicite code introduced in d1fa210be (#28511) 2017-08-22 22:03:50 +02:00
Sloane Hertel
cbb94a75fe Enable deleting IAM users with associated MFA devices. (#27288)
Refactore delete_user() since most of the heavy lifting was being done in the exception handling, which is not at all necessary and resulted in changed=False being shown after changes were successfully made.
2017-08-22 15:59:02 -04:00
Sloane Hertel
7551e8c921 AWSRetry: allow retrying on additional ClientError exceptions (#28483)
* Added the ability to extend the exception list in CloudRetry

* AWSRetry boto and boto compatible

* Updated tests to reflect boto/boto3

* Added boto to shippable requirements

* Have base_class and added_exceptions default to None in CloudRetry

AWSRetry - only retry on boto3 exceptions and remove boto requirement from tests

* Make requested changes.
2017-08-22 15:31:20 -04:00
Jordan Borean
9b7dbc78c3 win_wait_for: added module (#26556)
* win_wait_for: added module

* Increased timeout on async task

* added more debug messages for test debug

* revert to using win_shell instead of win_command

* rebased from master and updated copyright string

* Updated metadata version

* Capitalised start of short_description

* disabled win_wait_for tests until async issues are solved
2017-08-22 15:02:07 -04:00
Guido Günther
398f643c58 Check existence of SSL certs in Foreman callback (#25796)
* Fix typo

* foreman callback: check existence off SSL certs

This leads to confusing error messages later on otherwise.
2017-08-22 14:25:14 -04:00
Nathaniel Case
e1def05ba2 fix networking *_command check_mode (#28407)
* Fix check_mode in nxos_command

* Fix check_mode for ios_command

* fix check_mode for iosxr_command

* Fix check_mode in vyos_command

* Fix check_mode in eos_command

* Fix check_mode in junos_config
2017-08-22 14:02:55 -04:00
Nathaniel Case
96abfde189 Fix idempotence for nxos_vrf_af (#28419) 2017-08-22 14:02:01 -04:00
Yanis Guenane
f7f3f4b62c crypto: Add new module openssl_certificate (#28263)
This commit aims to add the openssl_certificate module.

This module allows a user to manage openssl certificates.
This module implement the notion of backend provider, making this module
extensible to anyone wish as long as a provider is coded for it.

The current three providers are the following:

  * selfsigned: Allows a user to self signed a certificate
  * acme: Allow a user to generate acme-based CA challenges certificate.
          (As of this writing this targets letsencrypt)
  * assertonly: Allow a user to assert the characteristic of her SSL
                certificate

Co-Authored-By: Markus Teufelberger <mteufelberger+ansible@mgit.at>
2017-08-22 19:40:24 +02:00
Rastislav Barlik
f0a6f1637b Update xattr.py (#28458)
Fix wrong default value in documentation
2017-08-22 11:45:41 -04:00
Simon Dodsley
1fe71eacab Fix typo created in PR28485 (#28509) 2017-08-22 17:43:14 +02:00
Sloane Hertel
f7e67dc3b1 Rename s3 module to aws_s3. Update CHANGELOG.md. (#28398)
Use aws_s3 in examples.
2017-08-22 11:17:20 -04:00
Brandon Davidson
2ceff476bf [cloud] support tags in ec2_group module (#22472)
* Add tags support to cloud/amazon/ec2_group

* Finish making ec2_group tag support boto3 compatible.

Add integration tests to validate that tags are working as expected.
2017-08-22 11:11:38 -04:00
Romain Dartigues
050de6d6b5 bug: lvol fail when LV already exists (#23635) 2017-08-22 10:47:56 -04:00
Tomáš Karásek
b3a90253fc Improvements in the packet_device module (#23127)
* Improvements and fixes in the packet_device module

* add version_added to new args

* remove default value from facility

* changed 'lock' from deprecated arg to alias of 'locked'
2017-08-22 06:43:37 -07:00
Karol Chrapek
0954fadff7 Correct mute function in datadog_monitor (#19662) 2017-08-22 09:38:07 -04:00
Rene Moser
4a2b4d07db exoscale: similar env vars as in cloudstack
* update docs
2017-08-22 14:43:48 +02:00
Rene Moser
58cd107166 exoscale: fix api_key param auth typo 2017-08-22 14:43:48 +02:00
Ganesh Nalawade
5d1d1a72c5 Fix junos integration test failure (#28491)
Pass ssh_config value to ncclient manager api as None
if it is not set.
2017-08-22 07:25:19 -04:00
Dag Wieers
96da0047ac Fix an issue causing win_copy to fail
It seems win_copy can fail because `will_change` was not returned in the dictionary when doing a query.
This is an easy fix to get it working again.
2017-08-22 13:03:32 +02:00
tmarlok88
982e322287 java_cert role pkcs12 import (#24616)
* java_cert pkcs12 import

* documentation and formatting

* update examples

* update examples #2

* integration tests

* integration tests #2

* added aliases.txt

* renamed aliases

* bugfix

* empty it alieses
2017-08-22 09:45:30 +02:00
Dag Wieers
6d015294c2 purestorage: Various changes, and one check-mode fix (#28485)
These were the changes I propose twice, a nullified PR edit, and then as
review comments when the PR was being merged.

I made those changes now to all purestorage modules.
2017-08-22 02:25:13 +02:00
Simon Dodsley
b150f49187 purefa_volume: Add volume copy, aka clone (#28376) 2017-08-22 00:15:51 +02:00
Abhijeet Kasurde
69d03d26e5 Fix multiple issues in vmware_vswitch (#27969)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-21 23:07:04 +02:00
Brian Coca
a897193bce Moar constructive (#28254)
* made composite vars and groups generic

now you can do both in every plugin that chooses to suport it
renamed constructed_groups as it now also constructs vars ... to constructed
moved most of constructed_groups logic into base class to easily share

* documented inventory_hostname

* typo fix
2017-08-21 16:06:15 -04:00
Mike Wiebe
ec11cd2696 nxos_bgp_neighbor_af fix problem with advertise-map properties (#28413)
* Fix problem with advertise-map properties

* Change limit_to back to run all tests

* Fix unit tests

* Move advertise_map out of get_custom_value
2017-08-21 15:28:02 -04:00
Dag Wieers
d902b9a36e Fix booleans in win_psexec documentation 2017-08-21 19:58:17 +02:00
bonuscheese
7c366f5cbd Fix 'format' method syntax to support Python 2.6 (Fixes #28198) (#28304)
Fixes #28198
Changed how string format method is used to support Python 2.6 syntax. By adding in positional arguments to braces in format method (e.g. {0}, {1}), Python 2.6 can support this module, without causing issues in newer versions of Python.

See ref for info on format differences w/ 2.6:
https://docs.python.org/2/library/string.html#format-string-syntax
2017-08-21 13:57:26 -04:00
Matt Clay
44f4294f5c Fix metadata in syslogger module. 2017-08-21 13:14:55 -04:00
Tim Rightnour
c1e4702ff4 Add the syslogger module
Remove tabs from docs

Pass ansible sanity test
2017-08-21 12:33:54 -04:00
Yanis Guenane
d4e7b045b7 Extend test coverage for openssl modules (#27548)
* openssl_privatekey: Extend test coverage

Extend the coverage of the integration test for the module
openssl_privatekey.

New tests have been added:

  * passphrase
  * idempotence
  * removal

Co-Authored-By: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>

* openssl_publickey: Extend test coverage

Extend the coverage on the integration test for the module
openssl_publickey.

New tests have been added:

  * OpenSSH format
  * passphrase
  * idempotence
  * removal
2017-08-21 12:19:41 +01:00
Emma
4653f892c8 Documentation fix - subnet_name (#28462)
virtual_network was incorrectly stated as an alias for subnet_name. It should be 'subnet'.
2017-08-21 08:30:30 +01:00
nrwahl2
535ede4d15 Fixes #28444: Renamed function print_match to match_print due to variable name conflict (#28445)
* Fixes #28444: Renamed print_match function to match_print due to name conflict

* Rename `match_print` to `do_print_match`

I think this is less confusing.
2017-08-20 05:28:30 +02:00
Dag Wieers
b9cee65756 Original author wishes not to be notified by ansibot (#28447)
And moving maintainers to BOTMETA.yml as well.
2017-08-20 03:56:31 +02:00
David Kretch
beed59f303 Fix trailing space in ec2_vol example, fix 'the the' typos (#28440)
* Fix 'the the' typos, fix 'pahting' filename typo

* Change 'the the' typos to a single 'the'.
* Change `playbook_pahting.rst` to `playbook_pathing.rst`.

* Delete trailing space in ec2_vol example

Delete the trailing space in `instance: "{{ item.id }} "`, which makes the
example fail when run because it looks for instance "i-xxxx ".
2017-08-19 23:00:51 +02:00
Mike
b5a00d05d3 fixed #28183 - user module shadowfile update on SunOS (#28276)
* fixed #28183 - user module shadowfile update on SunOS
2017-08-19 13:14:58 -07:00
Jordan Borean
8e40ac54dd win_copy: rewrite with new tests and functionality (#27678)
* win_copy rewrite with new tests and functionality

* minor pep fixes

* Handle UTF-8 filenames in zip

* fix for template

* when zip assemblies are not available in .net revert to old behaviour of copying one by one

* typo fix

* some more typos

* updated logic to correctly handle when new directories can be created

* removed testing file as it is not needed

* updated documentation based on PR
2017-08-18 20:33:37 -07:00
Matt Clay
7fc4e6b4af Fix PEP 8 issue. 2017-08-18 16:19:27 -07:00
Brian Coca
49c54024e6 added helper function to convert objects to dicts 2017-08-18 18:13:51 -04:00
Brian Coca
de16ce42ef optimize reserved names warning 2017-08-18 17:45:39 -04:00
René Moser
b3a57a4014 cloudstack: cs_host: add host_tag alias (#28417) 2017-08-18 22:41:52 +02:00
Drew Bomhof
ea51567697 Allow a miq token as an argument passed into the ManageIQ Python API Client (#28088) 2017-08-18 16:25:09 -04:00
Nathaniel Case
33f342435a Attempt to detect and abort when 'fex-fabric' is present (#28342) 2017-08-18 16:13:12 -04:00
Ganesh Nalawade
4f54d6cea1 eos aggregate spec validation and doc changes (#28414)
*  Add aggregate validation for eos DI modules
*  Doc change to add aggregate examples
2017-08-19 01:41:20 +05:30
Rene Moser
f6b7c1a6c1 cloudstack: cs_storage_pool: fix state handling, add tests
cs_storage_pool: rm CloudStackException dependency

cs_storage_pool: fix UnboundLocalError in check mode
local variable 'pool' referenced before assignment
2017-08-18 22:08:41 +02:00
John McEleney
7549b27544 Add new module cs_storage_pool
- Changed zone_name to name - Changed cluster_name to cluster - Changed pod_name to pod - Corrected tags type in docs - Remove unneeded returns - Other simplifications
2017-08-18 22:08:41 +02:00
Abhijeet Kasurde
be86d77a70 Add check for correct parsing of sysctl (#24540)
* PEP8 fixes
* Refactoring of code
* Check to skip non-comment lines which doesn't
  contain = character

Fixes #24453

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-18 15:31:26 -04:00
Deyan Stoykov
2f732a621d haproxy: fix fail_on_not_found behaviour (#24790)
* haproxy: fix fail_on_not_found behaviour

* fix pep8 compliance
2017-08-18 15:31:12 -04:00
Dmitriy Khomutov
277b8bfaf0 Alternatives module: Add a check that the path to the executable exist (#24800)
* Add check that the path to the executable exists

* Corrected a typo
2017-08-18 15:31:06 -04:00
Sloane Hertel
29ab182537 elasticache_parameter_group: fix KeyError bug #24475 (#24509)
* Fix KeyError bug by appending None if key doesn't exist

ensure value is the expected type; if if expecting something parsed as truthy try to turn it back into the desired value - fixes result showing always changed since bool compared to str

use to_text

* use string_types instead of str, remove inline conditionals, abbreviate boolean logic
2017-08-18 15:23:38 -04:00
Guillaume Coré
ccdea1c3b8 archive: allow ZIP64 by default (#24200)
allowZip64 is True by default since python 3.4,
see https://docs.python.org/3/library/zipfile.html#zipfile-objects

With python 2.7, when the file or folder to zip is >2G,
zipfile raises LargeZipFile.

This commit set allowZip64 to true.

Fixes #24125
2017-08-18 14:55:40 -04:00
Ganesh Nalawade
c4b9dfe542 Remove default description in network DI modules (#28411) 2017-08-19 00:09:01 +05:30
Abhijeet Kasurde
a572de626c Pep8 fixes for acl module (#24666)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-18 14:31:16 -04:00
Catatonic
b146ba37da Update capabilities.py (#23879)
Fixes issue when using python3 interpreter: 'filter' object has no attribute 'append'
Ensure list type of data is used before appending data.
2017-08-18 14:24:33 -04:00
Konstantin Shalygin
343da35381 mail: Fix auth over starttls. (#24089) 2017-08-18 12:13:24 -06:00
Peter Sprygada
03b888052b fixes bugs in network filter for parsing ip address (#28404)
also adds parse_cli and parse_cli_textfsm to changelog
2017-08-18 14:05:26 -04:00
Gaige B Paulsen
54c50cc983 netconfig module updated to pay attention to .ssh/config (#23876) 2017-08-18 12:04:30 -06:00
Sloane Hertel
b9762b52af s3_sync was setting HAS_BOTO3 by the existence of botocore alone. Fixes #28023 (#28339)
* s3_sync was setting HAS_BOTO3 by the existence of botocore alone. Fixed to import from module_utils.ec2 to ensure boto3 + botocore are present.

Also documented module requirements.

* Remove unused import
2017-08-18 13:21:10 -04:00
Bobby Watson
8e8a7c869a Changed string check to verify that EOS device is not in config mode. (#28332)
Changed string check to verify that EOS device is not in config mode. This was required in order to work with Arista 7500 series modular switches.
Resolves #2830
2017-08-18 09:06:46 -06:00
Chris Alfonso
bd56e6c9ce Removing deprecated openswitch modules (#28397) 2017-08-18 08:58:45 -06:00
Doug Gorley
5e6984a34c Added support to GCE module for image families and external projects. (#26711)
* Added support to GCE module for image families and external projects.

* Added image_family and external_projects to gce_pd.

* Added version_added for new options.
2017-08-18 10:45:13 -04:00
Nathaniel Case
db5d799122 Fix nxos_pim idempotence (#28348) 2017-08-18 09:47:41 -04:00
TaoBeier
be6c4908a2 executor stats and task_executor pep8 error (#23651) 2017-08-18 08:55:48 -04:00
Abhijeet Kasurde
6fd579b9f5 Refactor DigitalOcean modules
Fix adds refactoring of DigitalOcean modules by adding
common functionality to module_utils.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-18 00:23:54 -07:00
Ganesh Nalawade
9ab9945cf3 iosxr modules aggregate check and other minor refactor (#28360)
*  iosxr aggregate validation
*  vyos_user, junos_user minor changes
*  Aggregated documentation
2017-08-18 09:50:35 +05:30
Ganesh Nalawade
ceef4f97ed Use merge operation for load configuration in junos modules (#28369)
*  Change load configuration operation from replace to merge
2017-08-18 09:50:02 +05:30
Mehran Kholdi
ecfa7f696d Enforce state='file' in copy module
This was causing wrong behaviour when `prev_state` was `hard`-link,
since the `file` module tried to apply the same `state` on the new
file, causing unexpected errors.

Particularly, both `overlay` and `devicemapper` storage drivers in
docker use hardlinks to share files between layers. This causes
most ansible playbooks to fail when working with files from layers
below.
2017-08-17 18:16:17 -07:00
Dag Wieers
78dfbed2a5 openbsd_pkg: Fix when failed, PEP8-compliant (#26018)
This PR includes:
- PEP8 compliancy
- A fix to ensure the module fails when it failed for a package
- Various cosmetic changes to documentation
- Make `state: present` the default (and not required)
2017-08-17 18:20:02 -04:00
Sam Doran
9fe898add6 Make options match others in the file 2017-08-17 17:44:27 -04:00
Kurt Bomya
05fd51f77d Added "choices" true/false for user_install 2017-08-17 17:44:27 -04:00
Julien Stroheker
0b29162b97 Azure Availability Set module (azure_rm_availabilityset) (#28353)
* Adding the module and int. tests

* upgrading metadata to 1.1
2017-08-17 17:20:16 -04:00
Sergio Millan
400085aa5b return EXCL_STATE when color property is not in the response 2017-08-17 17:17:49 -04:00
Artem Loginov
6e8eb7612a Fixed issue with legacy jenkins instances 2017-08-17 17:17:49 -04:00
Filipe Azevedo
6868c892ed Fixes https://github.com/ansible/ansible-modules-extras/issues/2462 (#21891) 2017-08-17 17:16:55 -04:00
Adrian Likins
01c0b2f714 Handle errors in jmespath in json_query better (#22109)
* Handle errors in jmespath in json_query better

Catch any exceptions raised from jmespath and raise
an AnsibleFilterError instead.

Avoid a traceback.

Fixes #20379

* pep8
2017-08-17 17:16:35 -04:00
Lukas Beumer
eebc0cea6e [cloud][gcp] Add region and versioning parameter to gc_storage (#27802) 2017-08-17 15:58:29 -04:00
John Bond
722579356d correct handeling of execute option (#23814) 2017-08-17 15:50:38 -04:00
Nihlaeth
e5ff8e3407 Don't remove comment from public key, and improve error message for duplicate keys (github_key) (#22282)
* improve error message for duplicate public keys

* don't consider self when searching for duplicates

* don't strip comment from key
2017-08-17 15:38:39 -04:00
Antony Messerli
e0d0446183 Updates lldp module example to use ifname instead of ifalias (#23064) 2017-08-17 15:38:30 -04:00
Anthony Arnaud
3da1036baa zfs bad volume block size #23090 (#23092) 2017-08-17 15:38:24 -04:00
Elachance
7b8b444602 Fix logic in os_nova_host_aggregate module (#23191)
* Fix logic in os_nova_host_aggregate module

Fix logic around adding availability zone to metadata and comparing existing host list to parameter host list. 

Previously, when no availability zone was defined, an empty availability zone was being appended to metadata. This was causing 'empty named availability zone' errors when running the module against an already existing host aggregate with no availability zone. This was fixed by only appending availability zone to metadata if it is not an empty parameter.

Also added set() casting when comparing existing and new host lists. Previously, if existing host list was not in the same order as the host list in the .yml parameter file the module would consider this a change even if the two lists had the same entries.

* Update os_nova_host_aggregate.py
2017-08-17 15:30:38 -04:00
Michael Leer
ce2c14757d the use of --puppet has been deprecated (#23356) 2017-08-17 15:30:21 -04:00
Sloane Hertel
25a9ababcc ec2.py: filter by client-token if id is specified (#26114)
fixes #26021
2017-08-17 15:17:13 -04:00
Sloane Hertel
1300680d30 [cloud] Cast port to an integer in elb_application_lb listener spec (#28341) 2017-08-17 15:13:58 -04:00
Dag Wieers
e801187899 Bugfix and assorted fixes (#28352)
These are updates from aci-ansible.
2017-08-17 21:00:23 +02:00
disappear89
d4cedbee20 nmcli: Changed parameter ordering in create_connection_bond (#23571)
nmcli: Changed parameter ordering in create_connection_bond
2017-08-17 14:48:58 -04:00
Jun Guo
655667527d [docker] Fix ignore_image option not work issue. (#19039)
Currently the ignore_image option can be set, but can not work as it is
descripted in document. The reason is the code will check the difference
of configurations between current container and target image, and it
will mark the `different` to `True` when the image is different even we
set `ignore_image=true`, that will cause the container being re-create.
2017-08-17 13:47:52 -04:00
Simon Dodsley
e7b0849886 Fix incorrect bool check in Pure Storage modules (#28007) 2017-08-17 10:35:52 -07:00
jctanner
f4e93ccc1a Fix the authors in pure storage modules so the bot can ping the right users. (#28347) 2017-08-17 13:32:23 -04:00
Aleksandr Vinokurov
a55cef3cba Fix postgresql_user module to treat quoted identifier well, Fixes #18937 (#18938) 2017-08-17 12:40:24 -04:00
Jasper Lievisse Adriaanse
955cc5a99e Fix for hponcfg on ESXi hypervisors (#27362)
Add new option to pass the path to the hponcfg binary which may not live in
$PATH. For example on ESXi hypervisors it tends to be located in
/opt/hp/tools/ instead. Also properly implement a verbose option for which the
code was already commented out.
2017-08-17 18:20:55 +02:00
Lucas Alvares Gomes
119a79cf0c Replace lxc-clone with lxc-copy (#19890) (#20373)
The command lxc-clone is deprecated in favor of lxc-copy. This patch
changes the lxc module to use the new lxc-copy command by default. If
not present, it will fallback to the old lxc-clone command to keep it
backward compatible with older versions of lxc.
2017-08-17 12:01:47 -04:00
alex lustenberg
ff4fa6ac29 fix for empty hostnames in mysql users (#20523) 2017-08-17 12:00:26 -04:00
Jonathan Davila
974d988703 Updated consul_kv lookup plugin so that it can take in host and port
parameters as keyword arguments instead of only being able to specify
it as environment variables.
2017-08-17 10:42:22 -04:00
Alvaro Aleman
f8e79eb481 Fix changed event for docker_image in force mode 2017-08-17 10:42:09 -04:00
Ryan Fitzpatrick
b905a349ac Correct config manager deprecation warning 2017-08-17 10:24:42 -04:00
David Newswanger
b818e986b6 Change network *_user modules to use configured_password to set a users password (#28187)
* WIP, update eos_user args

* refactor password for ios_user

* add eos tests, fix ios tests

* fixed password check

* refactor iosxr_user password

* fixed password arg for nxos

* [WIP] fix vyos_user password

* fix vyos tests

* update docs for net_user

* fix typo

* fix eos tests

* add warning when attempting to use password arg

* fix sanity/unit tests

* fix eos unit tests

* fix vyos_user aggregate

* fix typo in eos documentation string

* re add configured_password to vyos tests after rebase
2017-08-17 19:06:44 +05:30
Peter Sprygada
b1d297d144 fixes asa_acl module to work with persistent connections (#28320)
* updates module_utils/asa.py to add missing common argument 'passwords'
* fixes asa_acl.py module to work with persistent connections
2017-08-17 07:48:35 -04:00
Abhijeet Kasurde
86f23dc620 Update connection logic in vmware module_utils (#26323)
Fix updates logic of connection in vmware module_utils

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-17 13:30:56 +02:00
Ricardo Carrillo Cruz
5a6f3ebed1 WIP Implement declarative intent arguments on eos_vlan (#28270)
Implement declarative intent arguments on eos_vlan
2017-08-17 09:45:50 +02:00
Trishna Guha
2e211078ce fix vyos_user aggregate (#28317)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-17 12:44:55 +05:30
Ganesh Nalawade
403f6db53f ios aggregate and common argument support (#28316)
*  ios aggregate spec validation
*  ios common argument for aggregate support
2017-08-17 12:07:08 +05:30
Benjamin
c9e5842c47 Fix maven_artifact documentation (#28295)
Display the string 'no' as default for the keep_name attribute.
2017-08-17 11:47:09 +10:00
Dag Wieers
2960f5feac Rename ACI modules according to new conventions (#28306)
As discussed in full at https://github.com/datacenter/aci-ansible
we desired a better naming convention for ACI modules before they ship
with Ansible v2.4

The result is summarized in this PR.

The modules now also include the classes from the object model, as well
as a link to the documentation.
2017-08-17 02:27:42 +02:00
Matt Clay
15be0e91e8 Fix PEP 8 issues. 2017-08-16 14:32:11 -07:00
Jordan Borean
46b80bc18e win_update: added extra job parameters to run even if on battery (#28212)
* win_update: added extra job parameters to run even if on battery

* added info about battery power change
2017-08-16 14:15:20 -07:00
kletiz
a42b81132e win_dns_client failing on 2008R2 SP1 (Fixes #25216) (#28172) 2017-08-17 07:11:02 +10:00
Paulo Matias
c8124ca39a os_router: fix checking if router needs update (#19780)
When verifying if a router needs update, the os_router module should
take into account only network ports which are owned by routers. Other
ports might have been added e.g. by the HA network tenant, which would
lead the router to always be detected as changed and cause the module to
try removing these network interfaces.
2017-08-16 22:38:49 +02:00
Meirong
e75a256cfa add Fusionlayer Infinity ansible module into ansible package (#26855)
* add infinity ansible module into ansible package

* move infinity to be the correct direction without a folder

* remove dependency on requests library and use ansible built-in method to send rest api call

* add missing whitespace

* Use open_url from module_utils instead of urlopen based on suggestions

* correct the path for infinity ansible modue, moving it into the  ansible/modules/network/infinity

* make change on the documentation and code based on feedback

* change the data type in the Return documentation based on feedback

* add importing  for path and define metaclass based on testing failure

* change the postion of importing __future__

* Move Infinity module from Network module into net_tools directory based on review

* put back the file that is accidently removed

* change ansible-metadata version to be 1.1
2017-08-16 20:11:10 +01:00
Keisuke.K
de27e8d228 nmcli should not return error if trying to delete an absent connection (#20677) 2017-08-16 12:57:57 -06:00
Andrew Klaus
c9cfc9be07 os_recordset fix for names with multiple DNS record types (#19588)
* Fix for os_recordset.py to filter based on record type. Fixes https://github.com/ansible/ansible/issues/19572

* remove redundant variable

* Needing to use recordset ID to update and delete records. Using the record name for update/delete causes issues when A and AAAA records exist for a name

* Adding exception handling for dictionary item
2017-08-16 14:32:13 -04:00
George Nikolopoulos
b339f23485 Various small fixes (#27766) 2017-08-16 14:14:21 -04:00
Anil Kumar Muraleedharan
55df3e05ed Solving Coverity issues (#28057) 2017-08-16 17:29:34 +01:00
Anil Kumar Muraleedharan
ffd701c8d1 Resolving Coverity Issues. (#28056) 2017-08-16 17:21:02 +01:00
Mike Wiebe
8f4bc8150f Fix default nxapi port setting when use_ssl set (#28236)
* Fix port setting when use_ssl set
2017-08-16 11:38:38 -04:00
Martin Krizek
bcb9644f39 yum: cover "Nothing to do" not only for groups (#28283) 2017-08-16 17:24:51 +02:00
Ganesh Nalawade
8a6e1531b7 Fix config timeout issue for network modules (#28261)
* Fix config timeout issue for network modules

* Re-enable network test

* Remove unwanted persistent connection timer

* Minor changes in description
2017-08-16 10:55:39 -04:00
Pilou
016cd0691c alternatives: handle absent link, add integration tests (#27967)
* alternatives: add integration tests

* alternatives: handle absent link (fix AttributeError)

Error occurred at least on Debian Stretch and OpenSuse 42.2:
Traceback (most recent call last):
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 161, in <module>
    main()
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 113, in main
    current_path = current_path_regex.search(display_output).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

update-alternatives stdout sample:
dummy - manual mode
  link best version is /usr/bin/dummy1
  link currently absent
  link dummy is /usr/bin/dummy

* alternatives: PEP 8 fixes

* alternatives: fix copyright in integration tests

* alternatives: nested loops handle more than 2 items

Thanks to Michael Scherer (@mscherer) for pointing that.

* alternatives: enable integration tests
2017-08-16 10:35:56 -04:00
Peter Sprygada
6886153b54 refactors nxos_vrf_af module (#28208)
* refactors nxos_vrf_af module

fixes #27595

* fix up unit test cases

* add commands to result dict

* add route-target on afi create

* adds deprecation note to safi argument
2017-08-16 10:11:12 -04:00
Peter Sprygada
37524b798d updates network parse_cli filter to handle blocks from output (#28245)
* updates network parse_cli filter to handle blocks from output

* minor updates to finish up parse_cli filter

* all vars are now under the vars key
* attributes key has been changed to keys
* added the start_block and end_block directives

* update PEP8 failures
2017-08-16 08:59:14 -04:00
Yanis Guenane
b658ea8da2 openssl_csr: Ensure array comparison is deterministic (#28265)
When comparing expected and current value for keyUsage and
extendedKeyUsage current behavior is not deterministic.

As we compare two arrays, based on the order the value have been
specified, False might be returned when the two arrays actually matches.
In order to have a deterministic comparison we compare sets rather than
arrays.
2017-08-16 14:35:25 +02:00
David Newswanger
a37c5e53e6 fix prompt error when deleting ios user (#28175)
* fix prompt error when deleting ios user

* placate pep8

* wrap delete user command in function

* fix python 3 unit tests
2017-08-16 15:15:41 +05:30
Trishna Guha
ce3d1c6ba0 eos_user fix username param (#28114)
* eos_user fix username param

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

* Add setup eos_user test and rename username for consistency

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

* update unit test and pep8 fix

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

* pep8 fix
2017-08-16 12:08:59 +05:30
Toshio Kuratomi
d8b1cb9a63 Assign network modules maintained by the network team the network metadata 2017-08-15 23:12:08 -07:00
Toshio Kuratomi
f203ca7907 Update metadata to 1.1 2017-08-15 23:12:08 -07:00
Toshio Kuratomi
af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
2017-08-15 23:12:08 -07:00
CyberArk BizDev
d50d65d448 Added cyberarkpassword lookup plugin (#21857)
* Added cyberarkpassword lookup plugin

Added cyberarkpassword lookup plugin: It allows to retrieve credentials
(password, sshkey) from CyberArk Digital Vault
2017-08-15 23:06:46 -07:00
Toshio Kuratomi
bf4858d042 metadata change was lost in conflict resolution. 2017-08-15 21:43:13 -07:00
Ganesh Nalawade
4caddad224 Doc fixes for junos lldp modules (#28228) 2017-08-16 09:32:39 +05:30
David Newswanger
b7d886840b standardized agreggate as arg, and collection and users as aliases for user modules (#28244) 2017-08-16 09:31:25 +05:30
Dag Wieers
edba563e9a ACI fixes (#28257) 2017-08-16 04:13:16 +02:00
Pierre-Louis Bonicoli
572ab3987a circonus_annotation: check requests library version 2017-08-15 19:07:21 -07:00
Pierre-Louis Bonicoli
f69333b80d circonus_annotation: fix broken import, update requirements 2017-08-15 19:07:21 -07:00
Matt Davis
9b383403ce switch become/runas to LogonUser/CreateProcessWithTokenW (#28253)
* non-uac works

* switch become/runas to LogonUser/CreateProcessWithTokenW

* fixes #22218
* provides consistent behavior across authtypes
* auto-elevates on UAC if target user has SE_TCB_NAME ("Act as part of the operating system") privilege
* sets us up for much more granular capabilities later (eg, network/service/batch logons)
2017-08-15 18:55:17 -07:00
Pilou
1b6b74f655 alternatives: link is required when alternative is unknown (#27942)
Fixes #25598
2017-08-15 18:35:09 -07:00
Andy Freeland
9e8a3f4302 stdin arg: add documentation to shell module 2017-08-15 18:24:01 -07:00
Guillaume Coré
905c25559d add stdin argument to command module
fixes #14380
2017-08-15 18:24:01 -07:00
Jacob McGill
b7d99f43d5 ACI EPG Contract Binding: New Module (#28251)
new module: managing EPG to Contract bindings [network/aci/aci_epg_contract_binding]
2017-08-16 02:58:01 +02:00
Toshio Kuratomi
872255b791 Revert "Add 'stdin' argument to command/shell modules"
This reverts commit 393909d0cc.
Reverte so that we can maintain authorship
2017-08-15 17:10:31 -07:00
schunduri
4729981eba new module: Manage end point groups [network/aci/aci_epg] (#28207)
* Cisco ACI EPG

* Fixed errors

* Updated module

* Update to version from aci-ansible repository
2017-08-16 01:46:38 +02:00
schunduri
ebbb5369b5 new module: manage application network profiles [network/aci/aci_anp] (#27984)
* New Cisco ACI Application Profile Module

* PEP8 verified

* Various Fixes

* aci_anp:Refactored

* aci_anp changed short description

* Changes from the aci-ansible repository
2017-08-16 01:04:46 +02:00
schunduri
83d9f2d9ed new module: manage attachable entity profiles [network/aci/aci_aep] (#27987)
* New Cisco ACI Attachable Entity Profile Module

* PEP8 Verified

* Various Fixes

* Refactored: aci_aep

* Updated to the latest changes from aci-ansible

* And a small cosmetic change
2017-08-16 00:59:43 +02:00
Ozi Boms
da3f8df20d Azure azure_rm_common update (#28227)
* include support for DNS modules

added code to allow DNS modules to run

* fixed issue with dns

* removed extra end of file line
2017-08-15 15:55:13 -07:00
Ivan Bojer
c2b2176893 deprecated panos_nat_policy in lieu of panos_nat_rule (#28033)
* - deprecated panos_nat_policy in lieu of pano_nat_rule that uses next generation SDK (PanDevice). Also renamed the module so that is aligns with API calls and UI framework.

* - ansible_metadata requires metadata_version instead of just version key in 2.4

* PEP8 changes

* PEP8 changes

* Emit deprecation warning and add boilerplate
2017-08-15 17:45:37 -04:00
Andy Freeland
393909d0cc Add 'stdin' argument to command/shell modules
Fixes #14380 #23428
2017-08-15 14:27:57 -07:00
Brian Coca
c27248db60 ansible-inventory cli tool (#22477)
* ansible-inventory cli tool

added vars dump to graph
made yaml inventory dump actual yaml inventory format
cleaner dump
fixed graph, no dump needed
add pulling in host/group vars
pep indentation crime
added docstring for manpage autodoc
remove ansible_facts from output
added api compat layer
allow import from new and old APIs
better conditional for <2.4
pe4+p4

test stuck on OS X (seems popular today) but passes rest, merging anyways
2017-08-15 16:45:54 -04:00
Ivan Bojer
178cf6e82e Rename panos_security_policy to panos_security_rule + extra features (#28031)
* - renamed panos_security_policy to panos_security_rule in order to better align with UI and API calls

* - fixed PEP8 issues

* - ansible bot does not like multiline comments. Using > for now.

* Add deprecation warning and boilerplate
2017-08-15 16:42:10 -04:00
Brian Coca
f921369445 Ansible Config part2 (#27448)
* Ansible Config part2

- made dump_me nicer, added note this is not prod
- moved internal key removal function to vars
- carry tracebacks in errors we can now show tracebacks for plugins on vvv
- show inventory plugin tracebacks on vvv
- minor fixes to cg groups plugin
- draft config from plugin docs
- made search path warning 'saner' (top level dirs only)
- correctly display config entries and others
- removed unneeded code
- commented out some conn plugin specific from base.yml
- also deprecated sudo/su
- updated ssh conn docs
- shared get option method for connection plugins
- note about needing eval for defaults
- tailored yaml ext
- updated strategy entry
- for connection pliugins, options load on plugin load
- allow for long types in definitions
- better display in ansible-doc
- cleaned up/updated source docs and base.yml
- added many descriptions
- deprecated include toggles as include is
- draft backwards compat get_config
- fixes to ansible-config, added --only-changed
- some code reoorg
- small license headers
- show default in doc type
- pushed module utils details to 5vs
- work w/o config file
- PEPE ATE!
- moved loader to it's own file
- fixed rhn_register test
- fixed boto requirement in make tests
- I ate Pepe
- fixed dynamic eval of defaults
- better doc code

skip ipaddr filter tests when missing netaddr
removed devnull string from config
better becoem resolution

* killed extra space with extreeme prejudice

cause its an affront against all that is holy that 2 spaces touch each other!

shippable timing out on some images, but merging as it passes most
2017-08-15 16:38:59 -04:00
Ivan Bojer
8b617aaef5 Panos object (#28028)
* - deprecated panos_address and panos_service in lieu of common panos_object

* - deprecated/removed panos_address and panos_service in lieu for panos_object

* squash! - deprecated/removed panos_address and panos_service in lieu for panos_object

* - fixed PEP8 issues

* - ansible_metadata requires metadata_version instead of just version key in 2.4

* add > to multi line descriptions

* update version string to 2.4

* Update legacy-files.txt
2017-08-15 16:24:15 -04:00
Simon Dodsley
08767946cb Add Pure Storage Snap module (#28027)
* Add Pure Storage Snap module

* Use one line GPL license

https://github.com/ansible/community/wiki/Testing:-boilerplate,-wildcard-imports,-and-get_exception
2017-08-15 15:27:34 -04:00
saichint
064ab7a92d fix for remove idempotent issue (#28226) 2017-08-15 13:14:40 -04:00
Adrian Likins
8003437ebc prompt for new pass on create/encrypt if none specified (#28185)
* prompt for new pass on create/encrypt if none specified

Make 'ansible-vault' edit or encrypt prompt for a password
if none or provided elsewhere.

Note: ansible-playbook does not prompt if not vault password
is provided

* dont show vault password prompts if not a tty
2017-08-15 13:09:24 -04:00
giovannisciortino
09cc84c796 Fixes #27635: pam_limits fix add comment (#27999) 2017-08-15 13:07:31 -04:00
Sam Doran
a8e4c9be7a Cause copy module to fail on empty string as source (#27975)
* Fail if an empty string is set as src for copy module

Fixes #27363

* Cleanup task formatting on copy tests

Use multi-line YAML
Add debug statements with verbosity: 1 rather than leave them in there commented out.

* Add test for empty string as source

* Do more checks in order to add more specific errors messages

Add more integration tests for the various failure scenarios.
Cleanup some syntax on existing integration test tasks.
2017-08-15 12:41:16 -04:00
saichint
d69440c4ef Fix nxos_vpc issues (#28188)
* fix for nxos_vpc issues

* fix unit tests

* clean documentation
2017-08-15 12:08:55 -04:00
Nathaniel Case
1d13624eae Clean up nxos_aaa_server (#28177)
* cleanup nxos_aaa_server

* Specify nxos_aaa_server output format

Fixes #27289
2017-08-15 12:08:03 -04:00
Adrian Likins
5739bb075f Vault secrets default vault ids list (#28190)
* Add config option for a default list of vault-ids

This is the vault-id equilivent of ANSIBLE_DEFAULT_PASSWORD_FILE
except ANSIBLE_DEFAULT_VAULT_IDENTITY_LIST is a list.
2017-08-15 11:56:17 -04:00
Jiri Tyr
1b8fe94e5a Support list for baseurl and gpgkey params in yum_repository (fixes #24948) (#24967)
* Support list for baseurl and gpgkey params in yum_repository

* Adding tests
2017-08-15 11:51:33 -04:00
Nathaniel Case
20a35d0c1c Fix python3 str <-> bytes in connection/persistent.py (#28224) 2017-08-15 11:36:20 -04:00
Adrian Likins
e287af1ac8 Vault secrets empty password (#28186)
* Better handling of empty/invalid passwords

empty password files are global error and cause an
exit. A warning is also emitted with more detail.

ie, if any of the password/secret sources provide
a bogus password (ie, empty) or fail (exception,
 ctrl-d, EOFError), we stop at the first error and exit. 

This makes behavior when entering empty password at
prompt match 2.3 (ie, an error)
2017-08-15 11:01:46 -04:00
Sam Doran
271127113f Add comment option to authorized_key (#27781)
* Add comment option to authorized_keys

* Update version_added for authorized_keys comment

* PEP8

* Include index rank in parsed_key_key

*  Properly display diff

Only display diff if specificed via settings

* Fix PEP8 test failure

Removed from legacy files since it is now properly formatted

* Cleanup integration test formatting and add test for new comment feature

* Correct version_added for new option
2017-08-15 10:50:50 -04:00
René Moser
d1fa210bed yum: using install to update specified packages (#26266)
* yum: using install for update packages

* yum: fix return changed when latest version installed

* yum: fix changed when nothing to do
2017-08-15 16:20:10 +02:00
Ganesh Nalawade
a12e9807ba Add intent arguments for ios and iosxr interface modules (#28018)
* Add intent arguments for ios_interface

*  Intent argument support
*  Integration test case for intent arguments

* Fix ci issue

* Add intent arguments for iosxr_interface

*  Add intent check support for iosxr_interface
*  Integration test for intent + configuration

* Fix ci failure
2017-08-15 19:20:28 +05:30
Ganesh Nalawade
38c0b581c3 Handle common argument in aggregate parameter for vyos module (#28182)
* Handle common agrument in aggregate parameter for vyos module

*  Add supoort to set parameter in aggregate to it's respctive
   top level argument if value not provided in aggregate.
*  Aggregate argument spec validation
*  Documentation for aggregate

* Fix unit test failure
2017-08-15 19:09:44 +05:30
Ganesh Nalawade
0c4706897c Fix minor issue in junos_vlan (#28218) 2017-08-15 18:41:53 +05:30
Ondra Machacek
e9c9473819 Add power_manage_enabled option to ovirt_hosts module (#28154)
* cloud: ovirt: Add possibility to enable PM of host

* cloud: ovirt_hosts: user self.param to get module params
2017-08-15 05:32:18 -04:00
Fran Fitzpatrick
5fec649052 ipa_dnsrecord: Allow for PTR Records (supporting reverse DNS) (#26709) 2017-08-15 11:25:28 +02:00
Yanis Guenane
8ed7417ff9 openssl_csr: Allow user to specify criticality of extensions (#28173)
Allow user to mark the x509v3 extensions as critical, by specifying the
$extension_critical boolean, where $extension is the name of the
extension.

Currently this module supports only 3 differents x509v3 extensions:

  * keyUsage
  * extendedKeyUsage
  * subjectAtlName

There are more to come.
2017-08-15 04:29:29 -04:00
Andreas Olsson
c9cdc3a259 Fix zip filter for Python3
Using the now bundled six library.

Fixes #28117
2017-08-14 23:03:15 -07:00
Jordan Borean
f0a0e5674c win_iis_webapppool: tests, check_mode, bugfixes (#25869)
* win_iis_webapppool: Added integration testa and cleanup

* Updated docs and tests

* fixes from linter

* fixed up typo in docs
2017-08-15 01:14:39 -04:00
Andrew Saraceni
b0db1a1cf6 New Module: Manage Windows event logs (win_eventlog) (#27827)
* initial commit for win_eventlog module

* remove type for retention_days in documentation
2017-08-15 01:13:52 -04:00
Andrew Saraceni
bb7813f16f New Module: Write Windows event log entries (win_eventlog_entry) (#27828)
* initial commit for win_eventlog_entry module

* added test module for integration tests and minor documentation fixes
2017-08-15 01:13:14 -04:00
Jacob McGill
a8a3ad70ad ACI Subnet: New Module (#28202)
* ACI Subnet: New Module

* fix docstring

* update docstring
2017-08-15 03:46:39 +02:00
Pilou
a3f91274b3 circonus_annotation: DOCUMENTATION & argument_spec cleaning (#26832)
* circonus_annotation: clean description

- add 'default' field
- default value for 'required' field is false
- use formatting function

* circonus_annotation: clean argument_spec

remove useless conversion
default of 'required' False
use 'default' when possible

* circonus_annotation: fix pep8

* circonus_annotation: add RETURN block

* circonus_annotation: check_mode isn't supported, add a note
2017-08-14 18:40:00 -07:00
Jacob McGill
46956f0273 ACI Subject Filter Binding: New Module (#28201)
* ACI Subject Filter Binding: New Module

* add metadata

* fix whitespace
2017-08-15 03:33:11 +02:00
Dag Wieers
f8d24b4111 new module: Manage MCP interface policies [network/aci/aci_mcp] (#28206)
Manage MCP interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 03:26:43 +02:00
Jacob McGill
5efe713bea ACI EPG Domain: New Module (#28203)
new module: managing EPG to VMM and Physical Domains [network/aci/aci_epg_domain_binding]
2017-08-15 03:24:58 +02:00
Jacob McGill
24ec04cbfc ACI Filter Entry: New Module (#28200)
* ACI Filter Entry: New Module

* fix aliases key
2017-08-15 03:24:04 +02:00
Dag Wieers
835ef7dd66 new module: Manage Layer 2 interface policies [network/aci/aci_l2_policy] (#28205)
Manage Layer 2 interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 03:23:26 +02:00
Jacob McGill
cece18a777 aci_bd_l3out_binding.py (#28199)
new module: support for binding Bridge Domains and L3 Outs [network/aci/aci_bd_l3out_binding]
2017-08-15 03:14:53 +02:00
Jacob McGill
79afb2eff1 new module: manage Bridge Domains [network/aci/aci_bridge_domain] (#28196)
* ACI Bridge Domain: Add new module

* fix type in docstring

* fix type in docstring
2017-08-15 03:13:50 +02:00
Dag Wieers
68d487eacf new module: Manage route tag policies [network/aci/aci_route_tag_policy] (#28204)
Manage route tag policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 03:13:03 +02:00
Dag Wieers
fdfb4f736d new module: manage LLDP interface policies [network/aci/aci_lldp_policy] (#28099)
* aci_lldp_interface_policy: Manage LLDP interface policies

Module to manage LLDP interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.

* Rename aci_lldp_interface_policy to aci_lldp_policy
2017-08-15 03:12:20 +02:00
Jacob McGill
5e24fb298e Enhance module_utils to be cleaner and support more modules (#28197) 2017-08-15 02:53:29 +02:00
Dag Wieers
5a887fb1f6 aci_port_channel: Manage port channel interface policies (#28141)
Manage port channel interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:51:23 +02:00
Dag Wieers
af39ed86e5 aci_span_dst_group: Manage span destination groups (#28143)
Manage span destination groups on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:51:13 +02:00
Dag Wieers
9b05195a04 aci_taboo_contract: Manage taboo contracts (#28144)
Manage taboo contracts on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:51:01 +02:00
Dag Wieers
42d8a9ea89 aci_port_security: Manage port security (#28142)
Manage port security on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:50:12 +02:00
Dag Wieers
f7244ebb49 aci_monitoring_policy: Manage monitoring policies (#28140)
Manage monitoring policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:49:52 +02:00
Dag Wieers
ec8b99ac06 aci_action_rule_profile: Manage action rule profiles (#28139)
Manage action rule profiles on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:49:35 +02:00
Dag Wieers
67111e7fec aci_fc_policy: Manage FC interfaces on Cisco ACI fabrics (#28095)
Module to manage FC interfaces on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:49:19 +02:00
Dag Wieers
4e3c3a1aa1 aci_filter: Manage filter objs on ACI fabrics (#28094)
Module to manage top level filter objects on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:48:47 +02:00
Dag Wieers
d4fae9bbbc aci_contract: Manage contracts on ACI fabrics (#28093)
Module to manage contracts on ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
2017-08-15 01:48:27 +02:00
3onyc
554496c404 [passwordstore] Use builtin _random_password function instead of pwgen (#25843)
* [password] _random_password -> random_password and moved to util/encrypt.py
* [passwordstore] Use built-in random_password instead of pwgen utility
* [passwordstore] Add integration tests
2017-08-14 15:19:40 -07:00
Dag Wieers
f345ba5c38 More maintainers is a good thing, right ? 2017-08-14 23:50:21 +02:00
Evan Kaufman
767be93f77 Replace - Clarified regex docs (#26727)
* Clarified docs regarding multiline mode and negated character sets

Refs #26712

* Escaped newline
2017-08-14 14:25:08 -07:00
René Moser
13dec9259f galaxy-cli: selective install roles in requirements file (#21412)
* galaxy-cli: force install selected roles in requirements file

* only when requirements file but also handle uninstalled roles
2017-08-14 17:17:22 -04:00
Brian Coca
d95fd7414a use proper booleans for vars_prompt 2017-08-14 16:52:53 -04:00
Sam Doran
68060002e8 Rename modules from plural to singular (#27185)
* First batch of modules renamed from plural to singular

Related to this proposal: https://github.com/ansible/proposals/issues/10

* Emit rename deprication warning

* Update legacy-files.txt and skip.txt to reflect new names
2017-08-14 16:35:15 -04:00
saichint
9d84a4e530 fix for nxos_ospf_vrf invalid cmd and ntp errors (#27977)
* fix for nxos_ospf_vrf invalid cmd

* fix for nxos_ntp issues
2017-08-14 16:09:16 -04:00
Nathaniel Case
19a6000d97 Fix nxos_bgp_af networks parameter (#28169)
* Split 'networks' and 'redistribute' in get_value

* Add missing `'` in docs
2017-08-14 15:18:10 -04:00
Jacob McGill
59f704c766 add module to support ACI Contexts (#28091) 2017-08-14 13:11:21 -06:00
Ganesh Nalawade
c9b2869f06 Add regex to retrieve socket path (#28181) 2017-08-15 00:17:20 +05:30
Toshio Kuratomi
47b534d809 Move more modules out of curated
pip to core because users frequently use pip to install packages to run
ansible modules.

win_chocolatey to community as it still needs some work before we'd be
ready to include it in core support.
2017-08-14 10:58:15 -07:00
Abhijeet Kasurde
09cabaf702 Use response.content instead of response object (#25772)
vca module utility uses response object instead of
response.content which raises exception in while fail_json
call. Use content attribute from response object instead which
is exact description of HTTP Response error.

Fixes #25378

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-14 12:40:06 -04:00
Abhijeet Kasurde
8b7a58c961 Remove redundant get_obj method (#26819)
Fix removes redundant get_obj method in favor of
find_datacenter_by_name API. Also, strict checking for
datacenter object.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-14 12:37:36 -04:00
rahushen
b74300b657 Additional fix for #27167: port-channel interface idempotence (#27979) 2017-08-14 11:44:12 -04:00
giovannisciortino
d3e48a51f5 Add check mode support to ansible-pull (#28021)
Fixes #27989
2017-08-14 11:20:05 -04:00
Toshio Kuratomi
3edac559d3 the smart transport is broken by ssh retry code
1fe67f9 introduced retries to the ssh connection put file and fetch
file.  Unfortunately, that change broke the smart transport because it
started raising exceptions instead of returning from _run().  This
breakage is documented in #23711.

An attempt to fix it was made at #23717 but the first attempt was
objected to as needing to touch too much code.  The second attmept was
objected to as smart was forced to encapsulate retries (thus retrying
a sftp "rety" times before trying scp "retry" times and then finally
moving onto piped).  This third attempt has retries encapsulate smart.
So each sub-transport is tried once and if all three fail, another retry
attempt is made which tries each of the three again.

Fixes #23711
Fixes #23717
2017-08-14 08:08:00 -07:00
Giovanni Sciortino
ab81c6c0f3 strategy: lost list order using with_items during displaying results Fixes #21008 2017-08-14 10:59:25 -04:00
Nathaniel Case
820d7e805a Streamline nxos_smu (#28030) 2017-08-14 10:54:50 -04:00
rahushen
b9c3329950 nxos_ip_interface: Fixes for #27170, #27172 (#27935)
* Fixes for #27170, #27172

* Add nxos_ip_interface IT tests

* For ipv6 check if ip address configured before doing a no ip address
2017-08-14 10:16:08 -04:00
Arne Demmers
000df2709d Support downgrade to specific version in yum module. 2017-08-14 04:55:39 -07:00
David Newswanger
cfda267b2b fixes pipe issue (#28127) 2017-08-14 17:21:32 +05:30
Trishna Guha
60ce6438e3 fix nxos_overlay_global idempotence (#28150)
* fix nxos_overlay_global idempotence

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

* modify nxos_overlay_global unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-14 16:09:53 +05:30
David Newswanger
a01aa6e9df Fix structured output not supported in nxos_pim_interface (#28125)
* fixed unstructured error

* fix unit tests so they accept commands in dictionary form
2017-08-14 12:34:05 +05:30
Trishna Guha
12460dd713 Add ios_vrf declarative intent config check (#28001)
* Add ios_vrf declarative intent config check

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

* add version for delay param

* modify ios_vrf unit test
2017-08-14 12:27:03 +05:30
Ganesh Nalawade
eb33cc88bd Add state intent argument in vyos interface (#28066)
* Add state intent argument in vyos interface

*  State intent argument support
*  Integration test for supported intent arguments

* Add intent testcase

* FIx ci issue
2017-08-14 10:17:41 +05:30
Ganesh Nalawade
711a6b2326 Add common aggregate arguments for junos modules (#28124)
If parameter value in aggregate is not set, fetch it's corresponding
value from top level parameters.
2017-08-14 10:17:03 +05:30
Rafał Osiecki
33e56ca496 typo fix (#27212) 2017-08-14 02:15:00 +02:00
Pierre-Louis Bonicoli
e52096e78a copy: grammar fix 2017-08-13 08:22:22 -07:00
Pierre-Louis Bonicoli
ed8279cce0 copy: fix YAML documentation format 2017-08-13 08:22:22 -07:00
Pierre-Louis Bonicoli
1f5c908370 copy: state behavior when dest is a nonexisting path 2017-08-13 08:22:22 -07:00
Pierre-Louis Bonicoli
16f2e47559 copy: use formatting options 2017-08-13 08:22:22 -07:00
Pierre-Louis Bonicoli
28eb9466c7 copy: document behavior related to dest creation 2017-08-13 08:22:22 -07:00
Ganesh Nalawade
21bd7bcbb0 junos_interface intent arguments (#27947)
* junos_interface intent arguments

*  Add check for intent argument in junos_interface
*  Integration test for intent arguments

* Minor type fixes

* Add delay only if config diff is present

* add enabled configuration argument

* net_interface test case changes

* Minor doc change
2017-08-13 13:18:15 +05:30
Marko Stanković
6e7cf7377b xml: Add example with namespaces and clarify note (#28113)
* xml: Add example with namespaces and clarify note

* Correct the line length
2017-08-13 05:04:35 +02:00
Toshio Kuratomi
394e1e350c Expand wildcard imports and add boilerplate
More amazon modules with no open PRs.
2017-08-12 10:57:01 -07:00
Pierre-Louis Bonicoli
4ecf85392e udm_user: fix broken import
Tested with:
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
n = datetime.now()
assert n + timedelta(days=365) == n + relativedelta(years=1)
2017-08-12 10:45:12 -07:00
Pierre-Louis Bonicoli
c52f355bcb serverless: fix broken import 2017-08-12 10:39:10 -07:00
Pierre-Louis Bonicoli
dbc422ea1c Fix 'module' object is not callable 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
f9404b0d85 Fix exit_json usage: really call client.auth.logout 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
b556def4d3 Update DOCUMENTATION metadata 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
ac05645bce Remove commented statements 2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
f761fc1d1f rhn_channel: fix py3 compatibility (use six)
and remove unused import
2017-08-12 10:21:14 -07:00
Pierre-Louis Bonicoli
5f62a973da docker_secret: fix broken import 2017-08-12 10:16:05 -07:00
Pilou
feff6abd72 os_client_config: fix broken import (#26839)
* os_client_config: fix broken import
* remove wildcards and add boilerplate
2017-08-12 10:07:49 -07:00
Nick Ward
f52a022022 Python3 compatability for elb_application_lb and elb_target_group 2017-08-12 09:01:29 -07:00
Toshio Kuratomi
9a7e23569e Fix wildcard imports, remove get_exception, add boilerplate
Amazon modules that don't have open PRs against them
2017-08-12 07:43:46 -07:00
Toshio Kuratomi
7cd81b802d Fix wildcard imports, remove get_exception, add boilerplate
Fixed for monitoring modules
2017-08-12 03:13:53 -07:00
Sloane Hertel
aca1950150 iam certificate facts (duplicate): add iam_cert_facts as alias for iam_server_certificate_facts (#25387)
* add iam_cert_facts as alias for iam_server_certificate_facts
* remove from legacy files
2017-08-12 01:44:39 -07:00
Artem Zinenko
6058cb736d rabbitmq_plugin for Windows (#28017)
* Fixes #28016: rabbitmq_plugin for Windows

* Disable documentation check for rabbitmq_plugin.ps1

* Renamed rabbitmq_plugin -> win_rabbitmq_plugin

* Fixed the documentation after review

* Fixed 'RETURN' section

* Fixed docs for original module

* Added dots to original module docs.
2017-08-12 10:35:16 +02:00
Toshio Kuratomi
ac56a2f138 Remove wildcard imports and get_exception calls
Fixed module_utils
2017-08-12 00:48:53 -07:00
T. Miller
93e1caccb7 ini_file: Match tabs before options (#28102) 2017-08-12 09:17:25 +02:00
Peter Sprygada
5ee7862793 update telnet module (#28100)
* accepts list of prompts to expect
* updates doc strings
2017-08-11 23:50:01 -04:00
Brian Coca
40d29936a4 telnet action plugin (#27983)
* draft telnet action plugin

docs in module

* updated per feedback

* fixed imports

* pep8 fixes

* added meta import even though its useless
2017-08-11 22:46:26 -04:00
Toshio Kuratomi
039383d90f Fix symbolic mode usage in unarchive with zip files
Fixes #21090
2017-08-11 19:01:41 -07:00
Toshio Kuratomi
a3132e5dd6 Optimize template (#28044)
* Optimize template

* In fixing template to handle diff correctly #24477, I introduced more
  round trips to the remote end which slowed things down  The new code now
  uses one fewer round trips than the old code.
* Reimplement a large part of template by calling the copy action plugin
  instead of doing it in template's code.  This reduces the code in
  template and gives us one place to fix bugs and optimize.
* Add a follow parameter to template that mirrors the follow parameters
  for file and copy.
* Fix copy's diff handling (probably broken in my rewrite for in 2.4
  development)
* Adjusted when copy creates tmp dirs to rduce round trips in copy and
  template.

Fixes #27956
2017-08-11 17:50:49 -07:00
Jacob McGill
8b92369678 Update aci_tenant to support check_mode (#28090) 2017-08-11 18:51:49 -04:00
Jacob McGill
c04349088e update aci module util with methods to support check_mode and idempotency (#28089) 2017-08-12 00:27:29 +02:00
Jason Lingohr
3d29f79e74 Documentation fixes. (#28047)
* Documentation fixes.

* Update win_route.py
2017-08-11 23:41:58 +02:00
chriskarel
991918e9d2 Fix idempotency for Unix permissions in zip files. (#24580)
* Fix idempotency for Unix permissions in zip files.

This fix prevents the unarchive module from reporting 'changed' when a zipfile contains items with Unix permissions that differ from the system default.

* Update zip unarchive tests.

Additional tests for the unarchive module with zip files:
- Test file in zip archive with non-default permissions
- Test file added to zip archive with Windows permissions

* Additional fix for mixed win/unix archives.

  Turns out my original fix fails under some mixed archives, as setting the umask to zero can be applied to those files.  This creates a per-file umask variable, so a mix of permission types don't cause problems.

* CI Checks

CI checks for archives with:
* non default Unix permissions
* Windows permissions


* Workaround for BSD differences.

Using Zipinfo due to lack of support in BSD unzip.
Permissions handling is also different in BSD -- always applies UMASK to file permissions.

* Added checks for creating directories and SSH keys for existing users.
2017-08-11 12:36:46 -07:00
Sloane Hertel
3cb1c38ecc [cloud] Allow S3 module to correctly delete objects by groups of <= 1000 (#28068) 2017-08-11 15:30:50 -04:00
Brian Coca
d89dd75769 validate include_role args (#28077)
* validate include_role args

* nicer error msg

* removed unused static

* updated as per feedback

* pepe ATE
2017-08-11 15:21:12 -04:00
Jacob McGill
21dbde0abe fix issue with trailing white space when logging into asa (#28073) 2017-08-11 12:30:57 -04:00
Trishna Guha
aef4e3d8fa fix nxos_snapshot (#27993)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-11 12:16:37 -04:00
Peter Sprygada
17a259a163 fixes command to be sent over nxapi for nxos_file_copy (#28029)
fixes #27347
2017-08-11 12:14:52 -04:00
Patrick Ogenstad
089226e372 Fixes for broken asa_config module (#27218)
* Fixes for broken asa_config module

* strip() prompt before checking
2017-08-11 11:42:42 -04:00
Sloane Hertel
40eb349ac6 [cloud] Make ec2_asg more resilient using AWSRetry around boto3 calls (#27598)
* Add AWSRetry to ec2_asg

* Paginate describing ASGs and launch configurations

pass connection to delete_asg

Fix a couple little bugs

* Use boto3's pagination build_full_result()
2017-08-11 11:30:23 -04:00
Thomas Stringer
e4cd899363 Add support for Azure 2.0.0 (#27920)
* Adapt azure_rm_resource_group to azure 2.0.0 + azure Cli support

* Fix exceptions in Azure ARM plugins

* update azure_rm_networkinterface documention to reflect required params

* change state param to not required for docs in azure_rm_subnet

* fix import to reflect azure==2.0.0 changes

* add aliases and fix docs for azure_rm_storageblob

* add resource_group_name alias to azure_rm_storageaccount_facts

* fix import bug due to change in azure==2.0.0

* fix args bug and enum modules issue

* update docs to reflect azure==2.0.0

* pin management clients to a specific api_version

* update docs to reflect the new azure-ansible-base python package

* add fallback for older api resource group listing

* rework azure dependencies installation

* refactor path joining to a cross-plat solution
2017-08-11 08:22:02 -07:00
Michael Price
1b9d9376e2 Refactor E-Series Hosts module to use module_utils (#20893)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
2017-08-11 11:05:52 -04:00
Brandon Schlueter
0e334ca821 Don't compare group_vars paths with bytestrings (#27922)
* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
2017-08-11 10:21:20 -04:00
Nathaniel Case
0464a21a85 Fix nxos_snmp_contact, others (#28000)
* Fix nxos_snmp_contact

Fixes #27714

* Fix nxos_snmp_community

Fixes #27711

* Fix nxos_install_os

Fixes #27604

* Update nxos_ntp_auth

Fixes #27521

* Fix nxos_igmp_snooping

Fixes #27501
2017-08-11 10:12:43 -04:00
Sloane Hertel
1de91a9aa0 [cloud] Convert s3 module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
2017-08-11 09:34:33 -04:00
Michele Zuccala
7d1308b0d8 [cloud] ovirt: add headers param to auth (#27881)
* Add filter param to ovirt module auth

* Update docs to include new filter param

* Fix broken YAML

* Replace filter param with headers
2017-08-11 09:31:20 -04:00
giovannisciortino
49209bfcc5 blockinfile: add --diff support in check mode (#27997) 2017-08-11 07:58:45 +02:00
Rich Murphey
88ccaf106b use of multiple chocolatey package names (#28046)
* use of multiple chocolatey package names

It might be helpful to users, to clarify whether/when <name:> must specify a single package.

Users who are familiar with chocolatey may be accustomed to installing multiple packages in a single invocation of 'choco install'.

I believe win_chocolatey currently accepts multiple package names when state: is latest or present.
For instance, this appears to work currently:

  - win_chocolatey:
      name: >-
        pscx
        windirstat
      state: latest

However, when state: is absent, uninstall is not performed if multiple package are specified.
The chocolate.log output suggests that chocolatey is treating the multiple packages as an 'exact' name of a single package name:
2017-08-10 19:04:04,087 2424 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" list --local-only --exact pscx windirstat
2017-08-10 19:04:04,087 2424 [DEBUG] - Received arguments: list --local-only --exact pscx windirstat

I find the current behavior helpful in terms of accepting multiple package names, even if uninstall must be treated differently.
It might be helpful to show an example of how multiple uninstalls can be handled by looping over them. 

  - win_chocolatey:
      name: "{{ item }}"
      state: absent
    with_items:
      - pscx
      - windirstat

* revise per Jordan Borean. remote colon (:) from text. revise formating.

* Update win_chocolatey.py
2017-08-11 12:36:14 +10:00
Nathan Hyde
241d38077f Use ChocolateyInstall env variable after installation (#27812)
* Use ChocolateyInstall env variable after installation

Fixes #19725 Custom install locations specified by the ChocolateyInstall
env variable in win_chocolatey

After an initial install of chocolatey, use the ChocolateyInstall
environment variable when assigning $script:executable .

* Improve process of locating "choco.exe" post-initial install

Implement feedback for locating choco:

* Check if choco.exe is in PATH, if there use this
* If not in path and ChocolateyInstall var is available, use that
* Otherwise, use the equivalent of Windows Special Folder CommonApplicationData for locating chocolatey.
  (Chocolatey install (v0.10.7) uses CommonApplicationData when ChocolateyInstall is not set.)
2017-08-11 11:28:13 +10:00
Dave
4cec83471c win_get_url.ps1 - enable TLS1.1/TLS1.2 if they're available but disabled (#26833) 2017-08-11 11:00:34 +10:00
Nick Chandler
22533c0932 New module: Add module or managing Windows Active Directory users (windows/win_domain_user) (#24075)
* Initial win_domain_user module support

* Add return information

* Update return values

* Add try/catch for PS module import

* Improve win_domain_user module

* Fix bad merge

* Fix pep8 failure

* Actually fix pep8 failure

* Update win_domain_user.py to meet standards

* Add check_mode support for win_domain_user

* Updated documentation before merge
2017-08-11 10:23:09 +10:00
Peter Sprygada
edc3507c98 restore the ability to issue commands over junos cli (#28025)
* restore the ability to issue commands over junos cli

* add warn message for invalid arguments

* fix issue when checking if provider transport is set
2017-08-10 17:57:32 -04:00
Jordan Borean
5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
2017-08-11 07:57:07 +10:00
Jordan Borean
44ed891290 win_mapped_drive: new module (#27020)
* win_mapped_drive: new module

* Rebased from upstream and updated copyright text
2017-08-11 07:54:18 +10:00
Jordan Borean
e46adece48 win_user_right: add module with tests (#26276)
* win_user_right: add module with tests

* fixed up name of module in docs

* forgot the test module

* fixed up whitespace

* changes made to win_user_right based on feedback

* moved away from using secedit to Win32 with P/Invoke

* tidied up copyright for documentation
2017-08-11 07:52:07 +10:00
Ganesh Nalawade
3b0e9ded91 Fix fallback and boolean check in argspec (#27994)
Fixes #27978

*  Add missing assignment for param key in fallback handling
*  Add check for frozenset type
*  Unit testcase
2017-08-10 12:10:18 -07:00
Philip Gough
fee42a01d9 Redhat subscription proxy support (#22544) 2017-08-10 20:26:57 +02:00
David Newswanger
d0485779e8 nxos_smu: fix Structured output unsupported error in nxapi (#27976)
* fixed structured output unsupported error
2017-08-10 14:12:15 -04:00
Ricardo Carrillo Cruz
e8f1c1511c Implement purge on eos_vrf (#28013) 2017-08-10 19:59:32 +02:00
Martin Krizek
1c4e491eac yum: do not hide yum's errors (#27696) 2017-08-10 13:57:08 -04:00
Rémi REY
7974ad34f1 add playbook runtime stat in the logstash callback stats (#25785) 2017-08-10 13:43:21 -04:00
Raphael Nestler
ac0202fba1 win_file: Remove 'Create a file' example (#28009)
Fixes #28005
2017-08-10 13:30:37 -04:00
Peter Sprygada
145895dcf0 updates examples and documentation (#24211)
includes better examples of valid and invalid usage of the lines
argument

fixes #22828
2017-08-10 13:09:53 -04:00
Peter Sprygada
d8b005ec65 updates the prompt regexp for prompt handling in sros (#28015)
* thanks to @jurajama for tracking this down and providing the fix
* fixes #24192
2017-08-10 12:59:49 -04:00
Brian Coca
2015835759 updated author with github id 2017-08-10 11:42:49 -04:00
Dag Wieers
8451d945aa Add new maintainer 2017-08-10 17:11:55 +02:00
Luke Armstrong
fd18ade465 Documentation - modules/files/unarchive (#27998)
Last example is incorrect and will not run without throwing an error.
2017-08-10 10:32:08 -04:00
Juan Manuel Parrilla
2cfb30fc91 Fixes #24414, Added support for a ETCD folders (#24432) 2017-08-10 07:44:05 -06:00
Adrian Likins
220db9cdd2 Better vault pass prompt behav on EOF, more unit tests (#27981) 2017-08-10 09:34:57 -04:00
Adrian Likins
82f550e8cd Add prompt formats for 2.3 compat ask-vault-pass (#27974)
The prompt_formats dict didn't get the 'prompt_ask_vault_pass'
item added for interactive --ask-vault-pass, which
caused "KeyError: u'prompt_ask_vault_pass'"

Fixes #27885
2017-08-10 09:34:16 -04:00
Valentin Krasontovitsch
cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
2017-08-10 09:25:56 -04:00
Brian Coca
13d2eb6568 fix incorrect joingin of command for chpasswd
fixes #24638
2017-08-10 09:23:13 -04:00
Peter Sprygada
c4da61239d stops trying to filter out commands from config (#28002)
* stops trying to filter out commands from config

fixes #24874

* fix up pep8 issues and remove offending function
2017-08-10 09:18:44 -04:00
Nathaniel Case
ed8a5af3dc nxos_bgp: Fix idempotence for event-history (#27329)
* Fix idempotence for event-history

* `event-history detail` defaults to `False`, the rest to `size_small`
2017-08-10 08:55:43 -04:00
Lukas Bednar
29891bff19 ovirt_templates: fixed typo in doc (#27883) 2017-08-10 08:32:36 -04:00
Lukas Bednar
a48a7eecc8 ovirt_templates: added option to name imported disk as a template (#27902)
* ovirt_templates: added option to name imported disk as a template

* ovirt_templates: added version_added to new attribute

* ovirt_templates: added alias for image_name and example

* added alias glance_image_disk_name for image_name
* example how to import image from glance as template
* improve description of template_image_disk_name
2017-08-10 08:32:25 -04:00
Abhijeet Kasurde
f7321a87ca Pep8 fixes for rabbitmq modules (#24590)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-10 11:57:11 +02:00
Ricardo Carrillo Cruz
7e2169f6d5 Add aggregate functionality to eos_vrf (#27915)
* Add aggregate functionality to eos_vrf

* Add tests for eos_vrf aggregate option

* Remove test2 and test3 vrfs at the beginning of the eos_vrf tests

* Pull all vrfs

With aggregate, we need to get all VRFs and we then compare with
desired VRFs, instead of assuming it will be just one.
2017-08-10 10:54:13 +02:00
Dag Wieers
eee09565b1 utilities modules: PEP8 compliancy (#27741) 2017-08-10 09:36:28 +01:00
Simon Dodsley
f30589c91d purefa_volume: Fix typo in required_if (#27921) 2017-08-10 09:34:45 +02:00
Marc Sensenich
38d026b1db New Module: Notification module for Office 365 Connector Cards (#27636)
* New Module: Notification module for Office 365 Connector Cards (notification/office_365_connector_card)

* Updates per review

* Added connection check when in check mode
2017-08-10 04:04:49 +02:00
Philippe Dellaert
920cd7bb1c New module: Waiting for VMware tools to become available (#27236)
* Adding VMware tools module
Functionality: Waits for VMware tools to become available (running
state)

* Adding base integration test preparations
Until govcsim supports actual guest tool status, the tests are disabled

* Cleanup and better getvm method

* Updating Changelog

* Adding required metaclass and future import

* Rename to vmware_guest_tools_wait

* Cleanup of documentation

* Fixing review remarks
2017-08-10 03:50:58 +02:00
giovannisciortino
064c3b837f Fixes #27836: get_url check if directory exists (#27852) 2017-08-10 09:57:19 +10:00