Commit graph

16637 commits

Author SHA1 Message Date
QijunPan
365f816e46 Contributing lib/ansible/modules/network/cloudengine/ce_evpn_bgp.py module to manage HUAWEI data center CloudEngine (#21759)
* commit ce_evpn_bgp.py

commit ce_evpn_bgp.py

* update ce_evpn_bgp

update ce_evpn_bgp

* fix CI issues
2017-05-19 16:51:51 +01:00
QijunPan
ea0060ba64 Contributing lib/ansible/modules/network/cloudengine/ce_netstream_global.py module to manage HUAWEI data center CloudEngine (#21817)
* add ce_netstream_global module

add ce_netstream_global module

* update ce_netstream_global

update ce_netstream_global

* fix CI issues

* fix pep8 error
2017-05-19 16:50:53 +01:00
QijunPan
4ef5177e62 Contributing lib/ansible/modules/network/cloudengine/ce_netstream_export.py module to manage HUAWEI data center CloudEngine (#21816)
* add ce_netstrem_export module

add ce_netstrem_export module

* update ce_netstream_export

update ce_netstream_export

* fix CI issues
2017-05-19 16:50:01 +01:00
QijunPan
c291e5d895 Contributing lib/ansible/modules/network/cloudengine/ce_acl.py module to manage HUAWEI data center CloudEngine (#21815)
* add ce_acl module

add ce_acl module

* update ce_acl.py

update ce_acl.py

* fix CI issues
2017-05-19 16:49:31 +01:00
QijunPan
e2cd0ee18b Contributing lib/ansible/modules/network/cloudengine/ce_netstream_aging.py module to manage HUAWEI data center CloudEngine (#21761)
* commit ce_netstream_aging

commit ce_netstream_aging

* update ce_netstream_aging

update ce_netstream_aging

* update ce_netstream_aging

update ce_netstream_aging

* fix CI issues
2017-05-19 16:48:43 +01:00
QijunPan
594dcbcaa2 Contributing lib/ansible/modules/network/cloudengine/ce_evpn_global.py module to manage HUAWEI data center CloudEngine (#21760)
* commit ce_evpn_global

commit ce_evpn_global

* update ce_evpn_global

update ce_evpn_global

* fix CI issues
2017-05-19 16:47:36 +01:00
QijunPan
04d5a80f96 Contributing lib/ansible/modules/network/cloudengine/ce_aaa_server_host.py module to manage HUAWEI data center CloudEngine (#21758)
* commit ce_aaa_server_host.py

commit ce_aaa_server_host.py

* update ce_aaa_server_host.py

* fix CI issues
2017-05-19 16:27:47 +01:00
QijunPan
0fe0538a43 Contributing lib/ansible/modules/network/cloudengine/ce_command.py module to manage HUAWEI data center CloudEngine (#21669)
* update ce_command.py

update ce_command.py

* update ce_command

update ce_command

* update ce_command.py

update ce_command.py

* update ce_command module

update ce_command module

* update ce_command module

update ce_command module
2017-05-19 16:22:20 +01:00
Sergey Bondarev
f39fa7fd22 fix from https://github.com/ansible/ansible/pull/23001 2017-05-19 09:41:09 -04:00
Sergey Bondarev
72fc9f5cbe fix deprecation import ansible.vars.unsafe_proxy to ansible.utils.unsafe_proxy 2017-05-19 09:41:09 -04:00
Niall Donegan
29fb573fd6 Tiny Typo Fix (#24828) 2017-05-19 14:31:02 +01:00
Abhijeet Kasurde
d4857ed6c4 Add Password for login method in github_release (#23661)
Fix allows user to specify username and password for
using github_release to perform various operations

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-19 08:49:05 +01:00
QijunPan
6352a54f19 Contributing new lib/ansible/plugins/terminal/ce.py module to manage HUAWEI data center CloudEngine switch (#21653)
* commit plugins terminal ce.py module

commit plugins terminal ce.py module

* update plugins/terminal/ce.py

update plugins/terminal/ce.py

* deal with pep8 error
2017-05-19 08:43:37 +01:00
QijunPan
ad85f2b483 Contributing new /lib/ansible/plugins/action/ce_template.py module to manage HUAWEI data center CloudEngine switch (#21649)
* commit plugins action ce_template.py

commit plugins action ce_template.py

* deal with pep8 error
2017-05-19 08:42:55 +01:00
QijunPan
627ac2493d commit plugins action ce_config module. (#21648)
commit plugins action ce_config module.
2017-05-19 08:42:36 +01:00
Gaurav Rastogi
32b4eab3dc Avi module to setup GSLB Geo DB profile. (#24812) 2017-05-19 08:34:12 +01:00
Gaurav Rastogi
ea6955109b New module to setup HTTP Policy set objects (#24813) 2017-05-19 08:33:37 +01:00
Gaurav Rastogi
1960aa8d96 New module to setup GSLB Application persistence profile (#24814) 2017-05-19 08:31:49 +01:00
Gaurav Rastogi
e90d63edd1 New Avi Module for setup of network security policy (#24815) 2017-05-19 08:31:00 +01:00
Gaurav Rastogi
d6e2943c97 New Avi Module to setup virtualservice datascripts (#24818) 2017-05-19 08:30:19 +01:00
Gaurav Rastogi
b26bc5be88 New Avi Module to setup DNS policies. (#24819) 2017-05-19 08:29:34 +01:00
Gaurav Rastogi
788e2efe2a New Avi Module to setup various controller properties. (#24811) 2017-05-19 08:29:00 +01:00
Gaurav Rastogi
fd94b5b20d New Avi Module to setup SE properties. (#24816) 2017-05-19 08:28:26 +01:00
Gaurav Rastogi
b44f3cbcf6 New Avi Module to setup user account profile settings. (#24817)
* New Avi Module to setup user account profile settings.

* removed blank line failing pep8
2017-05-19 08:27:48 +01:00
Gaurav Rastogi
61882cfdfa New Avi Module to create VIP objects that can be used in shared VIP and multiple VIP use cases for application deployment. (#24809) 2017-05-19 08:26:22 +01:00
QijunPan
d53136cf1b Contributing lib/ansible/modules/network/cloudengine/ce_ntp_auth.py module to manage HUAWEI data center CloudEngine (#22058)
* add ce_ntp_auth

add ce_ntp_auth

* fix review issues
2017-05-19 08:24:40 +01:00
QijunPan
21b778ddb0 Contributing lib/ansible/modules/network/cloudengine/ce_ospf.py module to manage HUAWEI data center CloudEngine (#22059)
* add ce_ospf

add ce_ospf

* upgrade OSPF

* fix review issues.
2017-05-19 08:24:22 +01:00
QijunPan
f8193622d6 Contributing lib/ansible/modules/network/cloudengine/ce_reboot.py module to manage HUAWEI data center CloudEngine (#22060)
* add ce_reboot

add ce_reboot

* fix review issues.

* update requirements.
2017-05-19 08:23:48 +01:00
QijunPan
7353b357e9 Contributing lib/ansible/modules/network/cloudengine/ce_rollback.py module to manage HUAWEI data center CloudEngine (#22061)
* add ce_rollback

add ce_rollback

* fix review issues
2017-05-19 08:23:30 +01:00
QijunPan
954906c143 Contributing lib/ansible/modules/network/cloudengine/ce_snmp_location.py module to manage HUAWEI data center CloudEngine (#22065)
* add ce_snmp_location.py

* fix review issues
2017-05-19 08:23:13 +01:00
QijunPan
9b20d6ac34 Contributing lib/ansible/modules/network/cloudengine/ce_sflow.py module to manage HUAWEI data center CloudEngine (#22062)
* add ce_sflow

add ce_sflow

* fix review issue
2017-05-19 08:22:51 +01:00
QijunPan
3927341872 Contributing lib/ansible/modules/network/cloudengine/ce_snmp_target_host.py module to manage HUAWEI data center CloudEngine (#22066)
* add ce_snmp_target_host

* fix review issues.
2017-05-19 08:22:34 +01:00
QijunPan
dda49ca7c9 Contributing lib/ansible/modules/network/cloudengine/ce_snmp_traps.py module to manage HUAWEI data center CloudEngine (#22067)
* add ce-snmp_traps

* fix review issues

* fix pep8 error
2017-05-19 08:22:19 +01:00
QijunPan
0172522406 Contributing lib/ansible/modules/network/cloudengine/ce_snmp_user.py module to manage HUAWEI data center CloudEngine (#22069)
* add ce_snmp_user.py

* upgrade snmp user

* fix review issues

* fix review issue

* fix CI issue

* fix CI issue
2017-05-19 08:21:55 +01:00
QijunPan
45fda73653 Contributing lib/ansible/modules/network/cloudengine/ce_vxlan_global.py module to manage HUAWEI data center CloudEngine (#22082)
* add ce_vxlan_global.py

* upgrade Vxlan Global

* metadata_version update
2017-05-19 08:21:42 +01:00
QijunPan
1c0d74339a Contributing lib/ansible/modules/network/cloudengine/ce_vxlan_tunnel.py module to manage HUAWEI data center CloudEngine (#22083)
* add ce_vxlan_tunnel.py

* update

* upgrade Vxlan Tunnel

* metadata_version update

* deal with review issue.

* deal with review issue
2017-05-19 08:21:27 +01:00
Michael Scherer
f88c2b8ac5 Fix wrongly named variable, introduced by error on ac1017b7ad (#24795)
This broke ansible-playbook -D for template module
2017-05-18 22:29:05 -07:00
Trishna Guha
21e28a431b Remove unused method from nxos_ospf (#24820) 2017-05-19 10:57:16 +05:30
Trishna Guha
998305a493 nxos_ospf_vrf fix and unittest (#24495) 2017-05-19 10:09:46 +05:30
Matt Martz
1eed6c5b3d Convert some more base64 strings to text for winrm, to support async and become (#24796) 2017-05-18 16:06:51 -07:00
Lee Shakespeare
def76a3c3b Lookup credential id and pass in credential rather than scm_credential (#24624)
* Lookup credential id and pass in credential rather than scm_credential

* Change the excepting handling to catch missing credentials

* Make error messages for not found lookups more useful
2017-05-18 15:44:33 -07:00
QijunPan
1487ec0ea2 Contributing lib/ansible/modules/network/cloudengine/ce_vxlan_gateway.py module to manage HUAWEI data center CloudEngine (#22081)
* add ce_vxlan_gateway.py

* metadata_version update

* deal review issues
2017-05-18 23:12:04 +01:00
QijunPan
b20c550426 Contributing lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py module to manage HUAWEI data center CloudEngine (#22080)
* add ce_vxlan_arp.py

* metadata_version update

* deal review issues
2017-05-18 23:11:42 +01:00
QijunPan
a8475f6ef5 Contributing lib/ansible/modules/network/cloudengine/ce_vrf_interface.py module to manage HUAWEI data center CloudEngine (#22079)
* add ce_vrf_interface.py

* metadata_version update

* fix code review issues

* fix ci_verified

* tab to space
2017-05-18 23:11:09 +01:00
QijunPan
cb75f2a43d Contributing lib/ansible/modules/network/cloudengine/ce_vlan.py module to manage HUAWEI data center CloudEngine (#22076)
* add ce_vlan.py

* metadata_version update

* fix review issues

* Update ce_vlan.py

* fix check issue

required_if not work well when the option value is "not None"
2017-05-18 23:10:11 +01:00
QijunPan
fb54e47491 Contributing lib/ansible/modules/network/cloudengine/ce_switchport.py module to manage HUAWEI data center CloudEngine (#22075)
* add ce_switchport.py

* metadata_version update

* fix review issues

* fix review issue

* fix CI issue
2017-05-18 23:09:49 +01:00
QijunPan
a1cbecd23c Contributing lib/ansible/modules/network/cloudengine/ce_stp.py module to manage HUAWEI data center CloudEngine (#22073)
* add ce-stp

* fix review issues

* fix CI issues
2017-05-18 23:09:26 +01:00
QijunPan
55d0f97ace Contributing lib/ansible/modules/network/cloudengine/ce_snmp_contact.py module to manage HUAWEI data center CloudEngine (#22064)
* add ce_snmp_connect

add ce_snmp_connect

* fix review issues
2017-05-18 23:08:05 +01:00
QijunPan
f5fc565721 Contributing lib/ansible/modules/network/cloudengine/ce_startup.py module to manage HUAWEI data center CloudEngine (#22070)
* add ce_startup

add ce_startup

* fix review issues
2017-05-18 23:07:16 +01:00
Lars Larsson
53baa36a8b [cloud][GCE] fix bug in persistent disk snapshot naming (#23218)
snapshot_name keeps on prepending the device_name to the same string if more than one device.
result is: disk3-disk2-disk1-MySnapshot
2017-05-18 16:08:14 -04:00
Tim Rupp
c1397626fc Adds the bigip_user module to Ansible (#24753)
The patch adds the bigip_user module to Ansible to support managing
users on an F5 BIG-IP.

Unit tests are provided. Integration tests can be found here

  * https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_user.yaml
  * https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_user/tasks
2017-05-18 20:21:18 +01:00
Matt Davis
569377e951 add segfault detection to TQM
* prevents indefinite hangs when a worker segfaults
2017-05-18 14:59:07 -04:00
QijunPan
ba3a0e8e34 Contributing lib/ansible/modules/network/cloudengine/ce_snmp_community.py module to manage HUAWEI data center CloudEngine (#22063)
* add ce_snmp_community

add ce_snmp_community

* upgrade snmp community

* fix review issues
2017-05-18 19:46:45 +01:00
Tom Melendez
13f2d9222f [GCP] Global Load Balancer Integration Test (#24704)
* Revert to using url_map internal to the module to allow parameter generation to work. module parameter is still url_map_name.

* [GCP] Cross Region Load Balancer Integration Test
2017-05-18 14:00:51 -04:00
Dag Wieers
c4a7f64c02 ansible/galaxy: PEP8 compliancy (#24696)
- Make PEP8 compliant
2017-05-18 18:43:35 +01:00
Dag Wieers
6f6bdf7914 ansible/parsing: PEP8 compliancy (#24701)
- Make PEP8 compliant
2017-05-18 18:41:00 +01:00
Tom Melendez
c99c3b2b5d [GCP] Healthcheck module (#24564)
* [GCP] Healthcheck module

* fix return YAML block

* removed update_ return value; removed python26 check; typos and docs updates

* doc fix

* Updated int test for no-update conditions

* added filter_gcp_fields test

* fixed bug in update where dictionary wasn't built correctly and port was not being set.

* added default values to documentation block
2017-05-18 12:49:50 -04:00
John R Barker
ed2f13b3db Fix more module returns (#24782)
* Correct return structure

* typo
2017-05-18 17:38:10 +01:00
Tom Melendez
3fbf3b51ff [GCP] remove ansible.utils.display for deprecations (#24738)
* [GCP] remove ansible.utils.display for deprecations, use module.deprecate instead.

* removed test file from legacy files
2017-05-18 12:07:16 -04:00
Dylan Silva
bba4549b43 Downgraded more modules from Curated to Community (#24751) 2017-05-18 08:28:41 -07:00
Will Thames
5741712a09 ec2_group_facts tag list should have case preserved (#24760)
Tags should retain case, and should not be snake cased.
Easiest way to do this is to snake before converting tag
list as while that affects the keys of the boto3 tag lists,
it doesn't affect the values. Need to use `tag_value_key_name`
and `tag_name_key_name` following recent change to
`boto3_tag_list_to_ansible_dict`, which used to handle both
`key`/`Key` and `value`/`Value`
2017-05-18 09:34:53 -04:00
Trishna Guha
feafae70b5 Fix transport getting set to None when not set explicitly (#24769)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-05-18 15:11:09 +05:30
Dag Wieers
ac1017b7ad ansible/constants: PEP8 compliancy (#24692)
- Make PEP8 compliant
2017-05-18 10:39:01 +01:00
Dag Wieers
37bfca23c9 slurp: PEP8, imports, cosmetics (#24677)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-05-18 08:40:24 +01:00
Dag Wieers
de907a8e36 ansible/compat/: PEP8 compliancy (#24689)
- Make PEP8 compliant
2017-05-18 08:36:11 +01:00
Dag Wieers
ac27c54c2e ansible/errors: PEP8 compliancy (#24693)
- Make PEP8 compliant
2017-05-18 08:34:57 +01:00
Dag Wieers
7a5e46c732 aix_lvol: PEP8, imports, cosmetics (#24717)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-05-18 08:31:07 +01:00
James Cammarata
5728bd9065 Merge branch 'modules_issue_1568' of https://github.com/ajdecon/ansible into ajdecon-modules_issue_1568 2017-05-18 02:28:08 -05:00
Dag Wieers
6b7d669a2b win_psexec: Change default for -nobanner (#24739)
* win_psexec: Change default for -nobanner

* Update documentation too
2017-05-18 08:25:38 +01:00
Abhijeet Kasurde
2f955e7da8 Save commit_timeout as string in junos_config (#24761)
Fix converts commit_timeout to string as
Elementree.SubElement requires text as string.

Fixes #24611

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-18 12:38:26 +05:30
Matt Martz
e7d8ebf080 Base changes required to allow winrm to work on py3 (#24744) 2017-05-17 14:26:32 -07:00
James Cammarata
f217dae938 Also check the iterator for failed host status in linear strategy
When only looking at the failed state of the TaskResult, certain failures
cause the linear strategy to fail out sooner than it should and not execute
the always portion of blocks.

Fixes #24301
2017-05-17 13:41:29 -05:00
Lee Shakespeare
e2c08edfcc Tower user remove organization (#24544)
* Remove organization field from the tower_user module re: issue #24510

* Fix trailing spaces.

* Fixes for Shippable errors, pep8

* Remove a random inserted space.
2017-05-17 14:30:14 -04:00
QijunPan
40c2b8cac9 Contributing new lib/ansible/module_utils/ce.py module to manage HUAWEI data center CloudEngine switch (#21666)
* add module_utils ce.py

add module_utils ce.py

* update module_utils/ce.py to support netconf

update module_utils/ce.py to support netconf

* update module_utils ce.py

update module_utils ce.py
2017-05-17 18:36:34 +01:00
Monty Taylor
6e85ac2ba6 Deal with server.security_groups being None (#24742)
It shouldn't happen - but there is a bug in shade where it can be None
but should be [] instead. Work around it.

Fixes #24675
2017-05-17 12:17:31 -05:00
Jonathan Mainguy
3ad09604f2 add catapult as a sms /mms api notification provider. (#23052) 2017-05-17 16:23:38 +01:00
Ganesh Nalawade
38eeeb755d Add ios changes for Python3 (#24601)
* Add ios changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
pep8 fixes

* Fix CI issues

* Fix review comment
2017-05-17 20:00:52 +05:30
Jose Armesto
3eb8142a41 [cloud] Fixes #24578: ROLLBACK_COMPLETE is a failure state for CloudFormation module (#24596)
* ROLLBACK_COMPLETE is a failure state

Fixes #24578

* Adding AWS documentation on Stack status

* Fixed comment
2017-05-17 09:17:47 -04:00
Andrea Tosatto
b230b03045 [cloud] Rebase and fix ENI lookup logic to only hit unique ENIs (rebase of #20039) (#23404)
* fix eni lookup logic to update them only when univocally specified (Fixes #19972)

remove redundant eni lookup

* Rename the univocally_find_eni method to uniquely_find_eni

* Idempotency logic minor fixes

* Fixing pep8 reported issues

* Adding a required_together constraint for instance_id and device_index

* Fix ec2_eni private_ip_address matching

* Adding an example of matching via subnet_id and private_ip_address

* Removing the required_together and subnet_id constraints

* Addding some notes to explain the module assumptions

* Implementing Ryan's wording proposal
2017-05-17 08:54:37 -04:00
Abhijeet Kasurde
ad41d0e88f Pep8 fixes for parted (#24713)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-17 09:23:41 +01:00
Trishna Guha
8937246f8f Fix nxos ospf and Unit test (#24613)
* nxos_ospf fixes refactor

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

* unit test nxos_ospf

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-05-17 11:16:41 +05:30
QijunPan
05d8b64cc9 Contributing lib/ansible/modules/network/cloudengine/ce_vrf_af.py module to manage HUAWEI data center CloudEngine (#22078)
* add ce_vrf_af.py

* upgrade ce vrf af

* metadata_version update

* fix review issues

* fix CI issues
2017-05-16 22:52:41 +01:00
QijunPan
a8570db624 Contributing lib/ansible/modules/network/cloudengine/ce_ntp.py module to manage HUAWEI data center CloudEngine (#22057)
* add ce_ntp

add ce_ntp

* fix review issues

* deal pep8 issues
2017-05-16 22:51:09 +01:00
QijunPan
7722b95dd4 Contributing lib/ansible/modules/network/cloudengine/ce_static_route.py module to manage HUAWEI data center CloudEngine (#22072)
* add ce_static_route

add ce_static_route

* upgrade Static Route

* fix review issues

* fix CI issues

* fix CI issue

* fix CI issue
2017-05-16 22:49:37 +01:00
QijunPan
d7e6a6bff3 Contributing lib/ansible/modules/network/cloudengine/ce_vrf.py module to manage HUAWEI data center CloudEngine (#22077)
* add ce_vrf.py

* update ce_vrf.py

update ce_vrf.py

* upgrade vrf

* metadata_version update

* fix review issues

* fix RETURN doc
2017-05-16 22:48:10 +01:00
QijunPan
7bb64bb9a4 Contributing lib/ansible/modules/network/cloudengine/ce_vxlan_vap.py module to manage HUAWEI data center CloudEngine (#22084)
* add ce_vxlan_vap.py

* metadata version upate

* fix fail_json msg
2017-05-16 22:46:45 +01:00
QijunPan
45f05ca8aa Contributing lib/ansible/modules/network/cloudengine/ce_mlag_interface.py module to manage HUAWEI data center CloudEngine (#22055)
* add ce_mlag_interface

add ce_mlag_interface

* upgrade ce mlag interface

* fix CI issues
2017-05-16 22:44:49 +01:00
QijunPan
fbeec055a4 Contributing lib/ansible/modules/network/cloudengine/ce_netconf.py module to manage HUAWEI data center CloudEngine (#22056)
* add ce_netconf

add ce_netconf

* update

* upgrade netconf

* fix review issues

* fix review issue.
2017-05-16 22:43:33 +01:00
Ricardo Carrillo Cruz
14b1405ee4 Fix conn_type assignment (#24697)
This should be a single equal, not a double-one
2017-05-16 23:14:17 +02:00
Brandon Davidson
0210a1a7dc [cloud] Add vpc_id option for ec2_lc security group lookups by name (#24459) 2017-05-16 16:46:28 -04:00
Daniel Shepherd
cf4806d29d [cloud] Update AWS CloudTrail module to use boto3 and updated/new CT parameters (#22884)
remove cloudtrail.py from legacy-files as it passes pep8 tests now

update return values to use snake case per coding guidelines

update boto3 exception handling to use method outlined in coding guidelines

update parameter spec and return value code per PR code review
2017-05-16 16:45:03 -04:00
Tom Melendez
07c55b855a [GCP] Forwarding Rule module (#24627)
* [GCP] Forwarding Rule module

* pep8 formatting for tests

* remove py26 check and updated_ key; docs and typo fixes
2017-05-16 16:40:34 -04:00
Tom Melendez
29decad261 [GCP] Target Proxy Module (#24527)
* [GCP] Target Proxy Module

* pep8 fix

* updates from review: removed 26 check, fix get method, typos, renamed url_map to url_map_name

* removed blank line
2017-05-16 15:25:12 -04:00
Ganesh Nalawade
e52d06b401 Add dellos9 changes for Python3 (#24607)
* Add dellos9 changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

* Minor changes
2017-05-17 00:36:52 +05:30
Ganesh Nalawade
a883635aeb Add dellos6 changes for Python3 (#24606)
Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
2017-05-17 00:36:32 +05:30
Ganesh Nalawade
442df927f1 Add dellos10 changes for python3 (#24608)
Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
2017-05-17 00:36:15 +05:30
Ganesh Nalawade
a3c689bf0d Add sros changes for Python3 (#24604)
* Add sros changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

Code cleanup
pep8 fixes

* Fix CI issue
2017-05-17 00:33:36 +05:30
Ganesh Nalawade
16d610c1de Add vyos changes for Python3 (#24603)
* Add vyos changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
pep8 fixes

* Fix CI issues
2017-05-17 00:32:59 +05:30
Ganesh Nalawade
f4e1dc503b Add iosxr changes for Python3 (#24605)
* Add iosxr changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

* Fix CI issue
2017-05-17 00:32:41 +05:30
Dag Wieers
4f29662a9e ansible/vars/: PEP8 compliancy (#24685)
- Make PEP8 compliant
2017-05-16 18:51:27 +01:00
jctanner
bfc551b3f8 Add vmware_guest_find.py module (#24260)
* Add vmware_guest_find.py module

* Fixup linter errors

* Add missing empty line
2017-05-16 08:48:40 -07:00
Lemar Carthens
ef13f0f389 vmware_guest: Fix VM creation when adding a network device without a MAC address (#24138)
* vmware_guest: Fix VM creation when adding a network device without a MAC address

* Provide python2.4 compatibility
2017-05-16 08:47:49 -07:00
James Cammarata
e5cd675b38 Use delegated vars for the delegated host name
In _process_pending_results (strategy/__init__.py), we were using the delegate_to
field directly from the original task, which was not being templated correctly.
As an alternate to #23599, this patch instead pulls the host name out of the delegated
vars passed back in the task result dictionary to avoid having to re-template things.

Fixes #23599
Fixes #20508
2017-05-16 10:24:42 -05:00
Will Thames
9a958da57e [cloud] Make ec2_vpc_nat_gateway results consistent (#24042)
Ensure newly created NAT gateways get converted to snake dict
Remove custom code, and associated test, for generating snake
dict and use `camel_dict_to_snake_dict`
Make use of `required_if` rather than bespoke parameter checks
Remove ec2_vpc_nat_gateway from pep8 legacy files list
2017-05-16 11:14:05 -04:00
kwerey
668092e95a [cloud] Add support for AWS China to elasticache_subnet_group role (#24286) 2017-05-16 11:10:15 -04:00
kwerey
6f66e88bd8 [cloud] Use boto connect_to_region so Elasticache works in AWS China (#24250) 2017-05-16 11:09:54 -04:00
Will Thames
6e13e3918f [cloud] Update VPC configuration for existing lambda (#24368)
If a lambda exists but does not have a VPC configuration,
add the VPC configuration when it's present in the ansible
parameters.

Prior to this change, setting VPC configuration on a lambda
that did not have any VPC configuration would ignore that config.
2017-05-16 11:08:21 -04:00
Ondra Machacek
4d890c1e9f cloud: ovirt change URL in documentation (#24438) 2017-05-16 10:48:26 -04:00
Ganesh Nalawade
f5d865a208 Fixes #24251 save config only if it is changed (#24345)
* Fixes #24251 save config only if it is changed

Save to startup configuration only when it is different
from running configuration.

* Fix unit test issue
2017-05-16 19:54:36 +05:30
Dag Wieers
c6533d4da9 utils/unicode: PEP8 compliancy (#24668)
- Make PEP8 compliant
2017-05-16 15:24:22 +01:00
Nathaniel Case
f240ba6b60 nxos_bgp_neighbor cleanup (#24446) 2017-05-16 10:14:10 -04:00
Nathaniel Case
ea2569db92 Workaround for unicast RPF check (#24519) 2017-05-16 10:11:52 -04:00
Dag Wieers
d07f18fbb9 module_utils/rax: Small parameter cleanup (#24664)
Nothing really fancy.

- Removing boolean choices
- Use path-type for credentials
2017-05-16 10:02:04 -04:00
Lujeni
a3a0742ce5 Add new aws module - iam_cert_facts (#24451) 2017-05-16 09:31:39 -04:00
Jimmy Conner
2380e50408 vmware_guest: Add support for Linked Clones (#23284)
* vmware_guest: Add support for Linked Clones

* Resolve PEP8 Issues

* Change snapshot_name to snapshot_src

* Add additional option 'snapshot_linked' to specify whether to use a linked clone or not

* Changed snapshot_linked parameter to "linked_clone"

* Remove unnecessary conditional
2017-05-16 09:26:51 -04:00
Dag Wieers
61d68275e8 module_utils/asa: PEP8 compliancy (#24655)
- Make PEP8 compliant
2017-05-16 12:16:05 +01:00
Justin Menga
8dae2ea869 Cast CloudFormation parameter values to string - fixes #23593 (#24182) 2017-05-15 13:10:29 -04:00
Abhijeet Kasurde
e9672748cc Add archive option in git plugin (#23332)
* Add archive option in git plugin

This fix will add archive option in git plugin

Fixes https://github.com/ansible/ansible/issues/22943

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update code as per code review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-15 10:46:25 -04:00
Monty Taylor
91969b8c67 Actually protect against use_default_subnetpool
We have a protection against a user setting use_default_subnetpool in
their playbook - but then we sure do pass the kwarg anyway. Maybe let's
not do that.
2017-05-15 09:41:38 -04:00
Abhijeet Kasurde
764b4b20ec Fix UnboundLocalError in basic.py
* Fix for UnboundLocalError while accessing deprecations
  in result
* Add Unit test

Fixes #24592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-15 09:32:17 -04:00
Ryan S. Brown
6141818110 [cloud] Document stage option on serverless module 2017-05-15 07:15:01 -04:00
René Moser
3ca3163af1 cloudstack: add new module cs_network_acl (#24609) 2017-05-15 10:57:38 +02:00
Jonathan Davila
6410e13903 Fix bug in iam_role (#22618) 2017-05-14 17:29:44 -04:00
Mohammed Naser
f9b4499082 Set facts type to dict
With newer versions of ansible, module arguments are assumed to
be strings unless otherwise specified.  Our 'facts' argument is
expected to be a dictionary, so tell ansible that.

Without this, the argument will arrive as a string and be written
to the facter file inside string quotes.  Facter will produce the
following error:

  undefined method `each' for #<String:0x000000016ee640>

This was originally fixed and found in the Ansible Puppet role which
is maintained by the OpenStack infrastructure team.

8d0f0bfd0a
2017-05-14 14:10:38 -04:00
René Moser
19e7abb971 cloudstack: return known used resources in fail_json (#24575) 2017-05-13 14:31:51 +02:00
Toshio Kuratomi
84a59e472b Be explicit about pickle protocol and encoding (#24454)
On Python3 and Python2 use pickle slightly differently so we need to be
explicit about some things.

If pickles could be shared between python2 and python3, as in
ansible-connection and the pickle cache, we need to specify the protocol
to use when dumping and the encoding to use for byte strings when
loading.

The dumping protocol needs to be no higher than 2 as python-2 only
supports up to protocol 2.  The encoding should usually be 'bytes' so
that python2 str type becomes python3 bytes type.  However, doing this
means that we must make sure that the objects being serialized properly
make their strings into text strings except when they're supposed to be
bytes.  If strings are improperly byte strings, they may cause
tracebacks on the receiving end
2017-05-12 18:04:48 -07:00
Sloane Hertel
822fcc566e [cloud] Stop ec2_group module from authorizing duplicate rules (#24528) 2017-05-12 14:54:25 -04:00
Kevin Howell
65f0668475 Add pool_ids option to redhat_subscription (#23266) 2017-05-12 14:10:41 -04:00
Chris Alfonso
8c0faa2ebf Revert "[WIP]Fortios address group" (#24549)
* Revert "Add check for processor_core value"

This reverts commit 8ad182059d.

* Revert "Fix for persistent connection plugin on Python3 (#24431)"

This reverts commit d834412ead.

* Revert "removing folded style formatting for synopsis (#22746)"

This reverts commit e539726543.

* Revert "[WIP]Fortios address group (#21831)"

This reverts commit f2dbf512cb.
2017-05-12 10:56:39 -06:00
Abhijeet Kasurde
8ad182059d Add check for processor_core value
Fixes #21893

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-12 12:30:05 -04:00
Toshio Kuratomi
d834412ead Fix for persistent connection plugin on Python3 (#24431)
Fix for persistent connection plugin on Python3.  Note that fixes are also needed to each terminal plugin.  This PR only fixes the ios terminal (as proof that this approach is workable.)  Future PRs can address the other terminal types.

* On Python3, pickle needs to work with byte strings, not text strings.
* Set the pickle protocol version to 0 because we're using a pty to feed data to the connection plugin.  A pty can't have control characters.  So we have to send ascii only.  That means
only using protocol=0 for pickling the data.
* ansible-connection isn't being used with py3 in the bug but it needs
several changes to work with python3.
* In python3, closing the pty too early causes no data to be sent.  So
leave stdin open until after we finish with the ansible-connection
process.
* Fix typo using traceback.format_exc()
* Cleanup unnecessary StringIO, BytesIO, and to_bytes calls
* Modify the network_cli and terminal plugins for py3 compat.  Lots of mixing of text and byte strings that needs to be straightened out to be compatible with python3
* Documentation for the bytes<=>text strategy for terminal plugins
* Update unittests for more bytes-oriented internals

Fixes #24355
2017-05-12 09:13:51 -07:00
Eric Beahan
e539726543 removing folded style formatting for synopsis (#22746) 2017-05-12 10:00:19 -06:00
Benjamin Jolivot
f2dbf512cb [WIP]Fortios address group (#21831)
* New module fortios_address_group

* Fix issue when fortigate don't contain any address group

* Add alias & change member from str to list type

* Fix pep8

* Fix aliases format in doc

* Fix pep8

* Remove duplicate arg spec with module_utils/fortios.py

* Change string format for better compat + better exception catching + cosmetic changes

* Use set, specify exception, RE pattern one time...

* fix pep8
2017-05-12 09:54:58 -06:00
Ilya Drey
62b8813873 Improving nxos_ip_interface module (#21353)
* Improving of nxos_ip_interface module

Added features:

  * Route tags for an IP address at interface level with 'tag' option
  * Support of IPv4 secondary addresses if option 'allow_secondary' is
true (false by default). If option 'allow_secondary' is true primary
IPv4 address will be replaced

All features support NXAPI and CLI transport, but only with text/raw
output. Currently not possible to get route tags for secondary IPv4/IPv6
addresses from JSON output.

Other changes:
  * Module return state 'changed' only when configuration commands were
executed
  * Module result includes multiple prefixes if IPv4 addresses were
found

* Fix PEP8 issues

* Addition fix of PEP8 issues

* Remove unused variable from main()

* Fix "proposed" sample in RETURN variable

* Fix "existing" sample in RETURN variable

* Update RETURN variable

Add 'secondary' for every element of 'addresses' list.

* Restore old version number

* Added exception when ipaddress module is imported

* DOCUMENTATION string was updated

  * Added 'version_added' for new features
  * Added 'requirements' for module

* Added compatibility with latest commit in devel branch

* DOCUMENTATION was fixed
* Improve changes of route tag for existing ip addresses
* Added compatibility with core code

* Fixed mistypes in the DOCUMENTATION variable

* argument_spec fixed

allow_secondary argument type was changed according to allowed choices.
2017-05-12 11:45:44 -04:00
Gabriele
78ed0cadea Fixing nxos_ntp (#20651)
* Fixing nxos_ntp

* Fixing style issues
2017-05-12 11:36:44 -04:00
Jan-Piet Mens
0e0e5097a9 Optionally return raw data from URL lookup using split_lines=False 2017-05-12 11:02:49 -04:00
Sloane Hertel
91b87d4cbb dict.values() was a list python2 but in python3 it's a view (#24504) 2017-05-12 08:48:16 -04:00
Kai Xia(夏恺)
97b0448f0b fix typo. (#24531)
Signed-off-by: Kai Xia(夏恺) <xiaket@gmail.com>
2017-05-12 08:42:52 -04:00
Toshio Kuratomi
548cacdf6a Fix template not showing a diff with a directory
Template can take a directory as the destination.  When that's the case,
we need to diff between the source and the file inside of the directory.
That happened when the directory was specified with a trailing slash but
not when it was specified on its own.  This change fixes that.

Fixes #24413
2017-05-11 20:37:31 -07:00
Toshio Kuratomi
16325f6f15 Fix pam_limits writing text to a file opened in binary mode
Fixes #24392
2017-05-11 17:17:12 -07:00
rodolfojcj
a47fbba8ae Little documentation fix (#24522)
Added the 'reset_connection' option to the available choices
2017-05-11 15:10:20 -07:00
James Cammarata
78478e80ea Avoid default serialization of classes in dump_attrs
For playbook base objects, when dumping attributes via dump_attrs() an
attribute like loop_control is a class. Using the default serialization
for these is slow and consumes a lot of memory. Since LoopControl is also
based on the Base class, we can use serialize() instead and save a lot of
resources.

This also adds a from_attrs() complimentary method to nicely turn the
dumped attrs back into proper field attributes.

Fixes #23579
2017-05-11 16:28:07 -05:00
taksekine
b04df23da2 fix #24429 (#24491) 2017-05-11 13:59:39 -07:00
Brian Coca
c50cf22d52 deal with null/none connections
fixes #23621
pushed 'connection resolution' to play_context
override fieldattribute getter
2017-05-11 15:46:14 -04:00
Tom Melendez
4a5cf0b5c1 [GCE] [GCP] UrlMap module (#24422)
* [GCP] UrlMap module

This module provides support for UrlMaps on Google Cloud Platform.  UrlMaps allow users to segment requests by hostname and path and direct those requests to Backend Services.

UrlMaps are a powerful and necessary part of HTTP(S) Global Load Balancing on Google Cloud Platform.

UrlMap takes advantage of the python-api so the appropriate infrastructure has been added to module_utils.

More about UrlMaps can be found at:
https://cloud.google.com/compute/docs/load-balancing/http/url-map

UrlMap API:
https://cloud.google.com/compute/docs/reference/latest/

Google Cloud Platform HTTP(S) Cross-Region Load Balancer:
https://cloud.google.com/compute/docs/load-balancing/http/

* updated documentation, remmoved parens

* fixed tabs
2017-05-11 13:02:32 -04:00
Abhijeet Kasurde
728d3e6c84 Pep8 fixes for web_infra/ansible_tower (#24479)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-11 11:26:36 -05:00
Dylan Silva
fc3cc73b73 Downgrading module from core to community (#24463) 2017-05-11 08:05:49 -07:00
wiso
bb90f5d220 netconf_config: support new src attribute (new Action Plugin) (#24337)
* Create netconf_config.py

To support new attribute 'src' for the netconf_config module.
Cross-check with #24323

* Update netconf_config.py

* Update netconf_config.py
2017-05-11 18:43:44 +05:30
Jon Hadfield
eb4cc31ae5 [cloud] migrate ec2_asg to boto3 and support application ELB target groups. (#19667)
* switch to boto3 and add support for application ELBs with target groups.

* use py23 compatible dict iterator.

* removing commented out fail_json calls

utilize sets to simplify logic

remove setting a redundant variable

add bounds checking in two places

add AWSRetry decorator - do we want this for other functions too?

change xrange to range so python3 doesn't fail

remove sorting lists of dicts; in python2 this returns None, in python3 this fails

* remove error variable from traceback.format_exc

* Remove boto2-style calls brought in by rebase

Old boto-style calls to `as_group` attributes break in boto3

Also remove module from legacy-PEP8 list

* Add  parameter to target_group_arn option

* Fix HAS_BOTO3 check

* use tags.items() instead of iteritems

* import botocore

* Fixed bugs in deleting autoscaling groups

* make changes in deleting autoscaling groups pep8

* more pep8

* fix version

* fix bugs so local integration tests run

* fix launch config check

* reflect changed status for ASG updates

* Fix existing exception handling and use traceback.

Fix imports

* line length

* Fix notification setup

* Fix mutually exclusive arguments
Only one of the AvailabilityZones and VPCZoneIdentifier arguments should be provided to the CreateAutoScalingGroup call.

* Allow desired_capacity, min_size, max_size, launch_config_name to be derived from the existing ASG if not specified

Remove code updating dict after ASG already uses it
2017-05-11 09:08:19 -04:00
Abhijeet Kasurde
3d51081a59 Refactor nxos_reboot module (#24484)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-11 13:14:31 +05:30
Rob
fd1debb869 Feature/aws helper function for tags (#23387)
* Add new helper function for comparing AWS tag key pair dicts. Also modify boto3_tag_list_to_ansible_dict function to be more generic when looking for key names because AWS sometimes uses 'Key', sometimes 'TagKey' and who knows what the future holds! Fixed modules to work with changes.

* Review changes

* Add some more doc to GUIDELINES for tags and fix var name for snaked values in ec2_group_facts
2017-05-11 07:39:51 +01:00
Trishna Guha
b2a2f69a6e nxos_vrf_af fix and unit test (#24399)
* nxos_vrf_af fix and unit test

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

* ansibot told me to do this

* use sorted() as the test list elements differ in order for python2.x and 3.x
2017-05-11 10:54:47 +05:30
Trishna Guha
62eafa8837 fixes nxos_evpn_vni and unittest (#24372)
* fixes nxos_evpn_vni

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

* fixes pep8 issue and syntax error

* ansibot tole me to do this

* Unit test
2017-05-11 10:54:05 +05:30
Dag Wieers
748f27e597 expect: Add a pointer to the shell/script modules
This PR also includes:
- DOCUMENTATION and EXAMPLES cleanup

This fixes #21335
2017-05-10 20:37:36 -07:00
Dag Wieers
e855274dc8 win_psexec: Enable -nobanner option by default (#23422)
* win_psexec: Enable -nobanner option by default

PR also includes:
- Option `nobanner:` to remove this flag
- Improvements to Examples
- Improvement to Return Value
- Add types to all parameters now
- Add (limited) integration tests

* Move sysinternals into C:\Windows\Temp
2017-05-10 16:10:33 -07:00
Nathaniel Case
09b2964dee nxos_bgp_af updates (#24171)
* update docs
* clean up nxos-bgp_af
* Remove useless params from bgp_af
* Add bgp_af tests
2017-05-10 16:12:00 -04:00
Abhijeet Kasurde
2f26c5285a Refactor nxos_file_copy module (#24314)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-10 22:15:42 +05:30
Ondra Machacek
a5020a40e5 Minor fixes for oVirt modules (#23452)
* cloud: ovirt: only image disk can be sparsified

* cloud: ovirt: add post-copy scheduling policy
2017-05-10 09:15:47 -04:00
René Moser
2ef6713abb cloudstack: new module cs_vpn_gateway (#23954)
* cloudstack: new module cs_vpn_gateway
* add integration tests for cs_vpn_gateway
2017-05-10 14:55:14 +02:00
Matt Martz
3324d0a4b0 Support auto_remove in docker_container (#22929)
* Support auto_remove in docker_container

* Fail if not docker>=2 and auto_remove=True, don't set auto_remove in host_config if not docker>=2

* Make quoting more readable in ansible errors
2017-05-09 16:19:27 -04:00
wiso
0a22dbd9d8 Update netconf_config.py (#24323)
* Update netconf_config.py

Implementation proposal for feature request #24220

* Update netconf_config.py

fixed pep8
added code proposal for #24221

* Update netconf_config.py

correct more pep8 related things
add some cosmetic changes
2017-05-09 16:04:59 -04:00
Sloane Hertel
2618e6d516 ec2_elb_lb: allow elb scheme to be updated by restarting the resource - fixes #19116 (#22916)
* allow elb scheme to be updated by restarting the resource

use ensure_gone and require wait option

* fix pep8

* fix yaml

* requested changes

* fix fail_json
2017-05-09 14:01:37 -04:00
Dag Wieers
bc806ff479 Windows: Small fix to Add-Warning and Add-DeprecationWarning (#23520)
Simplified the logic, and fix the issue of having a nested list as
entry.

Also indicate that we deliberately want to retain $null values
(and i.e. do not want them to be turned into a boolean).
2017-05-09 09:18:37 -07:00
Ganesh Nalawade
5b3ea6562b Add junos integration test (#24404) 2017-05-09 18:41:48 +05:30
Feike Steenbergen
c5adf08c40 Reference correct variable and key for role expiry (#23397)
Previously, this module could throw the following error message:
    NameError: global name 'current_roles_attrs' is not defined

The referencing key should also match the name of the column, which is
rolvaliduntil, not rol_valid_until
2017-05-09 14:03:22 +01:00
Abhijeet Kasurde
a255cfd22a Check login_token for user before any operations (#23600)
Fix adds extra check if user is authorized or not while
using login_token.

Fixes https://github.com/ansible/ansible/issues/23033

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-09 13:52:13 +01:00
Benjamin Jolivot
e99815e9f5 Fortios file only mode + integration tests (#23275)
* WIP file_mode

* WIP

* Add file_mode + integration tests

* fix pep8

* Update doc fragments
Create mutualy_exclusive param
Fix yamllint problem in tests

* Add aliases file + main playbook for fortios

* Install pyfg before running tests

* Install pyfg before running tests in role

* Remove pre_task as it's done in roles

* Force pyFG minimal version for python3

* role_path not role_dir :(

* Change requirements

* Specify Error type when error on import

* Bug in pygf library with python 2.5 (PR is waiting https://github.com/spotify/pyfg/pull/19)

* Bad requirement format

* still bad format -_-'

* remove test/integration/fortios.py (auto generated by tests)
missing new lines at end of file

* pyFG is now fixed in 0.50
2017-05-09 13:51:19 +01:00
Abhijeet Kasurde
e342b281d8 Check if api_key and app_key before proceeding (#24336)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

Fixes https://github.com/ansible/ansible/issues/24325

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-09 13:08:25 +01:00
Matt Clay
d999d613cb Python 3 fixes for CloudStack modules and tests. (#24400) 2017-05-09 13:37:08 +02:00
Gaurav Rastogi
6aa32d3e9d Added no_log flag for all the sensitive fields. (#24386) 2017-05-09 11:20:57 +01:00
Dag Wieers
b58cf0d23a windows: Various small documentation fixes (#23138) 2017-05-08 18:03:56 -07:00
Dag Wieers
5ab97b30cd powershell: Add support for list parameters (#23131)
This is a first implementation of list parameters.

It will convert a single string, or comma-separated value into an Array.
2017-05-08 17:53:13 -07:00
Matt Davis
98ff93b2db fix spurious warnings with ansible_winrm_kinit_X args (#24380)
* added to pywinrm arg whitelist
* clarified error text on kinit_mode error
* fixes #23822
2017-05-08 11:27:25 -07:00
James Cammarata
ed56f51f18 Fixing security issue with lookup returns not tainting the jinja2 environment
CVE-2017-7481

Lookup returns wrap the result in unsafe, however when used through the
standard templar engine, this does not result in the jinja2 environment being
marked as unsafe as a whole. This means the lookup result looses the unsafe
protection and may become simple unicode strings, which can result in bad
things being re-templated.

This also adds a global lookup param and cfg options for lookups to allow
unsafe returns, so users can force the previous (insecure) behavior.
2017-05-08 12:43:46 -05:00
Nathaniel Case
830f19d444 nxos_bgp updates (#24270)
* Remove invoke from nxos_bgp
* Try to simplify get_existing
* Streamline state_present
* More testing, squash & compact get_value & get_custom_value
* Streamline main
* nxapi has problems reading CustomNetworkConfig directly
2017-05-08 11:38:50 -04:00
Ganesh Nalawade
4186b07d21 Fixes #24375 Add check to identify if diff is empty (#24377)
* Fix #24375 Add check to identify if diff is empty
2017-05-08 20:36:56 +05:30
Abhijeet Kasurde
d072d91aed Use wait_timeout as integer in redshift module (#24279)
Fix stricts datatype of wait_timeout to int as module
is using it as integer.

Fixes https://github.com/ansible/ansible/issues/24267

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-08 10:07:04 -04:00
Gaurav Rastogi
b1efad52a4 New module to setup cloud connector properties (#22225)
* New module to set up cloud connector properties

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-08 07:40:29 +01:00
Gaurav Rastogi
1978795089 New module to setup string group. (#22223)
* New module to setup string group.

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-08 07:39:22 +01:00
Abhijeet Kasurde
2425143cf2 Pep8 fixes for digital_ocean_*
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-08 10:53:47 +08:00
Abhijeet Kasurde
9c5b55232c Pep8 fixes for Windows module (#24349)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-07 20:59:35 +01:00
Martin Kopta
c4ad0f86c7 fixed yum.parse_check_update regex (#24331)
Output of `yum check-update` can contain lines with long package names and long
repository label names, which will be broken into multiple lines, which need to
be sanitized. The solution to this has been fixed and refactored in 2.3 in form
of parse_check_update(), but it still contains subtle bug, which makes such
multi-lines invisible to later logic (such packages aren't included in
parse_check_update()) output. The problem is caused by using '\1' in re.sub(),
instead of proper r'\1', which literally puts unicode symbol \1 into resulting
output.
2017-05-05 17:01:30 -04:00
Sloane Hertel
0438236263 [cloud] Add version_added to route53 option 'state' - fixes #24306 (#24335)
* fix route53 documentation

* improve state option description and remove version_added
2017-05-05 14:58:34 -04:00
Toshio Kuratomi
4bf8071889 Give user whatever information we have from ssh-keyscan
ssh-keyscan isn't very verbose about errors.  Give the user whatever
information we have available even if it isn't much.  At least they will
know how we were running ssh-keyscan and why there's an error now.

Fixes #19440
2017-05-05 08:35:04 -07:00
Adrian Likins
3840119bc7 Fix vaulted vars templating (#24312)
Use the default repr of AnsibleVaultEncryptedUnicode.data instead
of a custom one, since jinja templating ends up using the repr()
results.

Fixes #23846, #24175
2017-05-05 11:07:50 -04:00
Trishna Guha
ad0a01ffb5 nxos_vrf refactor (#24280)
* nxos_vrf refactor

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

* Unit test for nxos_vrf
Remove unnecessary keys() method
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-05-05 15:38:30 +05:30
Dag Wieers
58c1a9dd94 vmware_guest: Don't force onto specific host (#22777)
Unless we provided a specific esxi_hostname, don't force new VMs onto the first host in the cluster.
2017-05-05 05:27:04 -04:00
Trishna Guha
986765312f Fixes #23948 body not defined nxos_hsrp (#24093) 2017-05-05 08:36:00 +05:30
Trishna Guha
67bd8f9204 fixes nxos_interface (#24199)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-05-05 08:35:16 +05:30
Alberto Murillo Silva
d31a09ceb7 Fix os_quota to not break when volumev2 service is not available.
os_quota checks the current quotas for compute, network and volume
services and fails when no volume service is found in the catalog.

Since openstack test deployments without volume services are common
os_quota shouldn't fail if such service is missing.

Fixes #23085

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2017-05-04 18:34:12 -04:00
Alberto Murillo Silva
136a6eec9e dnf: Add autoremove option
This allow users to write better playbooks by replacing

- shell: dnf autoremove -y
with
- dnf: autoremove=yes

Fixes #18815

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2017-05-04 13:52:16 -07:00
Abhijeet Kasurde
d8a9b9f347 Fix win_user warning message (#24263)
Fix adds correct warning after deleting Windows User.
Also, adds modular function to get group

Fixes https://github.com/ansible/ansible/issues/24190

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-04 12:53:19 -07:00
Matt Martz
63f8e6b68a Fix version_added for new option in template introduced in #21846 (#24307) 2017-05-04 14:53:00 -05:00
Dane Summers
4bd04c299b Fixes #23285 (#24291)
Makes subversion module --check fail when modified files are in
repository.
2017-05-04 10:08:39 -07:00
Toshio Kuratomi
e36d2f0bd0 ansible-doc snippet format changes
* ansible-doc -s is supposed to output a sample snippet of how you could
  add the module into a playbook.  These changes update the style:
  * Use yaml mappings instead of key=value
  * Use the module name directly instead of action: modulename
* Fixes a bug when displaying option descritpions which are yaml strings
  instead of lists.

This fixes in code the bad formatting reported in #24201
2017-05-04 09:08:19 -07:00
Joris (J.J.M.) Weijters
2a7ce1059d adjusted descriptions in DOCUMENTATION, and fixed type in RETURN 2017-05-04 07:38:34 -07:00
Gaurav Rastogi
4f7d342c0e New module to setup Cloud properties (#22226)
* New module to set up Cloud properties

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:24:43 +01:00
Gaurav Rastogi
ffeb105423 New module to setup serviceengine group. (#22227)
* New module to setup serviceengine group.

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:23:43 +01:00
Gaurav Rastogi
5ccba73c55 New module to setup network object. (#22228)
* New module to setup network object.

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:21:38 +01:00
Gaurav Rastogi
099a1c5aef New module to set up GLSB object (#22229)
* New module to set up GLSB object

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:18:28 +01:00
Gaurav Rastogi
368ccf1ac7 New module to setup GSLB service (#22230)
* New module to setup GSLB service

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:16:34 +01:00
Gaurav Rastogi
243eacb650 New module to set up gslb health monitors (#22231)
* New module to set up gslb health monitors

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 13:14:40 +01:00
Gaurav Rastogi
91f255a07b New module to setup IP address group. (#22224)
* New module to setup IP address group.

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 12:48:10 +01:00
Gaurav Rastogi
b0465a2fbd New module to set up cloud object (#22198)
* New module to set up cloud object

* Fixed documentation error

* Updated descriptions for Avi 17.1.1 release and Fixed metadata
2017-05-04 12:39:29 +01:00
Abhijeet Kasurde
86966c75fa New module : github_issue (#23654)
Using github_issue module, user can retrive status of issue
listed on Github repository and depending upon status takes
various actions e.g., workarounds and downloading patches.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-04 12:16:32 +01:00
jctanner
08a3ea2221 sysctl: switch basestring to string_types (#24277) 2017-05-03 21:31:57 -04:00
Matt Davis
2052ed48d5 Deprecated restart option in win_feature, added return docs 2017-05-03 17:06:02 -07:00
Matt Davis
db91dd8685 fixed issue with multiple calls to Add-DeprecationWarning 2017-05-03 17:06:02 -07:00
Matt Martz
7dbec976af Switch last remaining decode to to_text (#24269) 2017-05-03 16:51:17 -05:00
Brian Coca
b731c2d809 include_vars to delegated only if delegate_facts (#24259)
* include_vars to delegated only if delegate_facts

fixes #24172

* since code is now same, simplified
2017-05-03 16:30:20 -04:00
Toshio Kuratomi
a0dfa8616a Make fetch default to fail on errors
Fixes #23501
2017-05-03 09:37:31 -07:00
Toshio Kuratomi
90a229c793 Fix error in unittesting
When unittesting, the framework creates a pipes module that is picked up
by the basic module_utils test.  Switch to using shlex_quote as that is
the right thing to use for portability anyway.
2017-05-03 09:37:31 -07:00
Toshio Kuratomi
36d7c0c403 Fix places where path needs to be bytes on python3
These were discovered on python3 with fetch code that fails on errors.  Probably could be
provoked with particular sets of arguments to stat as well.
2017-05-03 09:37:31 -07:00
Sloane Hertel
ad8cb903f4 rds: do not update multi-az unless specified - fixes #23385 (#23498)
* allow multi_az to be unmodified if not explicitly specified

* fix pep8 and remove from legacy files
2017-05-03 12:24:02 -04:00
Ritesh Khadgaray
fb6e9e8fbe rhn+register: do not pass username/passwd for registration if none is specified. (#24244) 2017-05-03 12:12:16 -04:00
Sloane Hertel
4278618746 verify arns differently than function names (#23966) 2017-05-03 12:01:42 -04:00
Gaurav Rastogi
e8a0215cd3 Avi 17 1 (#24047)
* Added new common argument api_version for all Avi modules

* Updated dependency for the new modules to use avi sdk 17.1 and above

* Updated Avi 17.1.1 modules with descriptions and moddule dependencies

* Updated version_added for new options
2017-05-03 16:51:28 +01:00
mattwwarren
45ac28ba04 remove self from function outside of class (#24017)
* remove self from function outside of class

* fix indentation
2017-05-03 11:49:43 -04:00
Abhijeet Kasurde
a3053d8c2c Add validate_certs option to ldap_attr, ldap_entry (#24060)
This fix adds a module option `validate_certs' to check
self-signed certificate of LDAP server.

Fixes https://github.com/ansible/ansible/issues/24009

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 16:29:55 +01:00
Kevin Howell
a93aa6dc04 Fix typo in rhsm.configure (system -> server) (#24179)
This fix makes it so that the module works as expected when
`server_hostname` is provided. It was being silently ignored
previously. I suppose this may also fix similar behavior with
`server_insecure`, but I did not check that explicitly.
2017-05-03 11:08:58 -04:00
Ganesh Nalawade
a42b892f70 Fix junos_rpc and junos_user broken issues (#24238)
* Fix junos_rpc and junos_user broken issues

Add persistent connection related changes.

* Fix CI issues
2017-05-03 19:00:07 +05:30
Benny Zlotnik
80f0157f3c cloud: ovirt: Remove extra "the" from descriptions (#24242) 2017-05-03 14:15:36 +01:00
Abhijeet Kasurde
465c12ccdb Pep8 fixes for deploy_helper (#24237)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 11:30:15 +01:00
Ganesh Nalawade
73c24001d9 Fix netconf port validation and minor doc change (#24210)
* Fix netconf port validation and minor doc change

Add check to confirm if `validate_*` funcion is
callable.

Add `config_format` in `junos_facts` documentation

* Fix review comments
2017-05-03 14:28:20 +05:30
Ricardo Carrillo Cruz
7195c31753 Refactor openvswitch_port module (#24205)
Use current patterns from other network modules for better
maintainability.
2017-05-03 10:36:44 +02:00
Abhijeet Kasurde
53f0cd197e Pep8 fixes for jira (#24229)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 08:16:20 +01:00
Abhijeet Kasurde
b6b3f84990 Pep8 fixes for htpasswd (#24230)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 08:13:32 +01:00
Matt Clay
785bc93ff7 Allow empty string for EC2 session token from env. 2017-05-03 10:25:51 +08:00
Matt Clay
425d35ef0f Fix ec2_elb_lb error handling. (#24183)
- Use `fail_json` for `get_all_load_balancers` unhandled exception.
- Do not mask error message on failure of `enable_zones`.
- Do not mask error message on failure of `disable_zones`.

Also added/removed blank lines to improve PEP 8 compliance.
2017-05-03 10:25:01 +08:00
Abhijeet Kasurde
fbb924ff24 Pep8 fixes for letsencrypt module (#24144)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 11:35:06 -05:00
Abhijeet Kasurde
df5be2b8ea Pep8 fixes for django_manage (#24198)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 11:33:36 -05:00
Robin Roth
0cf00db750 Make git module pep8 compliant (#24196) 2017-05-02 11:33:02 -05:00
higginsd
8408c6b454 fixed missing "import traceback" (#23427) 2017-05-02 11:42:43 -04:00
Ricardo Carrillo Cruz
9e246a857c Sanitize the output from ovs get-fail-mode (#24208)
If a bridge does not have a fail mode set, it returns nothing, i.e.
empty string.
This causes a failure when doing the want vs have compare in plays
where the fail-mode is missing, as we compare "" vs None respectively.
2017-05-02 17:04:33 +02:00
Ricardo Carrillo Cruz
e67eba877e Sanitize ovs br-get-external-id output on openvswitch_bridge (#24209)
If a bridge does not have external_ids, ovs-vsctl returns '{}'.
This causes issues on the current want vs have comparison in cases
where the play does not define external_ids, as the comparison
is None vs '{}'.
2017-05-02 16:40:37 +02:00
Sloane Hertel
e13fc5d6bd elasticache_parameter_group: fix documentation and exception handling - fixes #23709 (#23718)
* fix documentation and correct exception handling

* follow AWS exception guidelines

* fix parameter_group_family req; only needed when creating cache parameter group

make pep8 and remove from legacy files
2017-05-02 10:13:56 -04:00
Sloane Hertel
fcaa49b536 sns: move from notification directory to cloud/amazon directory - fixes #11874 (#23805)
* move sns to cloud directory

* make sns pep8 and remove from legacy files
2017-05-02 10:05:48 -04:00
Abhijeet Kasurde
9d9e9a79e2 Pep8 fixes for apache2 module (#24185)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 15:03:26 +02:00
John R Barker
93de128844 Return type is dict, not dictionary (#24191) 2017-05-02 08:59:04 +01:00
Thomas Bilk ن
77e550192c Added Composer Command global (#24158)
* Added Composer Command global

Added a parameter to run composer commands globally. The `working_dir`
parameter is only required if `global_command` is `False`.

Fixes #24052

* Added Composer Command global

Added a parameter to run composer commands globally. The `working_dir`
parameter is only required if `global_command` is `False`.

Fixes #24052
2017-05-01 21:11:34 +02:00
Toshio Kuratomi
3428f42120 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8
2017-05-01 08:52:25 -07:00
Abhijeet Kasurde
8ba069315e Pylint fixes for packaging (#23553)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 10:25:39 -05:00
Matt Martz
040fb4435a Fix password prompt matching (#24081)
* Fix password prompt matching

* Add some tests for check_password_prompt

* Prevent pep8 line ends with a space error
2017-05-01 11:18:15 -04:00
Abhijeet Kasurde
d8f76bed97 Misc fixes and Pep8 fixes for proxmox_* modules (#24162)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 10:02:59 -05:00
Abhijeet Kasurde
cdca648f15 Pep8 fixes for jenkins_* module (#24154)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 10:01:25 -05:00
Toshio Kuratomi
d088030fa6 Facts Timeout was not settable via ansible.cfg
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):

* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
  calling setup)
* from the default value

The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.

This change should fix setting via ansible.cfg and adds unittests for
all three cases

Fixes #23753
2017-05-01 07:59:42 -07:00
Abhijeet Kasurde
806506c032 Pep8 fixes for taiga_issue module (#24143)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 09:58:59 -05:00
Abhijeet Kasurde
bb8666471d Update documentation of fetch_url in urls.py (#23892)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 09:57:37 -05:00
Nathaniel Case
dce2d5eea9 Remove provider requirement from nxos_vrf (#24118)
Fixes #23920
2017-05-01 09:32:53 -04:00
Rene Moser
e9dfbdf7a2 rundeck_project: set ansible_metadata status to preview 2017-05-01 09:04:25 -04:00
Alberto Murillo Silva
bb234b9206 Fix ClearLinux pretty name
ClearLinux has changed its pretty name in os-release file
from: 'Clear Linux Software for Intel Architecture'
to: 'Clear Linux OS for Intel Architecture'

This patch makes the SEARCH_STRING 'Clear Linux' rather than
the full name to make it compatible with the old and new name.

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2017-05-01 08:53:34 -04:00
Nick Piper
403c142750 Minor typo correction varibles -> variables
No impact as variable wasn't used.
2017-05-01 08:44:48 -04:00
René Moser
594d7d5d9d cloudstack: cs_region: fix pep8 (#24134) 2017-04-29 09:16:21 +02:00
Toshio Kuratomi
1c05ed7951 Fix circular import with unsafe_proxy, template, and vars
template/__init__.py imported unsafe_proxy from vars which caused
vars/__init__.py to load.  vars/__init__.py needed template/__init__.py
which caused issues.  Loading unsafe_proxy from another location fixes
that.
2017-04-28 15:35:30 -07:00
Toshio Kuratomi
500de1f557 Remove hack for backwards compatible v2_playbook_on_start callback
Just after release of 2.0.0 (in 2.0.0.1) we had a change to the API of
callbacks without bumping the API version.  We added the playbook to the
arguments passed to the callbacks.

This wasn't in the Tower callback at the time.  In order to prevent
breaking that callback we added a temporary hack to inspect the
callback's API to decide if we needed to call it with arguments or not.

We scheduled the hack for removal in January 2017.  Since that's now
past, removing the hack.

Change signed off by matburt on the Tower side.
2017-04-28 13:44:43 -07:00
Patrick Chauncey
0d5fe8fd94 Add 'uuid' to the attributes returned from the vmware_vm_facts module. (#23773) 2017-04-28 16:28:49 -04:00
David Moreau Simard
b95fefd8f5 Add support for specifying the modulepath for the Puppet module (#24122)
Puppet modules are not always installed in the default location
(i.e, /etc/puppet/modules) so it is useful to be able to specify
an alternate location.
2017-04-28 22:00:55 +02:00
Cody Boggs
1c11a35f70 Fix orphan resource pool crash (Issue #24078) (#24079)
Fixes issue [#24078](https://github.com/ansible/ansible/issues/24078)

Resource pools are retrieved from VSphere regardless of the state of the `resource_pool` parameter. During this process, each retrieved Resource Pool is checked for the `parent` attribute, and if it exists, the currently-scoped parent object is compared against the Resource Pool's parent object. The method doing the check, however, `assert`s that the parent object is not `None`. In some cases, a Resource Pool will have the `parent` attr, but that `parent` object will be `None`, causing the `assert` to fail.

This should avoid that. :-)
2017-04-28 15:14:05 -04:00
Nathaniel Case
f9ec06d1dc Print specific error for BadHostKeyException (#24120) 2017-04-28 13:57:32 -04:00
nerzhul
e09cd58a17 New module: rundeck_project
This module permits to manage rundeck project creation or removal through rundeck API
2017-04-28 10:39:17 -07:00
John R Barker
1d12f13612 dict, not dictionary (#24123) 2017-04-28 18:16:25 +01:00
nerzhul
96d2dbb11e Add rundeck_acl_policy module 2017-04-28 07:50:54 -07:00
Ricardo Carrillo Cruz
467a9bdd4e Refactor openvswitch_bridge (#24014)
Use common patterns from other network modules for better
maintainability.
2017-04-28 16:39:25 +02:00
Ganesh Nalawade
06732acd4c Fix exception in junos_package (#24107) 2017-04-28 19:33:34 +05:30
Alex Willmer
1ac17213ea Rename fact returned by docker_network to avoid restricted prefix (#23919)
This fixes #23918
2017-04-28 08:45:53 -05:00
SesquipedalianDefenestrator
3f321e7591 Add check_mode to get_url (#20532)
* Add check_mode to get_url that does a HEAD request to make sure the URL exists, but doesn't write the real file

* Add info about new --check behavior to docs.  Add tests for the new behavior.  Populate res_args with the info the tests are looking for.

* Add trailing comma

* Change nonexistent test URL to http://{{httpbin_host}/DOESNOTEXIST.  Fix spacing while I'm at it

* Further spacing cleanup

* State that this functionality is in Ansible 2.4+
2017-04-28 14:43:51 +01:00
Abhijeet Kasurde
ca7616b4a1 Pep8 fixes for ha_proxy module (#24090)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-28 08:39:38 -05:00
John R Barker
3d4523f231 Correct RETURN data types for Network modules (#24104)
`path` isn't a datatype
2017-04-28 12:15:18 +01:00
Trishna Guha
bc22223d63 Fixes #23890 Remove idle ShellError exception and get_exception() method from nxos modules (#23947)
Remove idle ShellError exception and get_exception() method from nxos modules
2017-04-28 10:42:15 +05:30
Brian Coca
31045d58c6 added versions to dep notices (#24019)
* added versions to dep notices

* pep7

* string
2017-04-27 12:48:31 -04:00
John R Barker
6845234d72 nmcli: fix docs for add necessary package (#24071)
Originally report in https://github.com/ansible/ansible/pull/23817
2017-04-27 17:38:11 +01:00
Erwin Lang
b729b35e32 synchronize: Fix (delegated) local rsync
Makes delegated local rsync work even if ansible_host or ansible_ssh_host is set.
Makes local rsync work when no ssh is installed.
2017-04-27 09:33:26 -07:00
John R Barker
fcb52ce808 Added note on netcat dependency (#24070)
Originally https://github.com/ansible/ansible/pull/23911/files
2017-04-27 17:25:00 +01:00
Trishna Guha
2741907cba Refactor nxos_interface and add unit test (#24008)
* [WIP] Refactor nxos_interface

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

* Modification in refactor
Unittest for nxos_interface
2017-04-27 21:19:10 +05:30
Nathaniel Case
689b93bf14 Junos_config unicode (#23369)
* Try to handle unicode output more sensibly

* Appears I'm getting latin1 instead

Ugh.
2017-04-27 11:44:26 -04:00
John R Barker
1c61b9bae7 Split modules/network into two parts (#24024)
* Split modules/network into two parts

Given the dedicated team we we have working on Ansible Networking a
clearer split is needed between Networking modules and "things that
happen to use the network"

* nmcli to net_tools

* nmcli moved
2017-04-27 16:42:41 +01:00
Colin Chan
2d9d1762ba Improve parsing of 'systemctl show' output 2017-04-27 11:42:26 -04:00
Nathaniel Case
fc0bf87c20 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests
2017-04-27 11:08:37 -04:00
Ganesh Nalawade
1f7c2c63c2 Fix python version check issue (#24063)
Fix python version check issue
2017-04-27 20:10:58 +05:30
Ricardo Carrillo Cruz
2716fad38f Return commands instead of command (#24061)
Ok, so for openvswitch_db in particular we just return one command
but in the sake of consistency and code re-use, let's return a list
of "commands", even if it's just one.
2017-04-27 16:36:08 +02:00
Abhijeet Kasurde
9456f93ea8 Pep8 fixes for known_hosts.py (#24029)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-27 09:21:49 -05:00
Andrea Tartaglia
1d0a629dcc Fixed docs for cloud modules (#23745)
* Fixed docs for cloud modules

* removed blank line in ec2_snapshot_facts
2017-04-27 12:01:11 +01:00
Senthil Kumar Ganesan
ce99ffe205 Fixed PEP8 issues (#24030) 2017-04-27 11:41:43 +01:00
Ganesh Nalawade
7d710882a8 Fix exception issue in junos_config (#24049)
ParseError execption is added to ElementTree
in py2.7. Prior to py2.7 need catch ExpatError
execption
2017-04-27 13:16:40 +05:30
Andrej Svenke
3185ec94c5 ecs_service: add tasks placement constraints and strategy. (#20503)
ecs_service: documentation fix.

ecs_service: updated version_added.

ecs_service: pep8 fixes.
2017-04-27 08:33:23 +01:00
Toshio Kuratomi
51e3390333 Document deprecation of fetch module validate_md5 and update --tags merging deprecation (#24022)
* Document deprecation of fetch module validate_md5 and update --tags merging deprecation

Update the default of --tags merging config option to merge by default

* Update CHANGELOG.md

Minor edit
2017-04-26 19:57:21 -07:00
jctanner
a5d6d3b9af Remove unused+circular import in listify.py (#24038) 2017-04-26 16:56:00 -04:00
Nathaniel Case
0d67a49d5a nxos_bgp fixes (#23927)
* Pre-emptively fix sanity/pep8

* fix for commands

* Quick unit test
2017-04-26 16:33:54 -04:00
Nathaniel Case
c0ebdf144d nxos_acl_interface fixes (#23917)
* Update nxos_acl_interface

* Add basic unit tests to nxos_acl_interface
2017-04-26 16:32:36 -04:00
Nathaniel Case
f0914ee3c2 nxos_acl fixes (#23915)
* Update nxos_acl

* unit tests for nxos_acl

* Remove nxos_acl from pep8-legacy
2017-04-26 16:29:53 -04:00
Toshio Kuratomi
bffccb5396 fetch idempotence test and deprecate validate_md5
Added an integration test for fetch module idempotence.  (Testing
that validate_checksum is doing what it's supposed to is harder as we'd
have to create a race condition with the downloaded data to trigger it.
Probably need to make that a unittest eventually).

Also give a deprecation message to the validate_md5 parameter so that we
can eventually get rid of it.
2017-04-26 12:00:01 -07:00
KeepZero
98e7d4b49d Set validate_checksum default yes of fetch to match the doc 2017-04-26 09:27:06 -07:00
Abhijeet Kasurde
86a63cfcd7 Handle fetch_url error gracefully (#23821)
Fix adds http response code check for fetch_url.
Also, method in fetch_url call.

Fixes https://github.com/ansible/ansible/issues/23800

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 10:35:40 -05:00
Giuseppe Scrivano
d02a9016a2 Atomic containers (#21366)
* atomic_image: add support for pull --storage=

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

* atomic_container: new module

Manage atomic containers

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-04-26 08:21:08 -07:00
Andrea Tartaglia
d1517f997a fixed RETURN docs for modules (#24011)
* fixed RETURN docs for remaining modules

* updated proxymysql_mysql_users 'sample' to yaml dict

* fixed whitespace errors
2017-04-26 15:56:13 +01:00
Patrick Ogenstad
9a0a7f78d7 asa_command: set default_output to text (#23979) 2017-04-26 09:46:39 -04:00
ka7
b11219440b spelling fixes (non-trivial, might catch a bug) (#23646) 2017-04-26 13:14:34 +01:00
Abhijeet Kasurde
d16fe5bef3 Minor typo and PEP8 fixes for dnf module (#23845)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:57:49 +01:00
Abhijeet Kasurde
9fbbb5e10f Pep8 fixes for mysql module (#23923)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:56:35 +01:00
cptchips
dde383aea2 [Doc] win_package - product_id is a mandatory parameter (#24007)
product_id is a mandatory parameter for windows/win_package module.
2017-04-26 12:36:12 +01:00
Sumedh Sidhaye
be6ca006a2 Corrected -su cmdline option to --su to be consistent with the man page entry (#23899)
Signed-off-by: Sumedh Sidhaye <ssidhaye@redhat.com>
2017-04-25 21:26:20 -07:00
Brian-Williams
8466c808d9 Change wait_for time to utc (#23987) 2017-04-25 17:04:29 -05:00
Brian Coca
e29dc49a49 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control
2017-04-25 14:48:56 -04:00
Ricardo Carrillo Cruz
a3a970180a Unit tests for openvswitch_db module (#23974) 2017-04-25 20:02:55 +02:00
Ganesh Nalawade
09b8badc5e Minor junos_config module changes (#23972)
* Minor junos_config module changes

* Add note for json config support
* Add example for lines argument
* Fix future warning for ElementTree

* Remove unwanted space
2017-04-25 23:09:55 +05:30
Ganesh Nalawade
15c19367d6 Fixes #23960 junos_config fail with config in xml (#23962)
If config is in xml format append it to <configuration>
tag as a instance of Element class.
2017-04-25 22:40:16 +05:30
Chris Madden
8e7c546ef9 Fix name description from lun to volume (#23964)
Help text stated to manage lun name but this module is for managing volumes.  Updated accordingly.
2017-04-25 11:08:43 -04:00
Brian Coca
1a0b94fa17 schedule sudo/su removal 2017-04-25 10:54:23 -04:00
René Moser
3959597f7d exoscale: fix TXT type records handling (#23956) 2017-04-25 13:05:37 +02:00
Trishna Guha
f354bd1eab Set terminal width for network *_command modules to avoid paging (#23728)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-25 14:10:39 +05:30
Trishna Guha
47edac6ebd Remove repetition of code nxos (#23908)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-25 08:37:22 +05:30
Indrajit Raychaudhuri
45252b79be pacman: Fail fast when 'rc != 0'
We fail-fast and display 'stderr' in case 'pacman' returns with 'rc != 0'.
There is no point computing 'module._diff' in such case anyway.

Fixes #23910

(cherry picked from commit 8c6a2a848c)
2017-04-24 21:12:20 -04:00
Brian Coca
72a4e1cf0d fixed code to actually check the parameter not key
also made rest conditional on unit being provided, previouslly it changed from being always required

fixes #23810 alternate to #23907
2017-04-24 20:54:14 -04:00
Kai
cb13aea88b Fix systemd in chroot (#23904)
* Fix systemd in chroot

The 'request ignored' message is in stderr, not stdout.

* Check both stdout and stderr for systemd message

Some versions of systemd report to stderr, others to stdout. Also check
whether output could be a valid normal response to avoid false positives.
2017-04-24 19:53:12 -04:00
Sloane Hertel
d021d8f16b efs: include name in results (#23931) 2017-04-24 17:49:14 -04:00
Sloane Hertel
380ac577c6 [cloud] ec2_facts: make ec2_facts python3 compatible - fixes #23595 (#23872)
* make ec2_facts python3 compatible

* remove parentheses and use pop() instead of del
2017-04-24 16:09:46 -04:00
Brian Coca
a108f0fcd3 avoid hosts 'pre templated warnings' (#23878)
* avoid hosts 'pre templated warnings'

fixed is_template failing on undefined
fixes #23057

* py3 compat
2017-04-24 15:19:52 -04:00
Adrian Likins
e0a7105c2d Use sys.stdout.buffer to write vault bytes to stdout on py3 (#23760)
* Use sys.stdout.buffer to write vault bytes to stdout on py3

We need sys.stdout.buffer on py3 so we can write bytes to it since the plaintext
of the vaulted object could be anything/binary/etc

Before, attempting to write bytes to stdout on py3 would cause:

  TypeError: write() argument must be str, not bytes
2017-04-24 10:09:03 -04:00
Ondra Machacek
80327d9d47 cloud: ovirt: import VM from external source (#22450) 2017-04-24 08:59:35 -04:00
Sloane Hertel
00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 2017-04-23 09:19:22 +02:00
Brian Coca
35e03cb140 p8p 2017-04-21 23:36:44 -04:00
Brian Coca
27185f44b0 fix environment populated detection
fixes #23764
2017-04-21 18:21:01 -04:00
Ondra Machacek
13c2c292f2 cloud: ovirt: add note that modules works with RHV as well (#23808) 2017-04-22 00:20:24 +02:00
Brian Coca
4594bee65a keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

* deal with complex data for is_template

* typos
2017-04-21 16:07:38 -04:00
Brian Coca
3358abcf49 Add a new filter: strftime. Use the well known function to format a date output. (#23832)
(cherry picked from commit 3f5b304fc2)
rebased for @yannig
2017-04-21 11:48:45 -07:00
Ricardo Carrillo Cruz
8517fbf936 Remove catch-all regex on IOS terminal plugin (#23858)
We have a list of specific messages that we scree-scrape and flag
them as legit errors.
However, we also have a catch-all regex that matches everything
starting with %.
That can cause issues on commands that return lines with that
character, like for example the 'crypto key generate'.

Fixes #23770
2017-04-21 15:30:23 +02:00
Ganesh Nalawade
04ae977f39 Fix display argument defualt value (#23859) 2017-04-21 18:58:38 +05:30
Michael Scherer
78836ec0b9 Fix --force for unversionned requirements (#23391)
In current stable (2.2), ansible galaxy install --force do erase
a role, even if the version is not set. This commit should restore
that specific behavior, in accordance to people reports:
  https://github.com/ansible/ansible/issues/11266#issuecomment-273801480

It was also the behavior planned in the initial discussion:
"if you're not fixing versions in your roles file, then it's fine
to expect that the role will be reinstalled each time you run
ansible-galaxy install.", cf https://github.com/ansible/ansible/pull/12904
2017-04-21 07:40:47 -04:00
Ricardo Carrillo Cruz
d0fd8cefaa Fix the iosxr_facts mem gathering (#23850)
We were not calling match.group, plus we were lacking a ':' from
the expected output of 'show memory summary'.

Fixes #23737
2017-04-21 10:41:50 +02:00
Trishna Guha
8ec4882ba0 Add eos_user module to users parameter (#23847)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-21 13:22:59 +05:30
Ganesh Nalawade
01afe12cba Add doc for display argument of junos_command (#23804) 2017-04-21 02:31:51 -04:00
Matt Davis
02ed223d49 template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
2017-04-20 20:33:48 -07:00
Brian Coca
79b9c585ea less code
(cherry picked from commit 20d9f79a5250e764ffeddb046aeb82b7824ed952)
2017-04-20 22:05:55 -04:00
Brian Coca
eb887b8062 Revert "fixes play context connection user (#21776)" (#23830)
* Revert "fixes play context connection user (#21776)"

This reverts commit 58ee661437.
fixes #23530

* preserve original in copy

updated comment to clarify wtf is going on here
2017-04-20 18:03:03 -04:00
Abhijeet Kasurde
527a7762e1 Use regex variable in eos_user.py (#23797)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 17:04:09 -04:00
Sloane Hertel
91644167c9 improve exception handling (#23722)
make pep8
2017-04-20 16:40:37 -04:00
Sloane Hertel
11c292bac2 route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option

* make route53_facts pep8 and remove from legacy files
2017-04-20 16:34:43 -04:00
Nathaniel Case
0c2a0c7bce Eos port default values (#23829)
* Hook port back up for eos cli transport

* The default values have moved

* Why not have conditional defaults?
2017-04-20 15:58:45 -04:00
Brian Coca
b4b96143fe also skip polling when async failed 2017-04-20 15:47:24 -04:00
Nathaniel Case
9bcc3f298f EOS default transport (#23824)
* Give a default to eos transport
2017-04-20 15:02:42 -04:00
Matt Babineau
4914164717 Typo (#23778)
Missed that D...
2017-04-20 10:36:09 -07:00
Brian Coca
fe9af903f3 script fails on async 2017-04-20 11:49:10 -04:00
Brian Coca
602a2bca1b fix vars file selection
fixes #17382
alternate to #22979

deal with cases in which group/host have . in name
updated as per feedbck
only be strict about extension when doing dirs
also avoid ~ endings
2017-04-20 11:44:26 -04:00
Brian Coca
3965689328 finer grained failed/skipped on async for actions
fixes #23729
2017-04-20 10:58:50 -04:00
Logan Attwood
5bbf0d9cb6 Use isfile check on package manager paths 2017-04-20 07:42:58 -07:00
Brian Coca
631a10745d fix hashing when path is symlink 2017-04-20 10:35:59 -04:00
Trishna Guha
b2129a7d3a Add eos_banner as module to banner param (#23789)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-20 15:42:40 +05:30
Loïc Blot
504a768636 Show UUID instead of name when using UUID to select snapshot (#23787) 2017-04-20 11:11:04 +01:00
Abhijeet
cc745b0224 Minor typo in vmware_guest_facts (#23791)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 11:04:03 +01:00
Timo Benk
79943b86a1 fix ansible galaxy file mangling (#23703)
without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.

The previous code could affect the entire path and even filenames.
If a file path has the top level dir name as a substring, galaxy
replaces it with ''. In one example, the archive top level dir
is 'go', so 'files/go-bin.sh' becomes 'files/-bin.sh'.

Fixes #22572, #23694, #23623
2017-04-19 14:15:20 -04:00
Toshio Kuratomi
a31e9bd9ea Really minor optimization and style change for d0e3d75381
* Use a generator expression instead of a list comprehension
* Use copy() to create a new set instead of the constructor.
2017-04-19 10:24:42 -07:00
Bart van Bragt
d0e3d75381 Remove whitespace from unix group names 2017-04-19 09:42:00 -07:00
Abhijeet
27f776f97d Fix for setting values using gconftool-2 (#23713)
Miscallenous fixes added to make gconftool-2 work.

Fixes https://github.com/ansible/ansible/issues/23670

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-19 14:20:21 +01:00
Sloane Hertel
d63af51f90 s3_sync: removing irrelevant s3.list_buckets() call - fixes #23409 (#23492)
* Removing irrelevant s3 call

Fix exception handling

Make s3_sync pep8 and remove from legacy file
2017-04-18 16:49:10 -04:00
Brian Coca
3f62dfda92 nicer docs 2017-04-18 13:13:14 -04:00
Adrian Likins
ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
2017-04-18 13:09:02 -04:00
Matt Martz
f82d95ae28 When become_method is su, self._play_context.prompt is a function. Fixes #23689 2017-04-18 13:01:18 -04:00
Ganesh Nalawade
bf1a543f06 Make warning logs consistent (#23666)
* Make warning logs consistent

Arguments outside provider with default
value should not log as warning in case
it is not mentioned in play.

* Make nxos timeout default consistent and add comments

* Make comments more verbose
2017-04-18 21:59:38 +05:30
Daniel Shepherd
698fa37a44 [cloud] Fix #23152 in route53 module and pep8 cleanup (#23156)
update module to support more standard state=present/absent syntax

update module to use required_if, required_together, mutually_exclusive functions where possible

per ryansb review: make documentation section more clear, fix some extra quotes, remove FIXME comment

pre willthames review: force private_zone to True if vpc_id is set and fix word wrap
2017-04-18 11:49:25 -04:00
Brian Coca
586fcae398 tolerate 'batch' systems that mess with stdin (#23596)
* tolerate 'batch' systems taht mess with stdin

fixes #23541

* have pause on windows tolerate devnull

* tuplie
2017-04-18 11:39:49 -04:00
Brian Coca
1ef2b6b302 added mongodb lookup docs 2017-04-18 11:12:09 -04:00
Nathaniel Case
0b4cebfb8b nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
2017-04-18 10:49:47 -04:00
Yanis Guenane
fdce6484ec crypto/openssl_csr: Specify proper Ansible version
The commit was started before 2.3 was branched, but was only merged once
2.3 was actually branched. This leads to documentation stating this
module is new in 2.3 when it will be actually new in 2.4
2017-04-18 15:46:07 +02:00
Kevin Brebanov
5775bb2a4e apk: Fix regex search patterns
Regex patterns were not being escaped properly so package names
containing characters that could be interpreted as regex symbols
were causing failures.

Fixes: #19714
2017-04-18 15:07:55 +02:00
adejoux
9f62ef7c0a Added AIX LV module (#20574)
* Added AIX LVM module

* implemented requested changes

* fixed Terabytes size calculation

* implemented recommendations from tmshn

* moved up lv display command definition

* added type to copies parameter

* applied recommendations

* missed chlv command

* fixed build error

* fixed typo in email address

* applied new pep reco

* fix bug
2017-04-18 15:05:08 +02:00
Will Thames
9229d53143 [cloud] Add ec2_vpc_dhcp_options_facts check mode (#23106)
* Support check mode in ec2_vpc_dhcp_options_facts

As a facts module, ec2_vpc_dhcp_options_facts supports check mode
by default

* ec2_vpc_dhcp_options_facts tidy up

Use named method imports, move imports to top of code
Use shared code to handle filters and tags
Use snake case for parameter names while retaining backward compatibility
2017-04-18 08:56:38 -04:00
Dag Wieers
071903b868 vmware_guest_snapshots: Add delegate_to directive to examples (#22933)
Without it it is not doing what most people would expect.
2017-04-18 12:53:55 +00:00
Toshio Kuratomi
a06014663c display path to module_utils files in verbosity vvv. 2017-04-17 15:08:14 -07:00
Andrew Gaffney
ce43e80d11 Allow specifying timeout on a per-host basis 2017-04-17 15:21:49 -04:00
Antoine Cotten
7c308b3f8c Fix nonexistent module_name in callbacks (#23587) 2017-04-17 12:16:19 -07:00
Ken Celenza
b8507b676b Remove Warning for provider (#23652) 2017-04-18 00:36:24 +05:30
Nathaniel Case
e1dcc01d3a pep8 fix for Shippable 2017-04-17 13:18:34 -04:00
Daniel
bbb9f3164c Nxos vxlan vtep vni netcfg fix (#23620)
* Code cleanup
Removed 'add' method from CustomNetworkConfig.  It is identical
to the one inherited from NetworkConfig

* Removed unused CustomNetworkConfig import

* Replaced
```
def get_existing(module, args):
    existing = {}
    netcfg = get_config(module)
    config = netcfg.get_section(parents)
```
with
```
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
```
get_config returns a string, not an object in 2.3.

* Removed non-functioning get_object method in CustomNetworkConfig in favor of the
inherited method.

Added child_objs property so that expand_selection would work.  The original
verion never worked correctly as it compared NetworkConfig obj's and str's.

* Removed ShellError method in favor or new load_config method.

* Removed ShellError method in favor or new load_config method.
fixes #20260

* nxos requires a "no" statement to change mcase group.  Corrected.
Corrected changed logic.

* Corrected deleted CustomNetworkConfig import
2017-04-17 12:40:13 -04:00
Nathaniel Case
e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
2017-04-17 08:51:38 -04:00
Ganesh Nalawade
89752cc34f Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
Abhijeet
89fc098488 Update package installation warning (#23641)
Github_release requires github3.py==1.0.0a4, update warning
for the same.

Fixes https://github.com/ansible/ansible/issues/23626

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-16 07:10:36 -04:00
Andreas Olsson
40f9f98f7c Fix documented defaults in the nsupdate module (#23532)
Let the documentation reflect what the module actually implements.
2017-04-15 17:09:47 +01:00
Manuel Sousa
8b4f5ba064 Fix #23338 - rabbitmq_queue message ttl can't be 0 (#23448) 2017-04-15 00:51:40 +02:00
Peter Sprygada
c2370f14dd fixes issue where network modules would ignore provider host value (#23589)
This addresses a problem where the action plugin would ignore the
remote_addr value for the host.  In this case, only the inventory values
for the hostname would be considered and populate the remote host
remote_addr value for the connection plugin.
2017-04-14 15:38:52 +05:30
Brian Coca
313591f8b8 removed debug print 2017-04-13 15:12:40 -04:00
Bradley Phipps
abf5d6e682 eu-west-1a is an availability zone, not a region. (#23557) 2017-04-13 12:11:00 -07:00
Dag Wieers
246c84b92a Windows: Get rid of Set-Attr in remaining modules (#23525)
Only a few more modules were using Set-Attr on the $result object rather
than using a normal hashtable. This PR changes the PSObject to a
hashtable and gets rid of Set-Attr.
2017-04-13 11:34:33 -07:00
Łukasz Kostka
94bd647bc0 Fix alarm action comparison (#23523)
This fixes issue when list from module contains more than one element.
Ansible and/or boto may put same elements in list in different order,
thus resulting task as changed.

Fixes #3310
2017-04-13 11:27:48 -07:00
claer
811eb66703 Improve Fortios IPv4 policy with logging capabilities and use the backup_filename param (#23544)
* Improve Fortios IPv4 policy with logging capabilities. While there, fix typos in examples. forti_config: use the backup_filename param and dont enforce the the filename value.

* forti-typos

* Add version_added for new options in the documentation
2017-04-13 12:20:06 -04:00
John R Barker
92a425a532 Make it easier to find network modules (#23576)
* Make it easier to find network modules

Feedback has been it's difficult (via Google or directly) to find
modules as some people search for the company name vs product name,
therefore specify both.

* "IOS XR" (not "IOS-XR")
2017-04-13 12:14:33 -04:00
John R Barker
2bb25d031b network_cli modules don't always return stdout or stdout_lines (#23573)
It's possible that if the module has a low-level failure, such as
"unable to open shell", or something else in the action plugin that
stdout and stdout_lines will not be returned.

Update the documentation to clarify this point.
2017-04-13 11:59:23 -04:00
Brian Coca
952e842720 less code 2017-04-13 11:21:11 -04:00
Matt Parkes
f0f20d8a1c ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
2017-04-13 11:08:21 -04:00
Brian Coca
5b7e8a7bd6 centralize ansible_managed and other template vars
now template lookup supports these again.
2017-04-13 11:03:11 -04:00
Brian Coca
f7566ef1f1 removed extra 'changed' from debug output 2017-04-13 11:03:11 -04:00
Senthil Kumar Ganesan
c86feeaed9 Error string:Regular expression updates (#23426) 2017-04-13 09:12:32 -04:00
Brian Coca
df5895e585 fix environment validation, make setup exception
removed bare vars
now environment inheritance correclty prepends
this allows more local to override more general

fixes #23180
2017-04-12 18:34:29 -04:00
Patrick Marques
731fc288fa fixes #4441 passing subnet_name parameter (#18920) 2017-04-12 10:58:56 -07:00
John R Barker
902bc58509 [WIP] Network return docs (#23441)
Network return docs
2017-04-12 13:13:41 -04:00
Jamie Lennox
92dc61e869 Allow modifying security groups in os_server (#23207)
When the security groups specified to the os_server module change they
should be updated on the server. This will require shade 1.19 where the
server security group commands were added.

Fixes: #23206
2017-04-12 18:19:15 +02:00
Colin Nolan
57c67f0c08 Add checks to confirm that the output from xfs_info has the expected format. 2017-04-12 08:34:51 -07:00
Abhijeet Kasurde
ba3295dd3f Pylint fixes for yum module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-11 16:31:35 -07:00
Abhijeet Kasurde
db6d818865 Fix atomic pylint issues
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-11 16:26:51 -07:00
Sloane Hertel
2f64e2c7fb [cloud] ec2_asg: check autoscaling group for tags before trying to use them - partially fixes #23234 (#23259)
* check autoscaling group for tags before trying to use them

* Add warning

fix comparison
2017-04-11 16:15:05 -04:00
Sloane Hertel
5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
2017-04-11 16:02:14 -04:00
Ritesh Khadgaray
40d888922b stat: better documentation
- md5 fails if the file is not a regular file ( symlink, dir,..)
2017-04-11 12:19:07 -04:00
Albert Casademont
54316f7da0 Fix Postgres user module always reporting changes (#23488) 2017-04-11 08:09:16 -04:00
Hao Wang
3b5dd4e0a0 file module doesn't create hard link to given target directory 2017-04-10 12:20:46 -04:00
Toshio Kuratomi
b4f976e9b9 When apt errors, include it's exit code
We invoke /usr/bin/apt inside of the ansible module.  When that command
exits, it doesn't always include a helpful error message.  Include the
exit code so that user's have all the information we can gice them as to
why apt failed.

Addresses #19128
2017-04-10 11:41:09 -04:00
Luis Rueda
753d30b64d Rebase using latest devel branch in order to fix conflicts (#23199) 2017-04-09 18:06:06 -04:00
Ken Celenza
83a6d90899 Update Banner Doc (#23412)
I think most people's banner will come from an external file. Show an example, and clarify there is no extra lines allowed.
2017-04-09 17:00:54 +01:00
Khachatur Nazaretyan
e8f1747a88 Adds attached volumes to instance facts (#23132)
* Adds attached volumes to instance facts

* Fixed identation and modified coding style

* includes revisions after maintainers review

* Coding style modified

* simplifies getting items from dict
2017-04-09 11:59:41 +02:00
Indrajit Raychaudhuri
971187e54c pacman: Fix package matching pattern in upgraded package list (#23433)
(cherry picked from commit 9a850db605)
2017-04-09 11:39:40 +02:00
Dmitry Sobolev
1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
2017-04-08 12:53:35 -07:00
Dag Wieers
a075c56dbf vmware_guest_facts: Add delegate_to directive to example (#22931)
Without it, this is not going to do what most people expect.

This fixes #22840
2017-04-08 07:10:35 +01:00
Lucas Alvares Gomes
cee8cc2a52 rpm_key: Decode bytes to string to work with Python 3 (Fixes #20326) (#20385)
* rpm_key: Decode bytes to string to work with Python 3 (#20326)

The read() method will return bytes we need to then decode() those bytes
to a string before trying to match() it using the re module.

* Make the rpm_key pgp regex more robust on both py2 and py3
2017-04-07 16:22:39 -07:00
Nathaniel Case
86c714548f Redo #23418 (#23425)
* Check for provider values inside check_args of respective network code

* Partial revert of b9ee5aa

The no_log change is okay, but take out the action result munging
2017-04-07 19:22:17 -04:00
Karl Bergström
c7860d4d4b Open unarchive file in binary mode
Recent Python3 versions require open() to specify binary mode if the data is anything other than text.

Python3: Use int() instead of long() in unarchive

Changes long() to int() for CRC values in the unarchive module. Affects unarchiving of zip files. Since CRC values in zipfile are 32 bits the behaviour should be unchanged even in Python 2.
2017-04-07 15:05:25 -07:00
Paul Montero
1963e506ec Open file in binary mode for python3 2017-04-07 14:47:28 -07:00
Toshio Kuratomi
2fdb8e7f90 Fix a traceback with python3 and diff output
When retrieving file contents for diffing we need to get the contents as
binary.  Otherwise python3 will try to convert the file to text and fail
with non-decodable contents.

Fixes #23171
2017-04-07 14:35:50 -07:00
Chris Alfonso
d4bd54d3b8 Fixes #23388 Network provider masks too much (#23418)
* Fixes #23388 Network provider masks too much

* Fix trailing whitespace
2017-04-07 14:34:47 -06:00
Dag Wieers
3648e6fd2b vmware_guest: Add delegate_to directive to examples (#22932)
Without this it is likely not going to do what people expect.
2017-04-07 18:17:18 +01:00
Brian Coca
0d5d5f2bf6 correctly get all hosts in 'all' 2017-04-07 13:17:03 -04:00
Pierre-Alexandre
283a88444f BUGFIX : using yaml hosts inventory, hosts in groups weren't added to the group 'all' 2017-04-07 13:16:14 -04:00
Matt Martz
621e27b5dd Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works

* Add docs for new client cert authentication

* Support older versions of python

* Simplify logic

* Initial support for client certs in urls.py

* Add an extra test

* Add a get_url test for client cert auth

* Add additional test for client cert auth, with validation and ssl mismatch

* Skip assert when http tester not available

* Update version_added for new options
2017-04-07 09:54:37 -07:00
Ganesh Nalawade
3934513121 Fix a10 pylint issues (#23410)
* Fix a10 pylint issues
* Moving imports to standard location
2017-04-07 22:23:55 +05:30
Toshio Kuratomi
78ced5318f Fix for recursive copy slowness
Copy module was walking over files in subdirectories repeatedly (a
directory tree a few levels deep could bring the time spent into the
tens of minutes)

This was traced to the fix for this bug report: https://github.com/ansible/ansible/issues/13013

Fixed #13013 a different way and added an integration test to check for
regressions of #13013 as we optimize this code.

Fixes #21513
2017-04-07 12:41:42 -04:00
Matt Martz
13ac993d25 Fallback to old ssl_wrap_socket 2017-04-07 09:19:26 -07:00
Matt Martz
33f7a27cba Use PyOpenSSLContext instead of deprecated wrap_ssl_context from urllib3.contrib.pyopenssl. Fixes #18528 2017-04-07 09:19:26 -07:00
Strahinja Kustudić
9f0be5a556 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.
2017-04-07 09:06:28 -07:00
Ricardo Carrillo Cruz
ba7ba7adc3 Check for proper response key on eos_banner map_config_to_obj (#23399)
If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!
2017-04-07 15:32:10 +02:00
Matt Clay
48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
2017-04-06 16:58:16 -07:00
John R Barker
6633ae1afa look_for_keys & allow_agent actually added in 2.4
https://github.com/ansible/ansible/pull/22429 was merged, though not cherry picked into stable-2.3, so update docs
2017-04-06 19:17:59 +01:00
Guillaume Coré
3c75808c5c fix incorrect parsing of xfs_info
when device name ends with 'data' line matches in :
-                if 'data ' in line:

closes #23352
2017-04-06 11:11:13 -07:00
Toshio Kuratomi
dcc63c8f93 Fix imports and pep8 problems so CI can pass again. 2017-04-06 10:41:18 -07:00
Ricardo Carrillo Cruz
3537b24742 Unhardcode the port and protocol on eos EAPI (#23350)
We were hard-coding the protocol, port and validate_certs on
eos EAPI via the action plugin.
Put defaults on the eos_argument_spec and pull those values from it.
2017-04-06 19:18:28 +02:00
Toshio Kuratomi
5f4673b5ae Update metadata for openssl_csr 2017-04-06 10:16:50 -07:00
Ganesh Nalawade
0cd50f0706 Fix #22880 junos_config update issue (#23333)
For update parameter add 'override' as acceptable value.
'override' name is in sync with junos naming convention.
2017-04-06 12:59:33 -04:00
Chris Alfonso
394cb3477b Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363) 2017-04-06 10:58:04 -06:00
Ganesh Nalawade
990ba90380 Fix #23360 junos_config set format issue (#23365) 2017-04-06 10:45:15 -06:00
Nathaniel Case
98c23a3342 Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated
then.
2017-04-06 12:26:17 -04:00
nerzhul
637e9942ff Nsupdate idempotency fix 2017-04-06 09:20:01 -07:00
Yanis Guenane
2705e7a8aa crypto: Add new module openssl_csr (#21004)
This new module allows one to automate the generation of OpenSSL
Certificate Signing Request. It supports SAN extension.
2017-04-06 18:09:07 +02:00
Peter Sprygada
f0008248d4 fix iosxr commands to encode json (#23346)
the command dict in the iosxr module_utils wasn't encoding the request
to json.  this patch will fix that problem
2017-04-06 15:44:21 +01:00
John R Barker
13dc02d49d More network_debug_troubleshooting.html (#23335)
More "unable to open shell" -> network_debug_troubleshooting.html
2017-04-06 12:39:59 +01:00
Takuya Sato
dff35bc205 ecs_taskdefinition module : Convert environment variables to string (#23297)
Before modification, it fails unless it is a string type
2017-04-06 10:46:40 +01:00
John R Barker
529df8640b 'unable to open shell' -> direct to web help (#23267)
* 'unable to open shell' -> direct to web help

The "unable to open shell" error is returned for a number of different,
direct people to online docs (we we can update out of band of releases)
to guide them though the various solutions.

* fix pep8 errors
2017-04-06 10:11:28 +01:00
Varadharajan
4540853a50 Pass CSRF token along with Jenkins POST requests (#23250) 2017-04-06 10:03:57 +01:00
Matt Davis
b71b157fb3 Cleanse CLIXML from win_shell stderr (#23329)
prunes all but Error stream values
2017-04-06 01:39:20 -07:00
Matt Davis
8d291f91ee improve become_method: runas error handling (#23328)
Prescriptive errors for username/password issues and NTLM/Kerb auth failures, cleans up exception noise.
2017-04-06 01:34:30 -07:00
Dag Wieers
e66c98281e Small consistency fixes (#23294) 2017-04-05 22:03:29 +01:00
Ricardo Carrillo Cruz
b9b4e68206 Check text key exists on eos_banner absent case (#23319)
This can fail if we don't check the key exists.
2017-04-05 21:07:18 +02:00
Chris Alfonso
3a78861cb5 Fixes #23308 ios_banner: KeyError: 'text' on state: absen (#23313) 2017-04-05 11:30:40 -06:00
Nathaniel Case
d890167575 Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
2017-04-05 11:47:37 -04:00
John R Barker
485affeb12 eapi & nxapi: Document validate_certs (#23305)
* Document validate_certs for eapu & nxapi

* formatting
2017-04-05 16:37:40 +01:00
Tim Rupp
780b2f2c84 Fixes pylint errors (#23279)
Reported by gundalow, this fixes pylint errors in F5 modules
2017-04-05 14:24:42 +01:00
Will Thames
b3a15e9ac3 [cloud] New AWS ec2_vpc_endpoint module for creating/deleting VPC endpoints (#20212)
* New AWS VPC Endpoint module for creating and deleting VPC endpoints

* Fix for python3, update version_added, fix flake8 issues

Change exception syntax for python 3
Update version_added to 2.3
Fix some minor flake8 issues

* ec2_vpc_endpoint: improve standards compliance

* Better documentation
* Return results in camel case format
* Improved exception handling
* Added `policy_file` argument
* Add ANSIBLE_METADATA

* Fix version_added

* Update ansible metadata to have metadata_version field
2017-04-05 08:28:52 -04:00
Benjamin Jolivot
f74a9abbda fortios_ipv4_policy.py state=absent Fix 23239 (#23242)
* Resolve #23239:
  - path is missing when state=absent
  - update doc for unclear policy ID
  - required params based on state

* Fix pep8 + doc

* Fix doc

* Another doc problem...

* doc

* Update doc fot policy ID

* Fix doc string

* fix required in doc

* fix required in doc Required when I(state=present).
2017-04-05 13:27:34 +01:00
Ricardo Carrillo Cruz
2571d2f64b Refactor openvswitch_db module (#23288)
The openvswitch_db module uses the ovs-vsctl binary to
address changes.
On other network modules we follow the pattern of returning 'commands'
as part of the result, containing the commands run on the target device.
Follow that for code consistency and maintenance.
Also, adding state param, which allows to add/remove keys on columns.
2017-04-05 13:27:52 +02:00
Nathaniel Case
e8538213fa Fix various junos errors (#23278) 2017-04-05 16:42:13 +05:30
Ganesh Nalawade
0b8ca98c48 Fix junos rollback id validate issue (#23283) 2017-04-05 16:41:11 +05:30
Toshio Kuratomi
572e9a8959 Update the metadata of the proxysql modules to 1.0 final format 2017-04-04 14:20:17 -07:00
James Cammarata
a567c5de65 Only insert notified host if it's not already notified for certain cases
Fixes #18178
2017-04-04 16:03:29 -05:00
bmildren
21ab4343e3 Adding support for ProxySQL (#19872)
* Adding support for ProxySQL
2017-04-04 13:47:19 -07:00
Brian Coca
00231c29ba Revert "keep ansible_local as top level var, always present"
This reverts commit 97cb2016d8.

It was causing issues downstream as facts seem to be merged back for
subsequent tasks. Will restore if I ever figure out how to avoid that.
2017-04-04 16:30:57 -04:00
Matt Clay
a6ca849643 Fix PEP 8 issues. 2017-04-04 12:22:47 -07:00
JP Mens
5a0b2fe3be dig lookup-plugin: add support for specifying rdclass (#10493)
* add support for specifying rdclass

* fix exception
2017-04-04 15:00:56 -04:00
Nathaniel Case
597bca3129 junos_config: Remove reliance on ability to output configuration in set format (#23225)
* Remove reliance on ability to output configuration in `set` format
* Support multiple warnings per rpc-reply
2017-04-04 15:00:00 -04:00
Robin Roth
6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
2017-04-04 14:12:06 -04:00
Rob
7e3af115ce Add ability to use either sec group name or sec group id or combinati… (#21049)
* Add ability to use either sec group name or sec group id or combination to ec2_lc. Also fix header size in AWS Guidelines

* Fix ec2 import to only import neccessary packages. Remove pep8 double line
2017-04-04 14:11:21 -04:00
Brian Coca
2f3ca66fbf fixed version 2017-04-04 14:09:28 -04:00
anryko
bd05c653fd ec2_group: add ports and multiple source lists (#19888). 2017-04-04 14:09:24 -04:00
Brian Coca
7d64ac95df doc notes 2017-04-04 14:08:07 -04:00
Mark Chappell
c5edaf5e68 ec2_lc.py: Also pass 'encrypted' when adding a volume
This only allows for using the default KMS keys, but enables encryption
at rest without needing to migrate the module to boto3
2017-04-04 14:07:03 -04:00
rmcintosh
312494d452 Add support for custom kernelid specification in Linode module 2017-04-04 10:50:39 -07:00
Chulki Lee
99ef1f3a9f git: git reset with branch
`git reset <ref>` can be ambiguous and fail to switch to the correct branch.
To avoid it, specify branch as well.
2017-04-04 10:45:04 -07:00
Dag Wieers
0715430829 win_chocolatey: Perform exact presence check (#23098)
The current implementation matches libreoffice-oldstable when testing for libreoffice.
So uninstalling libreoffice fails when libreoffice-oldstable is installed.

```
PS C:\WINDOWS\system32> choco list --local-only libreoffice
Chocolatey v0.10.3
libreoffice-oldstable 5.2.6
1 packages installed.
PS C:\WINDOWS\system32> choco list --local-only --exact libreoffice
Chocolatey v0.10.3
0 packages installed.
```

The solution is easy, just add `--exact`.
2017-04-04 09:39:27 -07:00
Toshio Kuratomi
6bad4e57bd Migrate most uses of if type() to if isinstance()
Also convert those checks to use abcs instead of dict and list.

Make a sentinel class for strategies to report when they've reache the end
2017-04-04 08:17:20 -07:00
Ricardo Carrillo Cruz
64fe7402ff Pull filesystems from dict in case is not string on eos_facts (#23254)
Apparently in some devices the filesystems gathering command can return
a dict containing a 'messages' key with the filesystems, instead of a
plain string.

Fixes #23217
2017-04-04 16:04:00 +02:00
bentaylornz
95c1b07bdb [cloud] re-raise boto ClientError if throttling timeout is reached in efs.py (#23109)
* re-raise exception as expected

The current ThrottlingException handling code hides other actual exceptions from the user, and basically goes infinite loop instead. eg when the api caller doesn't have permission (example below) to use the api, ansible effectively hangs. adding the re-raise stops execution and shows the error to the command line as expected

can test by removing permission to the efs api, and calling the efs: module

The error was: botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the DescribeFileSystems operation: User: <x> is not authorized to perform: elasticfilesystem:DescribeFileSystems on the specified resource

* PEP8 fix
2017-04-04 08:41:20 -04:00
Will Thames
bded5ac987 [cloud] Support check_mode for ec2_vpc_subnet_facts (#23111)
* Support check_mode for ec2_vpc_subnet_facts

facts modules support check mode by default

* ec2_vpc_subnet_facts pep8 tidy up
2017-04-04 08:34:49 -04:00
Will Thames
2be64b8c3a [cloud] Support check_mode for ec2_vpc_route_table_facts (#23116)
As a facts module, just needs supports_check_mode to be
set in the argument_spec
2017-04-04 08:31:26 -04:00
Will Thames
ec01aac983 [cloud] Support check_mode for ec2_vpc_nat_gateway_facts (#23114)
As a facts module, just needs supports_check_mode switched on
2017-04-04 08:31:01 -04:00
Will Thames
e61be9ea78 [cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)
* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
2017-04-04 08:29:48 -04:00
Matt Clay
64458bc9a1 Fix deploy_helper join exception on no release. 2017-04-03 16:35:31 -07:00
Ricardo Carrillo Cruz
2e89126af7 Remove dupe supports_session method from eos module_utils (#23240)
Fixes #23237
2017-04-04 00:46:10 +02:00
Matt Davis
d85f4a443f mark runas become method experimental (#23235)
Due to the number of "real world" caveats in the current runas become method, it was agreed that we'd warn that it's experimental on use. A potential future version based on LogonUser/CreateProcessAsUser will have very different requirements and limitations.
2017-04-03 13:46:51 -07:00
Brian Coca
eb78da68dd allow plugins to override fragments 2017-04-03 15:24:13 -04:00
Jordan Borean
3e1a16c574 win_find fix up age parameter (#23195) 2017-04-03 11:43:07 -07:00
Jordan Borean
4d1b97d1ae win_stat change return islink to islnk to match stat (#23196) 2017-04-03 11:38:34 -07:00
Jacob McGill
5918bebd6e Update fortios_config.py (#23230) 2017-04-03 19:22:57 +01:00
Sergey
9a43603761 [cloud] Added account selection to PubNub BLOCKS (#23160)
* . switched from 'user.id' to 'account.id' in REST API calls.
+ added ability to select desired account (by name or identifier) from list of accounts to which authorized user have access.

* + added account option addition version.

* Remove pubnub_blocks from PEP8-legacy list
2017-04-03 14:05:38 -04:00
Adrian Likins
15bd7e48da Add ansible executable path (argv[0]) to --version (#22262)
For example:

    ansible 2.3.0 (argv0_in_version f53921093f) last updated 2017/03/03 13:33:31 (GMT -400)
      config file = /home/adrian/.ansible.cfg
      configured module search path = Default w/o overrides
      executable location = /home/adrian/src/ansible/bin/ansible

This should help troubleshooting install issues.
2017-04-03 14:01:59 -04:00
Will Thames
cd19964bca [cloud] Support check_mode for ec2_group_facts (#23164)
Update imports to use named imports
2017-04-03 13:45:38 -04:00
Prasad Katti
2b18c0ed07 [cloud][docs] Must use the count_tag option with exact_count (#23167)
Fixed an example in ec2 module. The example does not work without
count_tag option.
2017-04-03 13:40:12 -04:00
Adrian Likins
dbc0c01c86 Show 'ansible' python module paths in --version (#22264)
* Show 'ansible' python module paths in --version
2017-04-03 12:42:58 -04:00
Strahinja Kustudić
7358bf88e2 Fixes ignoreerrors not working with sysctl_set 2017-04-03 06:37:09 -07:00
Sloane Hertel
224b5d5283 remove vpc requirement for default outbound traffic (#22743) 2017-04-03 08:16:03 -04:00
Ryan Brown
2196fa0e95 [cloud][tests] fixtures for placebo to test AWS modules using boto3 (#21253)
* [cloud][tests] Create fixtures for using placebo to test boto3-using modules

* Use pytest's importorskip instead of manually skipping on missing deps

* Fix imports in cloudformation module

* Delete unused code

* Add maybe_sleep fixtures to speed up recorded test runs

* Build basic placebo-CFN tests

* Commit placebo recordings of basic stack operations

* Add placebo to test-requires

* Allow unit tests to run regardless of environment by setting a default region

* Use explicit relative import for Python 3 compat

* Use __name__ attribute that works on Python 2 and 3
2017-03-31 15:31:12 -04:00
Senthil Kumar Ganesan
632270b913 Updated the Regex for promt matching (#23186) 2017-03-31 18:29:45 +01:00
AlexanderStock
e4206d8ef5 Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot (#23141)
* Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot

* Update cs_firewall.py

Fixed whitespace

* Added doc for Cloudstack Tags in Volume,Template,FWRule,PF Rule,ISO,Snapshot
2017-03-31 18:39:30 +02:00
smaftoul
9812d211e7 typo: psuedo -> pseudo (#23177) 2017-03-31 10:48:29 -04:00
Will Thames
9a3a0d731f Fix typo in AWS guidelines doc (#23168)
Change `format_ex` to `format_exc`
2017-03-31 09:57:38 -04:00
Monty Taylor
443102c9f0 Remove old deprecated OpenStack modules (#23002)
These were deprecated back in the 1.x timeframe, so have been deprecated
for the 2 cycles required. They also do things wrong and should be
avoided anyway. Go ahead and remove them.
2017-03-31 15:17:13 +02:00
Will Thames
ef0bc0aa52 Support check_mode for add_host
`add_host` doesn't really actually change anything - there's no
reason why it shouldn't work in `check_mode`.
2017-03-31 00:40:24 -04:00
Tim Rupp
e27b4c2ae4 Removes expanduser in favor of type path
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
2017-03-31 00:24:38 -04:00
Erwin Lang
3efb11e225 synchronize: Exclude ssh_args from quoting
Makes it possible again to pass more than one argument via ssh_args to the synchronize module.
2017-03-30 19:40:27 -07:00
Tom Melendez
8b677e25c4 [cloud][GCP]: New module gcp_backend_service for load balancer backends (#22857)
* GCP: backend service module

* GCP: rework param-checking code. Fixed a couple of bugs and changed to ValueError instead of custom tuple.

* GCP: fixed commit, spelled out Google Cloud for clarity in module description.
2017-03-30 16:59:35 -04:00
Tim Rupp
2bf7297bf3 Removes expanduser in favor of type path (#21369)
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
2017-03-30 15:31:00 -05:00
Tim Rupp
2a576a1999 Fixes generators and other misc fixes (#22887)
fixed itertools.imap busting several things that used to be lists,
profiles not being set correctly, upon create, when it was a separate
method, allowed port having the wrong lowest port (zero is allowed),
empty port value should just be interpreted as None.
2017-03-30 16:21:18 -04:00
Alex Willmer
f5aa9df1fd Include '/' & '.' when password_hash generates a new salt
The password_hash filter will generate a salt value if none is supplied.
The character set used by Ansible

(upper & lowercase letters, digits)

did not match that used by libc crypt

(upper & lowercase letters, digits, full stop, forward slash).

This resulted in a slightly smaller key space, and hence hashes would be
slightly easier to attack (e.g. by dictionary, brute force).
2017-03-30 12:33:39 -07:00
Sloane Hertel
f5f7a8c681 [cloud] only create new eni if none of the filters lead to one match (#22919) 2017-03-30 14:55:31 -04:00
Sloane Hertel
dab0e75ce0 [cloud] update the local variable route_table with the latest tag changes (#23136) 2017-03-30 14:53:42 -04:00
Jason DeTiberus
3642de9ecc k8s/openshift module_utils split (#23115) 2017-03-30 19:02:17 +02:00
Peter Sprygada
2e476e64cd fixes error parsing lldp neighbors when running nxos_facts (#23134) 2017-03-30 11:30:50 -04:00
Senthil Kumar Ganesan
a0344acd78 Ansible 2.3 feature support for dellos6. (#23084)
* Ansible 2.3 feature support for dellos6.

- With the new Ansible 2.3 infra changes, the dellos modules doesn't work
  (the new infra changes are not backward compatible), so added the below
  changes support it.
- Added the new terminal plugin for DellOS6
- Added the new action plugin for DellOS6
- Modified the modules to work with the new infra.
- with that it adds support for DellOS6 Persistent Connection support.

* Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
2017-03-30 15:26:32 +02:00
Sloane Hertel
44b2859338 ec2: fix instids and res_list being referenced before assigned - fixes #22692 (#23053)
* add else statement to ensure instids is set

set res_list to None to avoid UnboundLocalError and fix iteration over a nonetype by adding an empty tuple

* make res_list empty tuple by default and check for instids before setting tags (fails otherwise)
2017-03-29 20:18:23 -04:00
Konstantin Suvorov
c1b3d6a51f Fix 'sequence' lookup shortcut syntax and documentation (#22989)
* fix 'sequence' lookup shortcut syntax and documentation

* Update playbooks_loops.rst

Minor edits for grammar and clarity.

* Update playbooks_loops.rst

Another tweak for clarity.
2017-03-29 19:11:19 -04:00
Ricardo Carrillo Cruz
1abc73da68 Fix ios_config return on python 2.4 (#23094) 2017-03-30 00:19:43 +02:00
Chris Houseknecht
4099eb41b9 Treats both [] and {} as equal to None (#23088) 2017-03-29 22:48:21 +02:00
Ricardo Carrillo Cruz
66e29f0a7c Do not re.search show configuration stdout if empty (#23087)
If the banner is not set, the stdout of 'show configuration | begin banner <banner>'
returns empty string thus the re.search raises an exception.

Fixes #22216
2017-03-29 22:38:15 +02:00
Peter Sprygada
88ce6fd273 restores pre 2.3 behavior with respects to keys (#23083)
This removes the requirement to configure look_for_keys=False and
restores the behavior to disable key lookup if no key was provided.
2017-03-29 15:12:18 -04:00
Toshio Kuratomi
6f77498700 Split on newlines when searching for become prompt
The fix for leading junk in sudo output: fee6e29 causes problems with
ssh + sudo.  On the initial connection using ControlPersist, the output
that we scan for the prompt contains both the command we're sending to
configure the prompt and the prompt itself.  The code in fee6e29 ends up
sending the password when it sees the line configuring the prompt which
is too early.

Switch to a version that splits on lines and then checks whether the
first or last line starts with the prompt to decide if it's time to send
the password.

Fixes #23054
References #20858
2017-03-29 12:11:10 -07:00
jhawkesworth
4eba248a8e changed parameter name from forest_root_dns_domain to dns_domain_name (to match documentation and other win_domain* modules) and fix example which has win_domain_controller instead of win_domain for module name. (#23081) 2017-03-29 11:34:45 -07:00
jhawkesworth
a3e2280e62 correct examples to match correct _password module parameter names (#23067) 2017-03-29 11:32:33 -07:00
Artem Zinenko
a5da638d34 Fix #22126 (#22128) 2017-03-29 11:29:27 -07:00
Pavel Glushchak
097173c6f5 Added Virtuozzo distribution support
Virtuozzo Linux is based on CentOS sources. Thus OS family
should be recognized as 'RedHat'.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2017-03-29 08:47:05 -07:00
Fabrizio Colonna
3765dc37ca Fixed issue #22996 and issue #22955.
(cherry picked from commit 4465171e89)
2017-03-29 08:30:30 -07:00
Victor Perron
bc44175d8d paramiko_ssh: fix crash upon pass prompt in py3
The pass prompt expects an answer and compares a `str` to a binary buffer, thus crashing.

It's an obvious fix to help transitioning towards Python3 and hopes it does not need a specific test.
2017-03-29 07:47:16 -07:00
Jeremy L. Gaddis
b52dbddc17 Update requirements for seboolean module (fixes #23028) 2017-03-29 07:24:30 -07:00
Ricardo Carrillo Cruz
cc7e09451a Fall-back to show configuration on old IOSXR devices (#22900)
In old IOSXR versions, 'show commit changes diff' does not work.
Fall-back to 'show configuration' if that command fails so execution
can move forward.

Fixes #22235
2017-03-29 16:21:23 +02:00
Dag Wieers
521fa9b458 win_chocolatey: Fix state=latest when absent (#23041)
When using state=latest with the package not being installled, Ansible complains that the package is not installed and fails the task.
Whereas the expected behaviour is to install the package when it is missing.

This PR fixes this behaviour.
2017-03-28 17:49:21 -07:00
Matt Clay
0ed86775f0 Fix PEP 8 issues. 2017-03-28 15:09:44 -07:00
Dr Josef Karthauser
0752906ae5 Add --jail support to pkgng. (#22958)
* Add --jail support to pkgng.

* Bump the version number for the --jail argument.
2017-03-28 17:38:47 -04:00
Brian Coca
37cef2a9eb standarized role/plugin paths 2017-03-28 17:31:24 -04:00
Sloane Hertel
7720ef8ec1 [cloud][python3] bytes fix to make ec2_key work on python 3 (#23051) 2017-03-28 17:00:26 -04:00
Brian Coca
ea7bff4a3f changed spec to options as per irc meeting 2017-03-28 15:55:22 -04:00
Toshio Kuratomi
d3a1aea7c5 Fix a couple issues in synchronize with docker (#23047)
* Fix a couple issues in synchronize with docker

* Make the rsync_opts parse as a list using the same criteria as
  module_utils argumentspec parsing
* Do not quote arguments in the action plugin.  The module will quote as
  it knows whether it will invoke rsync with a shell or via exec.

Fixes #23046
2017-03-28 11:38:37 -07:00
Peter Sprygada
768cb437ab minor updates to network connection plugins (#23043)
* removes unused log() function in network_cli
* adds method comments to terminal plugin base
2017-03-28 12:57:18 -04:00
Brian Coca
c0db6d79f6 minor correction to module path option docs 2017-03-28 11:43:58 -04:00
Brian Coca
99e298a2a6 removed bad ignore as host can override connection
also breaks testing network modules
2017-03-28 11:32:22 -04:00
Evgeni Golov
61579aebb2 cron: don't force changed=True when old crontab was empty
The cron module forces changed=True when there was no real change,
but the original crontab did not contain a final newline, which is
mandatory.

When the user has no crontab or the user does not exist at all,
crontab -l exits with 1 and the cron module correctly interprets
this as "no crontab" and stores the old crontab as "".

However this triggers changed=True, even if we're not going to
change anything, e.g. when removing a crontab entry from a user
who has no crontabs at all.

Let's special-case the fact that the old crontab is empty and not
force changed=True in that case.
2017-03-28 07:45:13 -07:00
Ricardo Carrillo Cruz
6fa3cb55e1 Fix dynamodb pep8 issues (#23032) 2017-03-28 15:11:39 +02:00
Miyurz
1ea1becf23 Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset… (#22502)
* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository

* #22455 Integration test for git module to test if it clones a repository with a file named origin

* Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml

* Removed the newly added target git and moved the code to test/integration/targets/git

* Reorganised code structure as per comments

* Fixed playbook name

* Added code that didn't make it to the playbook before.

* No longer need git.yml

* Remove non tasks specific code from tasks file and use existing variables

* Removed msg var from the vars.yml
2017-03-28 08:41:25 -04:00
nevotheless
ab8578d343 Update netapp_e_amg_sync.py (#22693) 2017-03-28 07:19:05 -04:00
Corey Christous
34a3ab94d8 add tagging to dynamodb_table.py (#20946)
* add tagging to dynamodb_table.py

* fix doc syntax

* address PR comments

* add boto3 has tagging check
2017-03-28 07:18:20 -04:00
Ricardo Carrillo Cruz
a5b12ff269 Introspect flag to use on 'show run' when using defaults in ios_config (#22903)
When the ios_config module has 'defaults' param it runs in the device the command
'show running-config all' but 'all' may not be available in older devices.
This change makes introspection by using the help command and run 'full' in case
'all' is not available.

Fixes #22747
2017-03-28 10:20:52 +02:00
Chris Houseknecht
d2ea851d09 Adds k8s_common.py (#22899) 2017-03-28 02:27:28 +02:00
Mike Hume
a4ae329465 Update __init__.py
Just guessin, but is this how it is supposed to read?
2017-03-27 20:21:40 -04:00
Hugo Chargois
1bc5527c69 Vault: Remove tmp decrypted file when experiencing error while writing (#14835)
* Vault edit: Erase tmp file if error while writing to it

* Close the FDs returned by mkstemp()
2017-03-27 16:52:18 -04:00
Jon "The Nice Guy" Spriggs
8e0c11ebc4 Add examples in os_server module showing userdata (#22997)
* Add examples in os_server module showing userdata

Added an example using Bash and also using Cloud-init. Also, showing using {% raw %} and {% endraw %} to provide a pointer to those hitting similar issues to the ones I had.

* Removed erronious whitespace
2017-03-27 14:44:13 -05:00
Nick Ball
c8364d64d6 [cloud] New module: AWS lightsail (#19846)
* Add AWS lightsail module

* lightsail: fix doc error + badly formatted yaml

* lightsail: code style cleanup

* make requested lightsail changes

* fix imports and pep8

* fix metadata and version

fix yaml

fix RETURN section
2017-03-27 15:10:52 -04:00
Senthil Kumar Ganesan
dd63dfcf1e Ansible 2.3 feature support for dellos9 and dellos10 (#22856)
* Ansible 2.3 feature support for dellos9 and dellos10
* Use Persistent Connection Manager

* Fix CI issue, revert the doc and metadata changes

* Reverted the meta_info (supported_by) to community from core

* Fixed the CI issues, use module_utisl.six and updated legacy-files
2017-03-27 19:32:57 +01:00
John R Barker
f9b75d44e8 pep8 fixes (#23005) 2017-03-27 18:36:20 +01:00
John R Barker
58441869bd metadata_version, not version 2017-03-27 18:25:36 +01:00