Commit graph

18236 commits

Author SHA1 Message Date
yaacov
4db133e725 add a state list option 2017-09-29 12:54:48 +02:00
yaacov
8b9c4de3b0 inline trivial calc url method 2017-09-29 12:54:48 +02:00
yaacov
b70845bb40 use the is_changed? paradigm, following example from other modules 2017-09-29 12:54:48 +02:00
yaacov
bf780c709d move manageiq_entities to module utils 2017-09-29 12:54:48 +02:00
yaacov
26a70f41ce Add new module manageiq_tags 2017-09-29 12:54:48 +02:00
jhawkesworth
04afacc2ee win_chocolately document improvedments, mention win_hotfix and use of become (#31085) 2017-09-29 05:47:38 -04:00
Rene Moser
d7fa3ab487 cloudstack: cs_template: remove dependency to CloudStackException
* fixes docs
* fixes pep8
2017-09-29 11:11:22 +02:00
Dag Wieers
fde4244d04 kubernetes: PEP8 compliancy and doc fixes (#30914)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-29 01:51:23 -04:00
jonjozwiak
74f950936a Fix ec2_win_password to allow blank key_passphrase (#28791) 2017-09-28 21:21:59 -04:00
Brian Coca
057eec94ee fixed winrm to use proper task vars (#31072)
it avoids hitting hostvars templating issue and ignoring exception
fixes #30911

also normal var precedence should work for ansible_winrm vars
2017-09-29 11:12:56 +10:00
jctanner
32cf69c00a Use the group-d1 moId instead of i8ln based names to identify the root folder. (#31077)
Addresses #29043
2017-09-28 20:36:54 -04:00
Toshio Kuratomi
5f22b4f8ad Reduce chance of mistakes with unsafe_shell check during refactor
Code like this:

if cond1 and cond2:
    pass
elif cond1:
    pass

Has a hidden dependency on the order that the conditions are checked.
This makes them fragile and subject to breakage during refactors.
Rewrite the code like this:

if cond1:
    if cond2:
        pass
    else:
        pass

The nested structure makes the ordering explicit and less likely for
someone to break the code when they refactor.
2017-09-28 16:48:22 -07:00
Alberto Murillo
3e7b240696 os_keystone_endpoint.py (#29031)
* Add os_keystone_service_endpoint

This patch adds a new Ansible module which allows a user to create
an endpoint to a service with Keystone.

Fixes #23909

* os_keystone_endpoint: Fix style and messages

Fix comments, pep8, version, metadata, license header
and imports according to the Contributing Modules Checklist

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Fix return values

- Change type of 'endpoint' return value from dictionary to complex
  in order to get validate_module checks passed.

- Remove 'id' from the return data since it is included inside the
  'endpoint' value wich is already being returned.

- Rename 'service' field to 'service_id' which is the correct name
  for the service id field returned in json.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Update shade version

Update minimum shade version to 1.11.0

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Make region optional

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Validate service exists before using service.id

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Fix documentation for service to accept name or id

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Pass the full service object to create_endpoint()

We already have the service object retrieved in code, by passing service.id to
create_endpoint, the shade librarie queries the api again to get the full service
object.

By Passing the already rerieved service object to create_endpoint() we save one
request to the API.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>

* os_keystone_endpoint: Make type explicit in module arguments.

Althoug type is default to str when not specified in module arguments
this commit explicitly defines type='str' for better readability.

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2017-09-28 23:05:44 +02:00
Will Thames
371c6dba8b Fix aws_s3 connection exception handling (#30955)
`ProfileNotFound` does not have a `response` attribute, and
`NoCredentialsError` does not occur at connection creation time.
2017-09-28 16:20:10 -04:00
Adrian Likins
95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
2017-09-28 10:36:22 -04:00
Will Thames
c5971047a4 [cloud] Support reuse of unallocated Elastic IP's. (#30322)
* Return correct changed status when EIP is reused

When reusing an existing EIP, the changed status
should be False, not True.

* If public_ip is given and it exists, return it

Ensure EIP allocation returns existing public_ip correctly
2017-09-28 10:29:51 -04:00
Gustavo Maia
4f67e855ed Added ecs_taskdefinition_facts module (#30752)
* Added ecs_taskdefinition_facts module

* Expanding documentation
Now includes all possible return values

* Fixed boto dependency

* Converting results to snake case.

* Remove EcsTaskManager class, move to main()
Remove unnecessary `except` block

* Change botocore import method
Also make Profile exception message less redundant

* Changing case conversion of the results
Now converts only the root level keys
Commented is a version that would not convert only container_definitions
2017-09-28 08:48:57 -04:00
Ganesh Nalawade
97858d91ac Add alias to command option in telnet (#30825)
*  Add commands alias to telnet option
2017-09-28 18:07:37 +05:30
Dag Wieers
2b0e52b15c I am officially done with the unarchive module
I'll leave it up to someone else to try and talk to a bunch of unhappy people.
Good luck to whoever wants to maintain this !
2017-09-28 10:58:57 +02:00
Ganesh Nalawade
879ea24a74 Fix documentation issue for nxos_snmp_user module (#31029)
*  Change auth to authentication in module document
   to be in sync with module params
2017-09-28 13:04:20 +05:30
Jordan Borean
a41077df20 fix for webapppool when specifying an attribute that holds a collection (#30729)
* fix for webapppool when specifying an attribute that holds a collection

* re-add always block on test
2017-09-28 16:15:55 +10:00
James Mighion
2837200aea Adding new stdout regex to allow local password changes. Adding stderr regex to catch more errors. (#30994) 2017-09-28 10:05:14 +05:30
Will Thames
5900fee67a Fix ec2_snapshot_facts for python3
Avoid the following seen when running ec2_ami tests on python3,
presumably because the return type of `map` is different between
python2 and python3.

```
Traceback (most recent call last):
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 242, in <module>
    main()
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 238, in main
    list_ec2_snapshots(connection, module)
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 193, in list_ec2_snapshots
    snapshots = connection.describe_snapshots(SnapshotIds=snapshot_ids, OwnerIds=owner_ids, RestorableByUserIds=restorable_by_user_ids, Filters=filters)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 575, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 630, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python3.5/dist-packages/botocore/validate.py", line 291, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter OwnerIds, value: <map object at 0x7ff577511048>, type: <class 'map'>, valid types: <class 'list'>, <class 'tuple'>
```

https://github.com/ansible/ansible/pull/30435#issuecomment-330750498
2017-09-27 20:38:39 -07:00
bit
0a114436fc lxc_container: open files as text, fixes #30571 (#30572)
call to_text on full config file

fixes issue #30571
2017-09-27 20:32:45 -07:00
Christian Albrecht
0b0348d81c Fix sensu_silence module boolean parameter declaration (#30971) 2017-09-28 13:12:21 +10:00
Dag Wieers
4832b9a2d2 yum: doc fixes (#30897)
This PR includes:
- Documentation fixes
2017-09-28 12:57:21 +10:00
Dag Wieers
0ef87c849f virt: PEP8 compliancy and doc fixes (#30917)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 22:37:54 -04:00
Brian Coca
54d7c384b6 clarified dig module uses dnspython 2017-09-27 20:59:03 -04:00
Brian Coca
bb874e5029 fixed lookup dig docs 2017-09-27 20:05:21 -04:00
Brian Coca
dea872e4a6 avoid include_Xs conflating vars with options (#30954)
* avoid include_Xs conflating vars with options

* avoid frozenset so serialization wont complain

* dded missing set

* updated as per feedback
2017-09-27 19:53:10 -04:00
Brian Coca
fc745920c7 fixed pull's ansible/git invocation options (#30938)
* fixed ansible/git invocation options

now falls back to using localhost as 'all' does not include implicit accidentally anymore

fixes #30636

* better fix

* qfq9
2017-09-27 19:50:36 -04:00
jctanner
0dd3a61a75 vmware_guest: tests for createvm+modifyvm tasks (#30959)
* Save the serialized values instead of their types
* Add tests for creating and modifying VMs without using a template
* Remove blank line
* Add tests for vm deletion
2017-09-27 18:10:08 -04:00
Brian Coca
4291edd820 remove 'new internal vars' from dumps
fixes #30924
2017-09-27 16:10:42 -04:00
Felipe Bulsoni
5c3bbd4620 Improvements on documentation and removing unneeded quotes from yaml 2017-09-27 21:21:03 +02:00
Felipe Garcia Bulsoni
637571abfb Added new module for managing LIGs in HPE OneView 2017-09-27 21:21:03 +02:00
Jonathan Piron
54859a2132 Fix crypttab python3 compatibility issue (#30457)
In python2 str gives byte string. In Python3 it gives unicode string so it
can't be written in a binary mode opened file.
Use to_bytes helper function to ensure content being written will be
properly encoded in both python2 and python3.
2017-09-27 11:58:02 -07:00
Brian Coca
82de2e1865 rmeove ext requirement for yaml inventory plugin
returns to the state before 2.4 made it a requirement
fixes #30855
2017-09-27 14:28:07 -04:00
bbomgardner
c2af15ce74 Remove extra space in string comp
Fixes [30983](https://github.com/ansible/ansible/issues/30983)
2017-09-27 20:27:42 +02:00
René Moser
b444332412 fix pep8 for cloudscale_server (#30974) 2017-09-27 11:39:02 -04:00
Will Thames
56fe9499d1 [cloud] Improve boto3_tag_list_to_ansible_dict backward compatibility (#30622)
Default to trying both `key` and `Key`, and corresponding
`value`/`Value`.

Alternative to #30542
2017-09-27 11:27:26 -04:00
Thomas Steen Rasmussen
22fda12ac1 Remove stray " and replace include: with import_tasks: 2017-09-27 10:02:43 -04:00
Thomas Krahn
adc8d60764 ipa_sudorule: Fix issue #25863 (#26285) 2017-09-27 03:51:59 -04:00
Dag Wieers
fd91da7297 pacman: PEP8 compliancy and doc fixes (#30913)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 03:13:18 -04:00
Fran Fitzpatrick
c7760f3ea8 Adds ipa_dnszone module (#28790)
* Adds ipa_dnszone

* Use new copyright/gpl notice

* Update metadata version

* Use native error handling

* Fix boilerplate

* Remove default false

* Use localhost

* Should be 2.5
2017-09-27 03:04:59 -04:00
Martin Krizek
55739c1e46 redhat_subscription: replace deprecated autosubscribe (#30927) 2017-09-27 02:33:00 -04:00
Dag Wieers
91bb211922 redis: PEP8 compliancy and doc fixes (#30920)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 02:12:06 -04:00
Dag Wieers
125c4b135d mount: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-27 01:56:08 +02:00
Prasad Katti
b672fd1f45 ec2_instance_facts: requires boto3 and botocore 2017-09-27 09:12:46 +10:00
Brian Coca
17f094bb6a corrected import_play into to import_playbook (#30853)
* corrected import_play into to import_playbook

fixes #30744
2017-09-26 17:27:21 -04:00
Brian Coca
8378ac30b3 fix for slack callback breaks in 2.4 (#30932)
* fix for slack callback breaks in 2.4

fixes #30838
2017-09-26 17:18:59 -04:00