Commit Graph

9614 Commits (77c635f18bd6dffc3b3d1fe75eebf024673fa8de)
 

Author SHA1 Message Date
Michael Scherer 77c635f18b cleanup import for htpassword module
In order to ease future refactoring, we should avoid importing
'*' from ansible.module_utils.basic.
9 years ago
Michael Scherer 2511500a91 Cleanup import for authorized_key
Do not import '*', to ease future refactoring and cleanup of
module_utils.
9 years ago
Ryan S. Brown cd9e39420b Fix cloudformation module return parameter documentation
Always return stack outputs, even if only an empty dict
9 years ago
tedder d8b015d9c8 Cloudformation module fix unintentional changed=true
- Don't rewrite the result; this is causing 'changed=true' on update
- Move AWSRetry import to top since it's a decorator, and is needed at definition-time
9 years ago
tedder f040d63403 Boto3 rewrite of cloudformation module
- removed star-imports, which wasn't possible in Ansible 1.x
- boto doesn't have any of the modern features (most notably, changesets), so this rewrite goes all-in on boto3.
- tags are updateable, at least in boto3. Fix documentation.
- staying with "ansible yaml to json conversion" because I'm trying to keep this scoped properly. The next PR will have AWS-native yaml support.
- documented the output. Tried to leave it backwards-compatible but the changes to 'events' might break someone's flow. However, the existing data wasn't terribly useful so I don't assume it will hurt.
- split up the code into functions. This should make unit testing possible.
- added forward-facing code: 'six' for iterating, started using AWSRetry, common tag conversion.
- add todo list
- Pass `exception` parameter to fail_json
9 years ago
Michael Scherer 953cd915bb Cleanup imports of xattr
Since the module use re and os, we need to import them.
And rather than importing '*', we should limit to the
only object/function needed, so we can more easily refactor
later.
9 years ago
Dag Wieers 20726b94be Ensure yum failures in with-loop result into a failed task
The implementation is fairly simple, we force the rc= parameter to not be zero so that the check in _executor/task_result.py_ correctly determines that it failed. Without this change Ansible would report the task to be ok (despite failed=True and msg=Some_error_message) although Ansible stops and the summary output reports a failed task.

This fixes #4214, #4384 and also relates to ansible/ansible#12070, ansible/ansible#16006, ansible/ansible##16597, ansible/ansible#17208 and ansible/ansible#17252
9 years ago
Jamie Evans b59b5d36e0 verify both tags and commits (#2654)
This fixes a bug where the module fails to verify tags.  I added a conditional statement in `verify_commit_sign()` that checks if `version` argument is a tag, if so, use `git verify-tag` instead.
9 years ago
Brian Coca ecc4029753 fixed doc typo 9 years ago
Brian Coca 8c9a3175e2 added allow_duplicates to include_role docs 9 years ago
Brian Coca 6e74aa9fbd added allow_duplicates to include_role docs 9 years ago
Michael Scherer 3266efb02f Make the code run on python 3
Test suite block on:

    Traceback (most recent call last):
      File "/tmp/ansible_fhootp1e/ansible_module_authorized_key.py", line 496, in <module>
        main()
      File "/tmp/ansible_fhootp1e/ansible_module_authorized_key.py", line 490, in main
        results = enforce_state(module, module.params)
      File "/tmp/ansible_fhootp1e/ansible_module_authorized_key.py", line 410, in enforce_state
        parsed_new_key = parsekey(module, new_key)
      File "/tmp/ansible_fhootp1e/ansible_module_authorized_key.py", line 308, in parsekey
        options = parseoptions(module, options)
      File "/tmp/ansible_fhootp1e/ansible_module_authorized_key.py", line 253, in parseoptions
        if options_dict.has_key(key):
    AttributeError: 'keydict' object has no attribute 'has_key'

With keydict being a subclass of dict.
9 years ago
John R Barker 510214a032 Group "apt-get update" and "apt-get install" (#5283)
* Group "apt-get update" and "apt-get install"

Should speed up sanity

* Run apt-get install in quiet mode
9 years ago
Michael Scherer 6f15dfd464 Make pip module use pip3 on python 3 9 years ago
Michael Scherer 4a0042b1f0 Make subversion module work on python 3
In python 3, filter return a iterator and so result in this traceback:

    Traceback (most recent call last):
      File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 264, in <module>
        main()
      File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 243, in main
        local_mods = svn.has_local_mods()
      File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 178, in has_local_mods
        return len(filter(regex.match, lines)) > 0
    TypeError: object of type 'filter' has no len()
9 years ago
Michael Scherer b0159fe7d3 Remove the wide try/expect clause
This doesn't catch anything precise, and none of the methods should
throw a expection for anything. This also hide python 3 errors.
9 years ago
Ryan S. Brown d018a86f4f Fix `fail_json` invocation in `cloudformation` module 9 years ago
Steven de Vries 4900632342 Move job parameter to meet expected requirements (#5151)
closes #5273
9 years ago
Ricardo Carrillo Cruz 500736d301 Refactor domain/project handling on os_user module (#5212)
The keys returned by user objects for default domain and
default project are respectively default_domain_id and
default_project_id.
We need to gather those IDs in case the user passed names, so we
can then compare with the user object on the needs_update helper
function.
9 years ago
Alfredo Solano 845cc1a531 apt: doc: use yaml syntax in examples (#5070) 9 years ago
Michael Scherer 15f8c6835b Fix unarchive on python3
Since handler.files_in_archive is a list of files coming from
various executables output, that's a bytes list, and we use it
with dest who is a str. So we need to convert that to native
type.
9 years ago
Michael Scherer a35b77a10c Convert name to bytes to compare it to bools
On python 3, bools is a list of bytes:

    >>> rc,bools = selinux.security_get_boolean_names()
    >>> 'virt_use_nfs' in bools
    False
    >>> bools
    [b'abrt_anon_write', b'abrt_handle_event', ...]
9 years ago
Davis Phillips 2fdd869fd6 vsphere_guest: Set extra config and powerstate after template deploy (#4266)
* Fixes #1381
* Fixes #2971
* Fixes #3056
9 years ago
Michael Scherer 1b6a71db92 Do not leak the password in log (#5189) 9 years ago
Michael Scherer df4ab73e15 Do not leak the vtp_password in log (#5199) 9 years ago
Michael Scherer 528092fd2f Do not leak the subversion password in log (#5200) 9 years ago
Michael Scherer 586353ed02 Do not leak various passwords in log (#5202) 9 years ago
Michael Scherer 8853f6b6a4 Do not leak the password in log (#5203) 9 years ago
Michael Scherer 9718a58be4 Do not leak api_key or root password in log (#5201) 9 years ago
Peter Sprygada 6795954dc8 fixes bug introduced in 3670215 in junos_config (#5251)
The previous fix created a new bug that this PR resolves
9 years ago
John R Barker 312f578f93 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
9 years ago
Tom Melendez c6d8cb6cab Added libcloud guard for Managed Instance Groups. (#4911) 9 years ago
Tom Melendez 454835622b GCE module examples update. Correct syntax, demonstrate other options and creation of multiple instances. (#5192) 9 years ago
Peter Sprygada 04b214852d fixes issue with collecting all filesystems in ios (#5248)
earlier versions of ios do not provide the all-filesystems argument.  This
fix will now only report on the flash filesystem for ios_facts

fixes #4712
9 years ago
Peter Sprygada 528ced6d12 ios_config will now explicitly disconnect from remote host (#5247)
The ios_config module will now explicitly send a disconnect to the
remote host at the conclusion of the module run

ref #5181
9 years ago
amitsi 0ffd423b07 Update pn_vlan (#5223)
removed name from an older file which got left out
9 years ago
Peter Sprygada d8d9ab8f6d removes automated backup of ios to flash due to errors (#5245)
The feature is extremely unstable right now and decision to pull
it out for 2.2.  Workaround is to do the same in the playbook
9 years ago
Peter Sprygada 9c25a7f97e fixes issue with pushing config to versions that do not support sessions (#5236)
earlier versions of eos do not support configuration sessions.  this change
will now check if sessions are supported and if not will fallback to
not using config sessions

fixes #4909
9 years ago
John Barker 275fa3f055 Correct functional typos 9 years ago
Peter Sprygada e6c039872f fixes bug with junos_config module not properly loading config (#5213)
This fixes two issues.  First, it fixes an issue with the junos_config
module not properly recognizing a file with set commands.  The second
bug would cause the diff_config() function to raise an exception due
to a blank line when splitting the config
9 years ago
Nathaniel Case f5c204005f nxos module cleanup (#5065)
* Fix imports on nxos_bgp* modules

* Fix imports on nxos_evpn* modules

* Cleanup issues for nxos_facts

* Shuffle imports for nxos_template

* Fix imports on nxos_ospf* modules

* Fix nxos_hsrp

As get_hsrp_groups_in_devices is not actually called anywhere, I presume this
change is reasonable.

* Fix imports on nxos_interface* modules

* Update nxos_static_route imports

* update nxos_vrf

* Update nxos_config imports
9 years ago
jjshoe 745b1857d6 Catch the rare condition where ami creation failed, this is critical when you have a 10-15 minute wait on ami creation. This rarely happens, and is tough to reproduce, but it does happen. (#5106) 9 years ago
Peter Sprygada b4763c297b updates docstring for sros modules (#5197) 9 years ago
adejongh 32d7d31105 Fixed incorrect usage of user_data variable (#5194) 9 years ago
Bill Nottingham 149f10f8b7 Fix deprecation notices. (#5180) 9 years ago
Elena Washington b4f6a25195 Make is so that the params param truly isn't required (fix for #3860) 9 years ago
Toshio Kuratomi 7e19d375b3 Emit an error message if six is not installed.
dopy 0.3.7 makes use of six but doesn't list it as a requirement.  This
means that people installing with pip won't get six installed, leading
to errors.  Upstream released dopy-0.3.7a to address that but pip thinks
that is an alpha release.  pip does not install alpha releases by
default so users aren't helped by that.

This change makes ansible emit a good error message in this case.

Fixes #4613
9 years ago
Toshio Kuratomi de9dc9b58a Fix exception hierarchy for digital ocean and some cleanups of pep8 style
Fixes #4613
9 years ago
Chris Houseknecht 705dfc6716 Merge pull request #5165 from chouseknecht/fix_docker_service
Surface Compose stdout on failure
9 years ago
Chris Houseknecht 0156cb942e Surface Compose stdout on failure
Signed-off-by: Chris Houseknecht <chouseknecht@ansible.com>
9 years ago