Commit graph

18104 commits

Author SHA1 Message Date
Will Thames
31daeb4b85 New module for querying ACM certificates (#29430)
Not using AnsibleAWSModule so that it can be dropped into
a module library of Ansible 2.3
2017-09-19 19:10:39 -04:00
Martin Krizek
32d6b1d0e0 user: fix default non-system user's shell on macOS 2017-09-19 18:11:22 -04:00
Adrian Likins
307be59092 Don't ask for password confirm on 'ansible-vault edit' (#30514)
* Don't ask for password confirm on 'ansible-vault edit'

This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491
2017-09-19 17:39:51 -04:00
Brian Coca
71cc906ec8 fixed password lookup docs 2017-09-19 16:33:15 -04:00
Chrrrles Paul
e3ef80f5d6 oc module- Fixing description & removing example command (#30257)
* Fixing description & removing oc/adm example

Noticed formatting errors on http://docs.ansible.com/ansible/latest/oc_module.html -- also removing oc/oadm command examples

* Trailing whitespace..
2017-09-19 15:09:22 -04:00
Brian Coca
b9120dfd97 fixed decreption
(cherry picked from commit 1cee81375386a7f3ac3d1893342b9323983f00c9)
2017-09-19 11:43:36 -04:00
Brian Coca
24d4787b2d Lookup docs (#30280)
* finalize lookup documentation
* minor fixes to ansible-doc
 - actually show which file caused error on when listing plugins
 - removed redundant display of type and name
* smart quote fixes from toshio
2017-09-19 10:49:07 -04:00
Dag Wieers
2ef8c5a03d Fix typo
And also clean up Copyright/License statements when we're at it.
2017-09-19 16:10:21 +02:00
Joel Diaz
6c7d46a9e3 add default role of 'prometheus_alerts' for alerts (#29111)
Currently, MIQ only supports an alert type of 'prometheus', so rather than have the caller of manageiq_provider pass this info, just set it as the default.
2017-09-19 09:32:59 -04:00
Joel Diaz
79d034b088 update miq compare_user group comparison (#29063)
When calling manageiq_user to an already existing user (but leaving out the password so that it doesn't automatically 're-create' the user), the module fails with:

fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 324, in <module>\r\n    main()\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 315, in main\r\n    res_args = manageiq_user.edit_user(user, name, group, password, email)\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 229, in edit_user\r\n    if self.compare_user(user, name, group_id, password, email):\r\n  File \"/tmp/ansible_Fr7Nt3/ansible_module_manageiq_user.py\", line 189, in compare_user\r\n    (group_id and user['group']['id'] != group_id)\r\nKeyError: 'group'\r\n", "msg": "MODULE FAILURE", "rc": 0}

The 'group' field turns out to be 'current_group_id' (at least with ManageIQ 4.6). Update the comparison accordingly.
2017-09-19 09:10:21 -04:00
Joel Diaz
99f6f0ccc2 add 'update_password' param to manageiq_user (#29093)
* add 'update_password' param to manageiq_user

Currently with the manageiq_user module, if you call it repeatedly while passing the 'password' parameter, it will always run the task and mark it as 'changed'.

Following the pattern of the AWS IAM module, add an 'update_password' parameter that takes 'always' (default) or 'on_create'. This will let you set an initial password when creating a user, but allow the user to modify their password and not stomp over their password changes if you re-run the playbook/task that created the user.

* don't stomp password when other fields change

Handle case where user fields change, but we don't want to stomp on a potentially user-changed password. Previously, if a non-password field changed, and the password param was passed in, it would ignore the 'update_password': 'on_create' setting (ie it would update/modify the password even if the user already exists).

Add trailing ',' to list of params.
2017-09-19 09:10:12 -04:00
Ondra Machacek
0aebdb4aca ovirt_vms: Fix the logout condition (#30410) 2017-09-19 08:27:09 +02:00
Matt Clay
7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
2017-09-18 23:20:32 -07:00
Jordan Borean
01563ccd5d windows: fix list type in legacy module utils (#30483)
* windows: fix list type in legacy module utils

* only change the return for the list type instead of affecting it all

* additional null check when using an array
2017-09-18 21:18:52 -07:00
jctanner
5aebcd4f7f Remove redundant check for group membership in add_host (#30530) 2017-09-18 20:22:30 -04:00
Wolfgang Felbermeier
f3865e370c Fix tags in ec2_instance_facts (#30333)
* Fix tags in ec2_instance_facts
The method boto3_tag_list_to_ansible_dict in module_utils/ec2.py changed
and does no longer check whether the returned result of boto3 uses
"key" or "Key" as the tag key identifier.
This fixes ec2_instance_facts to make this check in its own, since boto3
may return "key" instead of "Key"

* Since the indices for the tags are already formatted to lowercase
by the snaking, we can assume, that the index for the tags are already
formatted
2017-09-19 10:09:56 +10:00
Toshio Kuratomi
c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 2017-09-18 16:49:16 -07:00
Shinichi TAMURA
934ae28365 Timezone modeule: Better env choice for Linux (#28229)
* timezone module: fixed platform decision rule for Linux
— For better handling of environments where timedatectl is unavailable

* timezone module: allow absence of configuration files if specific commands are available

* timezone module: remove duplicated line

* timezone module: fixed docs to clarify returned diff

* timezone module: fixed “undefined variable err”

* Revert "timezone module: fixed docs to clarify returned diff"

This reverts commit 4b783227f7.

* timezone module: revert platform decision rule; just warn instead of futher command checks

* timezone module: [NosystemdTimezone] enhanced error message
2017-09-18 19:04:58 -04:00
Dag Wieers
229a86c952 win_file: Fix check-mode issue removing dirs (#30475)
This fixed #30442
2017-09-19 06:43:49 +10:00
Scott Buchanan
4617be3085 clarify documentation of import_role 2017-09-18 16:17:58 -04:00
Brian Coca
314e6d0d8a start of 'is chroot' fact
probably missing cornercases for some linux/bsd setups and other OSs
2017-09-18 16:16:41 -04:00
hiddenicon
33b8d7069f Add _ and . to regex (#30396)
Adding underscore and period to the nxos regex for determining the prompt for hostnames with underscores and periods in the hostname.
2017-09-18 14:59:11 +05:30
Toshio Kuratomi
47d303e255 Update the bundled six library to 1.11.0 2017-09-17 22:00:02 -07:00
Brian Coca
6e857468a2 expose soem options as vars (#30379)
* expose some useful options as vars for plays and plugins
2017-09-17 12:25:56 -04:00
Miouge1
96ebfd78af os_image: Add checksum based glance image manipulation (#27107)
* Add checksum based glance image manipulation

* Update os_image.py

* Move to 2.5
2017-09-17 15:19:58 +02:00
Brian Coca
ae29245e05 decelerate! (#30160)
removed accelerate code
removed keyczar dep for accelerate
2017-09-16 23:35:50 -04:00
Anil Kumar Muraleedharan
1921eaf096 Resolving bug on CNOS Image download on multiple devices. 2017-09-16 10:53:21 -07:00
Marko Stanković
85649876d0 Add a note about the limitations of a namespace check 2017-09-16 17:37:12 +02:00
Marko Stanković
16ca412bd7 xml module: Improve error message for missing namespaces 2017-09-16 17:37:12 +02:00
Matt Davis
0e70057f56 CommandUtil C# API tweaks (#30453)
* changed RunCommand result from Tuple to CommandResult for easier future extensibility
* moved Win32 Dictionary->multi-null-string environment munging into C#
2017-09-15 23:09:15 -07:00
Matt Davis
c12c7a72ed Various fixes to azure_rm_virtualmachine for managed disks and allocated. (#30450)
* fixes #30194
* fixes #30193
* fixes #29662
* fixes #28859
2017-09-15 20:55:23 -07:00
Matt Davis
6b5b465125 azure_rm_dnsrecordset rewrite (#30449)
As-merged, had several issues that prevented idempotent usage. Some args were defined at the wrong UI level. Dual-state args didn't match up with typical Ansible UI.
2017-09-15 18:12:46 -07:00
Matt Clay
61dd5517c3 Fix PEP 8 issue. 2017-09-15 14:44:21 -07:00
Brian Coca
8799038a89 deprecated include
added docs for new actions that take over include duties
2017-09-15 13:20:32 -07:00
Brian Coca
fc9b44e021 clear correct cache when reconcile is invoked
moved it to ensure all callers get the correct hosts after
2017-09-15 12:58:40 -07:00
Nathaniel Case
7dc60c3f24 nxos_install_os install_state fix 2017-09-15 15:34:32 -04:00
Matt Clay
4ce13e983a Command module bug fix, tests and cleanup. (#30432)
* Add more command integration tests.
* Remove unnecessary command test debug tasks.
* Fix traceback in command module for empty args.
* Remove unreachable code.
2017-09-15 11:57:50 -07:00
René Moser
f128796782 cs_volume: fix CloudStackException dependency (#30389)
fixes pep8
2017-09-15 20:40:28 +02:00
Kedar K
ff84fc969c Fixes nxos_pim_rp_address module idempotence (#29620)
* Fixes nxos_pim_rp_address module idempotence

*  * Adds a note in header comment to indicate no support for absent state
2017-09-15 14:21:34 -04:00
Brian Coca
81fd67c10f fixed issue with default callback inheritance (#30427)
* fixed issue with default callback inheritance

 - callbacks need to document same options as callbacks they inherit from to get them configured
 - since default is also used by many 3rd party callbacks for inheritance, making the code 'tolerate' the missing docs
   and fallback to using the direct constant to configure it's options.
2017-09-15 11:14:47 -07:00
Nathaniel Case
5d404af76e Raise an error if ansible_network_os is not specified (#30429) 2017-09-15 13:56:05 -04:00
Brian Coca
f87d0b3502 typo fix 2017-09-15 13:13:41 -04:00
Ganesh Nalawade
11310b8c4a Update removed_in_version to 2.9 for network module top level cred args (#30416)
* Update removed_in_version to 2.9 for network module top level credential args

* Add documentation
2017-09-15 21:20:07 +05:30
Moshe Shitrit
7da69a23e6 Added nopackages option and Fix #24997 (#28831)
* Added nopackages option and Fix #24997
Adding a new option - nopackages.
This enables the option to add the --nopackages flag while registering a new node to RHN Satellite. We are not uploading the rpm data on our nodes and since we started utilizing ansible for nodes registration, I figures it would be useful for others as well.
Also-
Fixes #24997 (verified in my lab)

* Fixed documentation

* Documentation changes:
- typo fix in "default"
- Added "version_added" and set to 2.4

* Documentation changes:
- Removed trailing whitespaces in nopackages['version_added']

* This change is unrelated for this feature pull request and shouldn't be here (and also seems wrong, see #25079).

* Changed "version_added" to 2.5 in the module docs
2017-09-15 10:50:47 -04:00
Mike Wiebe
9af6dc4751 Fix nxos_snmp_community idempotence issue (#30388)
* Fix nxos_snmp_community idempotence issue

* Use passed in name to filter

* Test updates and remove unused method
2017-09-15 07:45:51 -07:00
Abhijit Menon-Sen
0addd53926 Don't expect (postgres) SERVER_VERSION to be M.N (#30417)
It could be something like '10beta4', which StrictVersion() would
reject. When Postgres 10 is released, it will be '10', which
StrictVersion() would STILL reject.

Fortunately, psycopg2 has a 'server_version' connection attribute that
is guaranteed to be an integer like 90605 for version 9.6.5, or 100000
for version 10. We can safely use this for version-specific code.
2017-09-15 18:03:06 +05:30
KrdLab
a6c8978b74 Fix RETURN section document in lambda.py (#28333)
* Fix RETURN section document in lambda.py

* Fix typo
2017-09-15 05:08:15 -04:00
Sloane Hertel
bdbe5337c6 s3 integration tests (#28396)
* Replace pause in integration tests with until.

Use resource prefix instead of generating a random number

Only try to delete keys if they exist

* Add alias to tests
2017-09-15 05:08:09 -04:00
KrdLab
e0a5b7d7ea Fix RETURN section document in iam_role.py (#28430) 2017-09-15 04:21:27 -04:00
Stepan Stipl
4ec91491e2 Pass region and ec2_url to boto3 connection (#30370)
fixes ansible/ansible#30368
2017-09-15 13:54:29 +10:00