Commit Graph

18118 Commits (d871964acab448ce8b54d32a7f1b474d9e90bb9a)

Author SHA1 Message Date
Will Thames d871964aca Ensure region is set in ec2_vpc_subnet_facts (#30399)
Make requested change in #30370
7 years ago
Adrian Likins 174cb1f33c Check number of vault secrets after setup. (#30520)
This is to catch vault secrets from config and
cli. Previously vault_password_file in config was
missed since it was added by setup_vault_secrets,
so check after setup_vault_secrets.
7 years ago
Will Thames 18582295e3 Fix broken LimitExceeded check in iam_managed_policy (#30537)
When policy versions exceed 5, we hit LimitExceeded. However,
the exception checking should use `e.response['Error']['Code']`
7 years ago
Patrick Ogenstad d74c871559 Restore correct coloring to selective callback (#30528)
* Restore correct coloring to selective callback

This fixes the bug raised in #30506

* Fix format issues for Python 2.6 & indent

Removed the zero length fields to support format under Python 2.6

Fixed E128 continuation line under-indented for visual indent issue
7 years ago
dteach ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
7 years ago
David Mahler d395166ae0 Vyos correction (#30605) 7 years ago
Laurent Coustet 17995f0e48 Remove unused variable in git module. (#28464) 7 years ago
Jordan Borean a940eb1e80 CamelConverter - more fixes picked up in testing (#30601) 7 years ago
Willem van Ketwich 92426840d6 fix for unrequired parameter 7 years ago
Trishna Guha ae044f507f fix nxos_reboot command format (#30549)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha e308176f3e fix write_on_file nxos_snapshot (#30545)
* fix write_on_file nxos_snapshot

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* some more logic

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
s-hertel b3273223db Previously to use the modes put or get the object had to be specified with a leading /. Since the boto call doesn't take an object like that this was overlooked and removed. Added a check to remove that leading character. 7 years ago
Jordan Borean 1ea0293878 CamelConversion: fix to not convert string values (#30595) 7 years ago
Jordan Borean 838f39e76a win_scheduled_task: rewrite (#28995)
* win_scheduled_task: rewrite for additionality functionality and bug fixes

* fixes for docs and os version differences

* started with the testing

* doc fix

* added more tests

* added principals tests

* finished tests for win_scheduled_task rewrite

* feedback from PR

* change to fail when both new and deprecated args are set

* change diff variable to match new standard and update doc sentance
7 years ago
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
7 years ago
Martin Krizek 32d6b1d0e0 user: fix default non-system user's shell on macOS 7 years ago
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
7 years ago
Brian Coca 71cc906ec8 fixed password lookup docs 7 years ago
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..
7 years ago
Brian Coca b9120dfd97 fixed decreption
(cherry picked from commit 1cee81375386a7f3ac3d1893342b9323983f00c9)
7 years ago
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
7 years ago
Dag Wieers 2ef8c5a03d Fix typo
And also clean up Copyright/License statements when we're at it.
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
Ondra Machacek 0aebdb4aca ovirt_vms: Fix the logout condition (#30410) 7 years ago
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.
7 years ago
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
7 years ago
jctanner 5aebcd4f7f Remove redundant check for group membership in add_host (#30530) 7 years ago
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
7 years ago
Toshio Kuratomi c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 7 years ago
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
7 years ago
Dag Wieers 229a86c952 win_file: Fix check-mode issue removing dirs (#30475)
This fixed #30442
7 years ago
Scott Buchanan 4617be3085 clarify documentation of import_role 7 years ago
Brian Coca 314e6d0d8a start of 'is chroot' fact
probably missing cornercases for some linux/bsd setups and other OSs
7 years ago
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.
7 years ago
Toshio Kuratomi 47d303e255 Update the bundled six library to 1.11.0 7 years ago
Brian Coca 6e857468a2 expose soem options as vars (#30379)
* expose some useful options as vars for plays and plugins
7 years ago
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
7 years ago
Brian Coca ae29245e05 decelerate! (#30160)
removed accelerate code
removed keyczar dep for accelerate
7 years ago
Anil Kumar Muraleedharan 1921eaf096 Resolving bug on CNOS Image download on multiple devices. 7 years ago
Marko Stanković 85649876d0 Add a note about the limitations of a namespace check 7 years ago
Marko Stanković 16ca412bd7 xml module: Improve error message for missing namespaces 7 years ago
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#
7 years ago
Matt Davis c12c7a72ed Various fixes to azure_rm_virtualmachine for managed disks and allocated. (#30450)
* fixes #30194
* fixes #30193
* fixes #29662
* fixes #28859
7 years ago
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.
7 years ago
Matt Clay 61dd5517c3 Fix PEP 8 issue. 7 years ago
Brian Coca 8799038a89 deprecated include
added docs for new actions that take over include duties
7 years ago
Brian Coca fc9b44e021 clear correct cache when reconcile is invoked
moved it to ensure all callers get the correct hosts after
7 years ago
Nathaniel Case 7dc60c3f24 nxos_install_os install_state fix 7 years ago