Commit graph

19226 commits

Author SHA1 Message Date
David Soper
d1cf9cfeb6 Connection and MAC pool module for Cisco UCS (#31151)
* Initial commit for UcsConnection and ucs_macpool module.
Configures MAC address pools on UCS Manager.

* ansible-doc fixes

* PEP8 fixes

* pep8, pylint, and validate-modules fixes

* Correct indent issue introduced during pycodestyle cleanup

* Simplified module arugment setup.
Placed all code in main to avoid multiple calls and arg passing.

* module_utils/ucs changed to UCSModule which now handles login/logout directly
login_handle removed from module.params
doc updates on mac_list params and change to first_addr/last_addr for mac blocks
checking of all mac params

* Move module_utils to remote_management/ucs
Fix validate-modules issue with docs

* UCS MAC pool integration tests
Fixed issues with MAC pool descr and address range params
2017-12-14 19:38:35 +01:00
Brian Coca
67c83823f2 Add q/query aliases to lookup (#33466)
* Add L alias to lookup, defaults to real list
* renamed to q/query as per core meeting
* also force wantlist=true
2017-12-14 11:53:00 -06:00
John R Barker
f127e5d535
Fix a few docs build issues (#33685)
Noticed when doing `make webdocs`
2017-12-14 17:33:27 +00:00
Prasad Katti
6995985a52 Pass in '**results' to exit_json only if results is a dict (#33910) 2017-12-14 10:59:56 -05:00
Brian Coca
11063dabaf fixed version_added, update clog 2017-12-14 10:41:46 -05:00
Brian Coca
1a7c096954
new redis lookup (#33883)
* new redis lookup

deprecated redis_kv

* typo fix
2017-12-14 10:35:46 -05:00
Nathaniel Case
67a8ff47aa
Promote get_prompt to live in network_cli instead of cliconf (#33880)
This removes the immediate need for a cliconf plugin to use network_cli
2017-12-14 09:51:41 -05:00
rhpvorderman
5578193ae4 Block markers in blockinfile no longer hard coded (#31787)
* Block markers in blockinfile no longer hard coded
2017-12-14 08:24:14 -06:00
Kairo Araujo
7a5ea9cae4 Included ansible_distribution_major_version #29561 (#31754)
Included ansible_distribution_major_version according with
issue #29561
2017-12-14 08:22:48 -06:00
Abhijeet Kasurde
4391f5c094
VMware: Handle No Permission exception while clone (#33806)
This fix adds exception handling for No Permission exception
raised while clone operation.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-14 19:13:23 +05:30
tchernomax
a09fd80bba VMware: fix vmPathName on VM creation (#33315)
* VMware: fix vmPathName on VM creation
* vmware_guest: enable unit tests disk_type_d1_c1_f0
2017-12-14 18:41:09 +05:30
Katerina Koukiou
137498bff1 cloud:ovirt:ovirt_storage_domains.py: Allow not passing dc_name parameter (#33377)
When state == absent we can skpi dc_name parameter.
This patch introduces same functionality for other states.
2017-12-14 07:53:42 -05:00
pmargara
5a4fd97955 Added 'quota' parameter and 'description' parameter to ovirt_disk module (#33860)
* Added 'quota' field and 'description' field to ovirt_disk module

* ovirt_disk: fixed example

* quota => quota_id and other improvement
2017-12-14 07:53:16 -05:00
James Mighion
f8e3cfe9e2 Aruba indenting (#33884)
* Fixing aruba's inconsitent indenting.

* Adding config with different children indentation and unit test to confirm the different spacing does not matter.

* Fixing pylint check. Missed an r prefix.
2017-12-14 14:37:34 +05:30
Jurgen Brand
7bb55bdc2b Added icinga2_host module (#31720)
* Added icinga2_host module

* Fix build error

* trailing spaces and other errors from ansible build process

* Formating

* docu errors

* last spacing; import module

* fix imports

*  Removed request lib for ansible.module_utils.urls

* small whitespace fixes

* Remove typo

* Fix docu

* icinga2_hosts to icinga2_host in naming

* Update example
Fix Dewotine error when delete a none existing host

* Fixes docu problems

* White spaces

* small text improvements

* Remove force argument from module and docu

* Set author correct ( and hopefull the maintainer )

* Minor formatting changes
2017-12-14 07:38:22 +01:00
Gurchet Rai
490dc40203 Fix DO_API_KEY environment variable check (#33512)
`os.environ['DO_API_TOKEN']` raised a `KeyError` preventing the check
for `os.environ['DO_API_KEY]` from being executed. Fix this by failing
only if the api token isn't set.
2017-12-14 00:07:45 -05:00
Brian Coca
be5d68f3ad
add support for other scms to pull (#33152)
* add support for other scms to pull

* show choices for scms module in help
2017-12-13 22:16:54 -05:00
Jacob McGill
3b941802ac ACI ENCAP POOL RANGES: Add new module to support encap ranges (#33758)
* ACI ENCAP POOL RANGES: Add new module to support encap ranges

* fix module name

* remove extra format string
2017-12-14 00:35:50 +01:00
Brian Coca
afa82be019 make become prompt method agnostic (#33789)
fixes #33747
2017-12-13 17:57:06 -05:00
Brian Coca
ad94a3a6a2 fix reconcile to ensure 'ungrouped'
also removed redundant 'hosts to all' as all groups already ensure that inheritance
2017-12-13 17:29:01 -05:00
David Kretch
98260f9884 Fix pamd error when inserting a new rule at the end. Fixes #28487 (#28488)
* When inserting a new rule in `insert_after_rule`, check if the old rule is
the last rule, to avoid a list index out of range error when attempting to
access the next rule.
* Add a test for inserting a new rule after the last rule.
2017-12-13 15:31:20 -06:00
Russell Parks
158b32cd7a user: Fix add for SuSE Linux Enterprise 11 (#27015) 2017-12-13 15:30:51 -06:00
XuXinkun
7229eba569 use docker exec in case docker cp failed. (#26571) 2017-12-13 15:30:30 -06:00
Anil Kumar Muraleedharan
890b97a38f Lenovo enos bugfixes (#33857)
* Bug Fixes to issues foubd during testing

* Removing blank line

* undefined-variable Undefined variable 'run_commands' and training new line

* Reverting and Modifying changes with both Unit test and Integrated test with Devices passing
2017-12-13 20:57:51 +00:00
Will Thames
15a58d498d [cloud] Improve snake <-> camel conversion for AWS utils (#31400)
Allow CamelCase version of snake_dict_to_camel_dict
(currently only dromedaryCase is supported)

Add reversible option to camel_dict_to_snake_dict

Add tests for both of these options
2017-12-13 15:13:26 -05:00
Nathaniel Case
2425374fdd
Actually move vyos tests to network_cli (#33710)
* Fix vyos on network_cli on python3

bytes do not have format() in Python3

* Push connection to tasks, with bonus connection=local test

* Run tests without explicit connection set

* Add/update START messages where appropriate
2017-12-13 14:30:24 -05:00
John R Barker
cfb15b0272 Revert "YAML inventory unit test: fix test inventory format (#33828)" (#33869)
This reverts commit dfb2f346d8.

https://github.com/ansible/ansible/pull/33828
2017-12-13 14:19:19 -05:00
Alex
2f67d3a4f3 facts: Fix duplicate IPs in ipv4_secondaries (#32040) 2017-12-13 14:05:20 -05:00
Adam Miller
ae92426e72 fix ci, duplicate exception checking was merged in wait_for (my fault)
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2017-12-13 09:53:39 -08:00
Mans Matulewicz
beef269d46 Update mount.py (#23906)
added noauto to dvd mount example, simply copy pasting + removed (virtual) optical disc will result in a non booting system (centos7)
2017-12-13 11:37:01 -06:00
Austin S. Hemmelgarn
50ceb8d7d8 wait_for: change file check to handle directories and sockets (#20979)
open(path) throws an error when called on a directory or UNIX socket,
and therefore a check to ensure that the path is absent will always
succeed when there is a directory or file located there.

This updates the check to use os.access(path, os.F_OK) instead, which
instead just checks that the path exists instead of trying to open it as
a file, and therefore properly handles directories and sockets.

This causes a slight semantic change in how permissions are handled.
The existing code will fail to work correctly if the user running the
module on the managed host has no read access to the path specified.
The new code will work correctly in that situation.
Both versions fail if the user can't traverse the parent directory.

I've also added a check to the try block to catch OSError. I've seen
this call fail with an OSError on rare occasion in the face of odd
extended permissions (usually MAC configuration) in cases where it
should technically return False. In such cases, the file is functionally
inaccessible to the user making the call, so it's essentially not there,
but it can't be created by them either. I've documented this, as well as
the fact that the bug this change fixes exists, and a rather nasty
inconsistency involving symbloic handling that I stumbled across while
testing this change.

Fixes: #20870
2017-12-13 11:10:19 -06:00
tchernomax
29bed12cdd vmware_host: add reconnect and add_or_reconnect states (#30582)
* vmware_host: add reconnect and add_or_reconnect states

Add "reconnect" and "add_or_reconnect" choices for "state".

* reconnect: reconnect an esxi to a vcenter (imply it is present).
* add_or_reconnect: do the same but add the esxi if absent.

Also:
* tag the cluster_name as required (because it is).
* tag esxi_username and esxi_password as not required because
    they aren't when the esxi isn't added.

* vmware_host: add + prepare/document integration tests

vmware_host module

Add integration test for the add part of "add_or_reconnect" state.

Prepare and document integration tests for the reconnect part
of "add_or_reconnect" state and "reconnect" and "absent" states.

Currently we can't test those states as ReconnectHost_Task (for
"reconnect") and EnterMaintenanceMode_Task (for "absent") aren't
implemented yet in vcsim (from vmware/govmomi)
2017-12-13 11:13:12 -05:00
cyrill
d08179593f Add a new option firstmatch to lineinfile module. (#33825)
* Add a new option firstmatch to lineinfile module.

* Add firstmatch option in DOCUMENTATION

* Fix indent

* Add version_added "2.5"
2017-12-13 09:49:44 -06:00
Stefan Horning
e55efc547c [cloud] Bring return parameters for name/arn and subnet ID back to ec2_asg module (#33775)
* Readded vital return parameters to the ec2_asg that have been spared for no obvious reason

* Fix typo in ec2_asg docs

* Fixing another typo in ec2_asg docs.
2017-12-13 10:45:34 -05:00
Pilou
dfb2f346d8 YAML inventory unit test: fix test inventory format (#33828)
* Fix YAML inventory unit test

* YAML inventory unit test: add checks

* YAML: add hosts without any group to ungrouped
2017-12-13 15:30:59 +00:00
James Mighion
3a9083cf48 ios_config save (#33791)
* Fixing save so it still works. Adding changed as an option for save_when.

* Updating unit tests.

* Updating description to state that changed was added in 2.5.
2017-12-13 07:36:43 -07:00
Pilou
492d777ad7 imc_rest: fail when requirement is missing (#33750) 2017-12-13 13:54:38 +00:00
Pilou
02e965ba20 maven_artifact: fix broken import (#33749)
* Fail when lxml isn't available

* whole project requires Python >= 2.6
2017-12-13 13:54:05 +00:00
Will Weber
99abe24d74 remove unused import and unused variable disk_size (#33741) 2017-12-13 13:49:55 +00:00
René Moser
5bcc9cd1c3
influxdb: fix missing arg specs (#33859)
* influxdb: fix missing arg specs

* influxdb: doc: move database_name spec to doc fragments

* influxdb: cleanup unused import
2017-12-13 12:41:57 +01:00
Haidara Mohamed El Mouctar
20ce0bde30 Fix a typo in the readme of the skeleton used by ansible-galaxy. (#33807)
`ansible-container init` instead of `ansible-contiainer init`
2017-12-13 11:35:05 +01:00
Ganesh Nalawade
ea18b9021a
Revert "Deprecate Entity, EntityCollection and use subspec in network modules (#33575)" (#33849)
This reverts commit 4349b56643.
2017-12-13 13:07:52 +05:30
Pilou
b6528ea19f ovirt_disk: fix Python 3 compatibility (use six) (#33730) 2017-12-13 07:51:34 +01:00
Will Thames
1f8f394de3 Remove deprecated restart: parameter from win_feature examples (#33848)
`restart` is a deprecated parameter. Show how to use `reboot_required`
in examples instead
2017-12-13 16:48:45 +10:00
Gianluca
1d10a2867c Fixes #33771 - win_iis_webapppool bugfix (#33777)
* Fixes #33771

* Fixes #33771 - mod 1

* removed some unneeded whitespace
2017-12-13 16:34:44 +10:00
Jordan Borean
5b666a5074
added documentation info regarding win_unzip and recurse (#33846) 2017-12-13 16:34:05 +10:00
Abhijeet Kasurde
70f5e091f1
VMware: Handle version restriction error (#33805)
This fix handles RestrictedVersion error raised by server
due to restricted license.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-13 11:47:48 +05:30
Tim Rupp
9a807e6316
Adds bigip_security_port_list module (#33845)
This module can be used to manage port lists in an AFM configuration.
2017-12-12 21:13:06 -08:00
Zim Kalinowski
eb5ffa0d4e [new module] Added Azure SQL Servers support - cloud/azure/azure_rm_sql_servers (#33077)
* Added new module: Azure RM SQL Servers

* fixed sanity issues

* enabled integration test

* disabling test as Microsoft.Sql namespace not available

* renamed servers -> server

* updates as requested in the review

* udpates to sql server

* renamed module

* replaced has_key by in

* flattened results

* final updates to sql server

* updates as requested in the review

* added more tests

* deleting unexisting instance up front

* more tests

* another round of test changes

* removed uneeded test
2017-12-13 14:31:00 +10:00
Tim Rupp
cb026bb660
Adds bigip_profile_client_ssl module (#33844)
This module can be used to manage client ssl profiles on a BIG-IP
2017-12-12 19:54:43 -08:00