Commit graph

16124 commits

Author SHA1 Message Date
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