Commit graph

18441 commits

Author SHA1 Message Date
Toshio Kuratomi
9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
2017-10-09 07:38:41 -07:00
Matthew Martin
63e59a9825 maven_artifact: Add classifier to default dest (#24518) 2017-10-09 07:56:33 -06:00
Pilou
870974e0be ec2_vpc_route_table: fix broken import (#31459) 2017-10-09 20:20:31 +10:00
Martin Krizek
13631ececa yum: check if env groups are installed (#31182) 2017-10-09 06:01:34 -04:00
Andreas Olsson
d025aca66f Add optional port parameter to nsupdate module (#31446)
An example of when it's useful to be able to specify a custom port
number is when one is using an (ssh) tunnel to update a hidden master.
2017-10-09 05:51:17 -04:00
Pilou
0be8ac6797 ec2_vpc_igw: fix broken import (#31458) 2017-10-09 15:36:12 +10:00
Dag Wieers
ae5d8e5ebb modprobe: PEP8 compliancy and doc fixes (#31255)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
- Make module a bit more consistent with existing practices
2017-10-08 09:21:58 -04:00
Toshio Kuratomi
4804e99b44 Change ping docs to refer to win_ping (#31444) 2017-10-08 08:33:51 +01:00
Brian Coca
a9942353fe revert ocalhost getting 'all' vars (#31425)
back to previous implicit localhost behaviour

fixes #31420
2017-10-06 19:11:00 -04:00
Brian Coca
e4c61ea9a1 fix 'return false' from parse
this was abandoned early on the manger side  but seems like we left behind on plugin side.
more flexible extensions with yaml plugin
validate data correctly for yaml/constructed
fixed issue with only adding one child to keyed, the group only got the host that forced it's creation

fixes #31382
fixes #31365
2017-10-06 13:25:06 -04:00
Brian Coca
f2ade09dce use configured ansible_shell_executable
refine args/shell/executable hanlding
2017-10-06 08:56:21 -04:00
rahushen
48f4643a66 nxos_snmp_* fixes : Fixes #30997, #30999 (#31000)
* add codeblock to handle 5K platform for nxos_snmp_host

* fix get_snmp_traps for 5K platform

* Make shippable happy
2017-10-06 18:21:59 +05:30
rahushen
0218fdcd80 Fixes #30846 (#30862) 2017-10-06 17:10:03 +05:30
Eike Frost
9a1b495894 Fix idempotency if zabbix_host when visible_hostname is not set (#31388) 2017-10-06 03:28:17 -04:00
Jordan Borean
c4b51009f0 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors
2017-10-06 15:23:37 +10:00
Prasad Katti
14b9a6b350 Add example showing how to add host to multiple groups (#31152)
* Add example of how to add host to multiple groups

* use 'name' task keyword for comments
2017-10-06 01:02:53 -04:00
Kaz Cheng
044dd699c2 Addition of TCP protocol to ELB target group (#31228)
* Addition of TCP protocol to ELB target group as target groups support HTTP/S and TCP now

* Fixup stickiness type so that it checks if the current_tg has the stickiness_type key in the dict, as TCP ones do not
2017-10-06 00:27:30 -04:00
Jean-Frédéric
d332367018 Allow an Elastic IP to be re-associated in ec2_eip (#27389)
Trying to associate an already-associated ElasticIP was failing.

This is however supported by the `boto` method that is used
under the hood, `associate_address`:

To quote `boto` documentation:
```
This option to allow an Elastic IP address that is already
associated with another networkinterface or instance to be
re-associated with the specified instance or interface.
```

This defaults to False, both per backwards-compatibility
and to mirror the boto default value.

Fixes #27385
2017-10-06 09:51:36 +10:00
Brian Coca
a6e27a903a better chown errors 2017-10-05 18:40:41 -04:00
Strahinja Kustudic
7417282d37 Do not run systemctl daemon-reload in check mode 2017-10-05 18:40:02 -04:00
Michael Vermaes
fad3a4dc83 Fix typo in vault decrypt error message (#31335) 2017-10-05 18:09:22 -04:00
Dusan Matejka
336723d293 Allow zabbix_host to change proxy to no proxy, fixes #24735 (#29123) 2017-10-05 17:51:37 -04:00
Matt Davis
13e89b17cc remove explicit provider reg from azure_rm (#31369)
* now that it's handled automatically as of msrest > 0.4.9
2017-10-05 12:48:13 -07:00
Sloane Hertel
efe3c94b1b [cloud] ec2.py: warn that removing a public ipv4 address is not permitted - fixes #30679 (#30952)
* Add a warning to ec2.py if assign_public_ip is different from the matching instance(s) since it isn't a modifiable attribute.

* remove comments
2017-10-05 15:32:52 -04:00
Bradford Dabbs
f219d6b96d [cloud] EC2_ASG Set desired capacity to min_size if no instances exist (#30987)
* Set desired capacity to min_size if no instances exist

* Improve readability of if/then clause

* Only update null desired_capacity to min_size on initial create

Any future updates to the ASG will be able to reference the existing
capacity.
2017-10-05 14:56:46 -04:00
John R Barker
e859d0da9c data should be redacted in docker_secret (#31366) 2017-10-05 14:07:23 -04:00
Sam Doran
e7902d888c Make ansible_selinux facts a consistent type (#31065)
* Make ansible_selinux facts a consistent type

Rather than returning a bool if the Python library is missing, return a dict with one key containing a message explaining there is no way to tell the status of SELinux on the system becasue the Python library is not present.

* Fix unit test
2017-10-05 09:19:08 -04:00
Eduardo Suarez-Santana
4337b7a777 Fix rpm_key absent. (#31045)
When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
2017-10-05 14:45:14 +02:00
Ganesh Nalawade
2e4dcc9dda Fix nxos terminal regex to parse xml response (#31283)
Fixes #26130

Modify nxos terminal regex to parse a xml response.
2017-10-05 15:32:43 +05:30
rahushen
266c2f5831 fixes #31080 (#31081) 2017-10-05 14:33:59 +05:30
Trishna Guha
9f72b32c5d nxos_config intended_config docfix (#31337)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-05 14:25:50 +05:30
Brian Coca
bed7cd8b11 restore connection options from cli
fixes #30720
2017-10-04 23:14:26 -07:00
Toshio Kuratomi
52497920fa We want the ini and env vars to both override in the same order
There's an ssh version and a generic version.  We want the ssh version
to override the generic version in both cases.
2017-10-04 13:06:56 -07:00
Brian Coca
6459bacb6b Revert "fix git wrapper (#29069)"
This reverts commit f8005d2737.

fix needs to be rethought as it applies to only newer git versions
and use of env shell breaks with non 'bourne compatible' shells
2017-10-04 12:55:57 -07:00
Sloane Hertel
aa658c64ec Allow any_errors_fatal to be set in playbook - fixes #30691 (#30839)
* Allow any_errors_fatal to be set in playbook.
* Default to the config file value for any_errors_fatal only if it isn't already provided.
* add _get_attr method
2017-10-04 12:52:27 -07:00
Tim Rupp
f3f0ba87ce Corrects Copyrights and License headers (#31324)
The format has changed for these in the dev_guide. This corrects
them for the F5 modules
2017-10-04 20:16:17 +01:00
Brian Coca
8aa33419c9 check type to avoid typeerror tb
fixes #31290 by giving more meaningful message
2017-10-04 15:14:10 -04:00
Martin Krizek
115b4fdc9b yum: fix name parsing out of envra (#31247) 2017-10-04 20:48:00 +02:00
Tim Rupp
3717ff64cf Adds the bigip_monitor_https module (#31205)
This patch adds the https_monitor module which allows people
to create and manage HTTPS monitors.
2017-10-04 17:18:59 +01:00
Brian Coca
dbae704d3c correctd inventory_file to return full path
fixes #31294
2017-10-04 11:53:25 -04:00
Brian Coca
f00d47fac0 dont follow symlinks for inventories
now symlink dir is checked for locality of group/host_vars

fixes #31195
2017-10-04 11:04:32 -04:00
Brian Coca
852d457549 turn all inventory cache 'off by default' 2017-10-04 10:51:39 -04:00
Brian Coca
46621a3ddd updated constructed docs to clarify use of ext 2017-10-04 08:44:45 -04:00
Katerina Koukiou
54ca841611 cloud:ovirt:ovirt_storage_domains.py: Don't require extra params when state==absent (#30337)
Make sure that example in docs is usable:

 # Remove storage domain
 - ovirt_storage_domains:
     state: absent
     name: mystorage_domain
    format: true

Without this PR data_center and host parameters where required when we wanted to
remove some storage domain.

Also fixes a regression when trying to remove a detached
storage domain.
2017-10-04 05:27:25 -04:00
maorlipchuk
65749bd432 Return None for DC in case of detached storage domain (#29175)
The following patch fixes a regression when trying to remove a detached
storage domain.
As part of the remove process the ovirt_storage_domains module first
tries to move the domain to maintenance and detach it.
In case of removing a detached storage domain with no DC attached to it
The maintenace process will fail with 404 (not exists) exception when
trying to fetch the DC using empty Guid.
The fix proposes a solution to return None value in case of a detached
storage domain.
2017-10-04 04:43:42 -04:00
Ondra Machacek
5e3177e29d ovirt_clusters: Fix fencing and kuma comparision (#30302) 2017-10-04 04:43:35 -04:00
Ondra Machacek
70f221d57a ovirt_vms: Raise proper error when template isn't found (#30306) 2017-10-04 04:43:28 -04:00
Katerina Koukiou
04f0b5adca cloud: ovirt_datacenter.py: Add 'force' parameter for removing dc (#30352) 2017-10-04 04:43:20 -04:00
Ondra Machacek
47e9353a31 ovirt_hosts: print error when host for iscsi login not found (#30928) 2017-10-04 04:33:45 -04:00
Ondra Machacek
3978baf32f ovirt_vms: Support to specify VM id (#31253)
Fixes: https://github.com/ansible/ansible/issues/30873
2017-10-04 04:32:49 -04:00
Stephen
9c6ad3d076 Add update_only parameter for yum module (#22206)
* Add update_only parameter for yum module

When using latest, `update_only: yes` will ensure that only existing
packages are updated and no additional packages are installed.

* Update yum.py

Update version added for `update_only` parameter to 2.5

* add unit tests for update_only flag in yum module
2017-10-04 10:25:13 +02:00
rahushen
1378861fe7 Fixes nxos_igmp_interface idempotence issue for N1 images (#31220) 2017-10-04 12:53:44 +05:30
Sam Doran
00df1fda10 Correctly write SELinux config file (#31251)
* Add new lines to end of config file lines

* Properly write out selinux config file

Change module behavior to not always report a change but warn if a reboot is needed and return reboot_required.

Improve the output messages.

Add strip parameter to get_file_lines utility to help with parsing the selinux config file.

* Add return documentation

* Add integration tests for selinux module

* Use consistent capitalization for SELinux

* Use atomic_move in selinux module

* Don't copy the config file initially

There's no need to make a copy just for reading.

* Put message after set_config_policy in case the change fails

* Add aliases to selinux tests
2017-10-03 23:38:58 -04:00
Brian Coca
aa4b3f14c5 corrected version added 2017-10-03 21:50:13 -04:00
Jordan Borean
e61c2799ff win_become: move error handling to Ansible outside of shell (#31227)
* win_become: move error handling to Ansible outside of shell

* trimmed the output so double newlines don't get set

* added test for non-zero exit code

* missed issue URL on test

* changed exit to SetShouldExit
2017-10-03 21:42:27 -04:00
Daniel Roberts
34878926ca fix monit version check
it was erroneously checking > 3.18 instead of > 5.18

Fixes #30614
2017-10-03 15:18:29 -07:00
Brian Coca
9c6d7ddeb5 report extra info in verbose and if needed 2017-10-03 16:48:21 -04:00
Dustin Spicuzza
8f62be7b7c win_reg_stat actually sets properties to be a dictionary, not a list (#31252) 2017-10-04 07:19:32 +11:00
Jordan Borean
bba941cd5b win_copy: fix for copying encrypted file without pass (#31084)
* win_copy: fix for copying encrypted file without pass

* fix pep8 issue

* reduced the diff and fixed some minor issues
2017-10-03 12:51:57 -07:00
Adrian Likins
65393e4747 Fix ansible_distribution on Ubuntu 10.04 (#31108)
The /etc/os-release based distro detection doesn't
seem to work for Ubuntu 10.04 (no /etc/os-release?).

So it was testing the next case which was /etc/lsb-release to
see if it is 'Mandriva'. Since the check for existence of
(/etc/lsb-release, Mandrive) was the first non-empty dist
file match, 'ansible_distribution' was being set to 'Mandriva'
expecting to be corrected by the data from the dist file content.

But since the dist file parsing for Mandriva didn't match for
Ubuntu 10.04 /etc/lsb-release _and_ there is no Debian specific
lsb-release check, 'ansible_distribution' stayed at 'Mandriva'
and the dist file checking loop keeps going and eventually off
the end of the list before finding a better match.

Adding a debian/ubuntu specific check for /etc/lsb-release after
the debian os-release sets the info correctly and stops further
checking of dist files.

Fixes #30693
2017-10-03 15:32:33 -04:00
Michael Scherer
6caac2743a Add support for LVM to filesystem module (#21620)
And since LVM2_member is not a very userfiendly name, add
a mechanism for more user friendly names.
2017-10-03 15:26:25 -04:00
Brian Coca
2d70dc7f21 make pipelining actually backwards compatible
restore ssh specific setting the global, in the future these will be separate.
2017-10-03 14:35:05 -04:00
Adrian Likins
235d139e5d Fixes for facts distribution.py (#31110)
'distribution' facts were being set after checking
the existence of the dist file, and then being set
again with more detail after they were succesfully parsed.

But if the dist file was not succesfully parsed and
matched the required names, the loop continues
without resetting the earlier set facts. This is
how 'Mandriva' would end up being the 'distribution'
file for unrelated cases (it would find /etc/lsb-release,
set distro to 'Mandriva', then fail to parse/match and
continue the loop. If no other checks worked, 'Mandriva'
would stick).

* parse_dist_file_NA should check 'name' not distro for NA

parse_distribution_file_NA was checking the incoming
'distribution' fact to be 'NA', but the fact itself can
be specific at that point ('KDE Neon', for ex) but the
check is really if the 'name' it was passed is NA.

* for matches on OS_RELEASE_ALIAS (ie, 'Archlinux') do
not continue if the dist file content doesn't match. Previously
it had to because of the 'Mandriva' bug mentioned above.

This is a more general fix for #30693 than #30723

Fixes  #30693
Related to #30600
2017-10-03 14:01:40 -04:00
Adrian Likins
dae0ad1ce6 Fix flush_cache on redis cache
Fix a del on non existent self.cache.

Fixes #31148
2017-10-03 12:54:26 -04:00
Adrian Likins
278ff19bea Handle vault decrypt --output=- (#31066)
In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
2017-10-03 12:02:16 -04:00
Brian Coca
cf3414d7d7 set _hosts on access if None (#31111)
set _hosts on access if None to bpyass srlz10n issues to fix #30903
2017-10-03 08:59:05 -07:00
Brian Coca
101377768b remove unused ssh pipelining setters
fixes #31125
2017-10-03 09:22:01 -04:00
David Moreau-Simard
9b693235f0 Fix backwards compatibility of constants.get_config
get_config would use ConfigManager.get_ini_value which does not
exist. What we are meant to use is
ansible.config.manager.get_ini_config_value and this method does not
expect a list, only a dictionary with a section and a key.
2017-10-03 09:19:04 -04:00
rahushen
a12a05c219 Fixes #30769 - nxos_vtp_version errors out on N1 images. (#30770)
* Fixes #30769

* add the same fix for 2 more vtp modules
2017-10-03 17:24:14 +05:30
Dag Wieers
17fbeeb2f0 rhn_channel: PEP8 compliancy and doc fixes (#30912)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-03 09:50:44 +02:00
Dag Wieers
4a358b5396 foreman: PEP8 compliancy and doc fixes (#30910)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-03 09:50:27 +02:00
Abhishek Shukla
d0c003ab0f BugFix code breaks, if include_vars dir is file instead of directory (#31157) 2017-10-03 00:00:51 -04:00
Carsten Clasohm
89799bbb98 add https_proxy (#31062)
* add https_proxy

* fix indentation

* use http.nonProxyHosts
2017-10-03 00:12:50 +02:00
Yeuk Hon Wong
ef25367353 Fixes #30073: Remove 'Consider hg command' warning. (#31159)
This PR addresses two issues:

1. The hg module was added to command module's check_command list,
so if someone runs hg directly from the command module, the command
module would warn the user "Consider using hg module rather than running hg".

We address this by removing hg from the list.

2. We added a new note to tell users push feature will be addressed
in issue #31156.
2017-10-02 23:33:13 +02:00
Rob
2804a2663a [cloud] Only get rules if listener in elb_application_lb been identified in compare_rules (#30604)
* Only get rules if listener has been identified in compare_rules

* Always cast the listener port to an integer.
2017-10-02 16:57:41 -04:00
Felipe Garcia Bulsoni
46fd083138 LogicalInterconnectGroupFactsModule for HPE OneView (#28847)
* Added support to retrieving LIG resources in HPE OneView

* Fixing copyright header according to review

* Swapping out config for full credentials in parameter for documentation
2017-10-02 16:35:27 -04:00
Jordan Borean
12a4dca447 win_dotnet_ngen: fix after broken in 2.4 (#31076)
* win_dotnet_ngen: fix after broken in 2.4

* added description to return values
2017-10-03 07:34:00 +11:00
Felipe Garcia Bulsoni
7d74c126a9 EnclosureFactsModule for HPE OneView (#28852)
* Added support to retrieving Enclosures in HPE OneView

- Added unit tests

* Updated version_added to 2.5

* Changing return type of enclosure_script to string

* Fixing copyright header according to review

* Replaced config for credentials in parameters for documentation
2017-10-02 16:32:36 -04:00
Jordan Borean
67fd98da09 win_msg: added doc about msg limit and included an explicit check for better error handling (#31078) 2017-10-03 07:32:30 +11:00
Pilou
44f5b2bd25 ansible_tower: fix broken import, reuse tower_argument_spec and documentation fragment (#29115)
* module_utils/ansible_tower: fix broken import

* tower_*: use tower_argument_spec & doc fragment

* tower doc fragment: Ansible requires Python 2.6+

* tower_job_wait: fix broken import (Py3 compat)
2017-10-02 16:21:24 -04:00
Sebastien Boyron
af3e8950d6 [fix] issue #30516 : take care about autoremove in upgrade function 2017-10-02 16:19:55 -04:00
Dag Wieers
1241d0a3f4 pip: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-10-02 16:18:56 -04:00
Dave Grochowski
a7229df469 [cloud] Fix handling of encrypt option in aws_s3 module (#30822) 2017-10-02 13:18:47 -04:00
Abhijeet Kasurde
02b5c7a8a3 New module - vmware_guest_powerstate
Fix adds a new module 'vmware_guest_powerstate' to manage
power states of virtual machine.

Fixes: #30371

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-02 18:57:44 +02:00
James Tanner
eca4897a08 Include the top level folder for esxi in the break condition 2017-10-02 12:31:51 -04:00
James Tanner
8c368b25cd Implement second change from #30826 2017-10-02 12:31:51 -04:00
James Tanner
1c1c89927d Get the moid in a more failsafe manner 2017-10-02 12:31:51 -04:00
Andrew Lihonosov
4c0889e8fc docker_service build command respects the "pull: no" parameter
Fixes #30296.
2017-10-02 11:11:48 -04:00
Artem Bolshakov
fb4d065654 Fix running docker container with not readable logging driver. Fixes #27278 2017-10-02 11:00:16 -04:00
Brian Coca
44d2f21e02 corrected yaml extensions ini setting 2017-10-02 10:02:47 -04:00
Prasad Katti
3b1376ad09 [cloud] add boto3 requirement to cloudformation module docs (#31135) 2017-10-02 09:25:12 -04:00
Julien Palard
5802ec04bf yaml inventory: Better error reporting on typo. fixes (#31118) 2017-10-02 09:22:21 -04:00
n0trax
ba99e44b42 Catch AttributeError if regex is not found. (#30990) 2017-10-01 07:19:34 -04:00
maorlipchuk
0f39536c5c Avoid calling maintenace or detach on destroy storage domain. (#28962)
As part of the absent state of ovirt_storage_domains module,
the pre_remove method tries to move the stoage domain to
maintenance and detach it.

In case a destroy of a storage domain is being called there is no need
for those operations since the destroy might be merely a DB operation.
2017-10-01 05:13:19 -04:00
Prasad Katti
4b62e555df Added quotes to start and end samples 2017-09-30 19:57:02 +02:00
Dag Wieers
3749ba6ee1 Small changes. 2017-09-30 19:57:02 +02:00
Prasad Katti
b7fbc57227 Document return values for command module 2017-09-30 19:57:02 +02:00
Abhijeet Kasurde
afa3206205 Make vm_username and vm_password required params
vm_username and vm_password are required parameters in
vmware_vm_shell. Fix adds changes to documentation as well.

Fixes: #28266

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-30 14:50:44 +02:00
Brian Coca
ac9278ff0f remove action plugin only fields from 'file' calls (#31047)
* remove action plugin only fields from 'file' calls

fixes #30556

* Add a test for #30556
2017-09-29 17:13:32 -07:00
Damian Zaremba
92f777e815 module_utils.urls - Encode the proxy connect as binary (#30811)
* module_utils.urls - Encode the proxy connect as binary

Under Python3 the sendall method expects binary not a string.

Prior to this change the below exception was being thrown;
Traceback (most recent call last):
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 1044, in fetch_url
    client_key=client_key, cookies=cookies)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 951, in open_url
    r = urllib_request.urlopen(*urlopen_args)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 524, in open
    req = meth(req)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 729, in http_request
    s.sendall((self.CONNECT_COMMAND % (self.hostname, self.port)).decode())
AttributeError: 'str' object has no attribute 'decode'

Encoding the value is inline with the lines below (Proxy-Authorization etc) which are being sent as binary.
2017-09-29 14:32:29 -07:00
Brian Coca
43cbcbcc75 removed typo from dig docs 2017-09-29 11:23:58 -04:00
Kedar K
916e6be888 - Fix to return error message back to the module. (#31035) 2017-09-29 17:06:30 +05:30
Dag Wieers
bedfd0a5a4 atomic: PEP8 compliancy and doc fixes (#30918)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
2017-09-29 13:17:29 +02:00
yaacov
3ffc62b43b change be to exist in the docs 2017-09-29 12:54:48 +02:00
yaacov
19f4120c89 make the list of tags more meaningful 2017-09-29 12:54:48 +02:00
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