Commit graph

11816 commits

Author SHA1 Message Date
Peter Sprygada
8b70d17f61 ios_facts module will no longer error on missing command (#5491)
The module will error if it tries to use a cli command that is not available
on a given platform.  This fix will address that problem.  If the cli
command is not available, then the command is silently discarded and the
facts that the command output is based on is not returned.  Any failed
commands are provided in the module return under the failed_commands
key.  This fix also updates the Examples docstring to make it consistent
with other ios_* modules

fixes #5444
fixes #5372
2016-12-08 11:25:26 -05:00
Matt Robinson
df70a58d72 apt_repository: Relax PPA checks and add basename (#5432)
Allow installation of PPA repositories on non-Ubuntu Debian derived
distribution targets (e.g. neon, Mint, Debian itself) by removing the
specific check for UbuntuDistribution before allowing PPA: format
sources. This fixes the addition of PPA repositories under KDE neon (as
the codenames match the base Ubuntu distribution).

To make the functionality also useful under Mint and Debian which have
different codenames to their Ubuntu upstream / downstream releases, add
a 'codename' option to override the default used in the PPA source
entry.
2016-12-08 11:25:26 -05:00
Matt Clay
be48ea4389 Simplify compileall checks. Remove py3 skip list. 2016-12-08 11:25:26 -05:00
Chris Becker
fabb63c43f Add more specific language to module description and examples
* Add 'on the remote server' to `file` parameter description
* Add example showing how to use the `file` parameter, with specific
  language about the file's location being on the 'remote server'
2016-12-08 11:25:25 -05:00
zuiurs
eeecc3adcc fix the behavior that the dest is directory
This fixes the behavior that the dest is directory,
when we set the "force: no" argument.
To be join the dest and the src's basename,
before checking the "force" argument.
2016-12-08 11:25:25 -05:00
Ricardo Carrillo Cruz
33d7745794 Add rebuild support to os_server_actions (#4289)
Fixes #2714
2016-12-08 11:25:25 -05:00
Allen Sanabria
c9960c00dc Updated documentation for PR http://github.com/ansible/ansible/pull/17207 2016-12-08 11:25:25 -05:00
Brian Coca
00fbd98f97 dont join when group is none 2016-12-08 11:25:25 -05:00
John R Barker
2a9e5687eb Correct typos in docs strings (#5233) 2016-12-08 11:25:25 -05:00
Jamie Dyer
4ac3b0c5d5 Make the RDS endpoint available if AWS returns it. Fixes #3865 (#4143) 2016-12-08 11:25:25 -05:00
jctanner
60dd2f1fff apt: update cache until corrupt package lists are fixed (#5448)
* apt: If the cache object fails to lost due to a corrupt file, try to update the cache until it is fixed.
* Append -q to the update parameters
* Remove unused variable
* Use a string that doesn't rely on internationalization
* Use py24 exception style
* Use get_exception

Fixes #2951
2016-12-08 11:25:25 -05:00
Brian Coca
ba6bc5382d corrected version added 2016-12-08 11:25:25 -05:00
Brian Coca
20f2fe4e91 added logout to docker_login
also cleaned up 'actions' and minor doc issues
2016-12-08 11:25:25 -05:00
Brian Coca
9e931f89fb added ability to control sleep between attempts
the default was 1s but it makes sense to make this configurable
2016-12-08 11:25:25 -05:00
Brian Coca
97b23c0fb7 docit 2016-12-08 11:25:25 -05:00
Brian Coca
52332f5b78 allow groups to be passed as YAML list as well
keeps backwards copat with 'comma delimited string'
fixes #5163
2016-12-08 11:25:25 -05:00
Evan Kaufman
5d3e64b0d2 Identify existing unmanaged jobs by exact match, when no header comment is found
* updated `find_job` method to find by exact match of job, when no matching header comment is found
  * note this fallback injects a header comment for later calls to `update_job` or `remove_job`
* abstracted header comment building to `do_comment` method

Fixes #3256
2016-12-08 11:25:25 -05:00
Brian Coca
47ffb6d542 minor updates to include docs 2016-12-08 11:25:25 -05:00
Brian Coca
d36bea766d make sure all svcadm operations are syncronous
fixes #5296
2016-12-08 11:25:25 -05:00
Toshio Kuratomi
0d74ae3368 Need to locate a pip inside a venv when venv is specified
Alternative to #5359

Fixes #5347
2016-12-08 11:25:24 -05:00
Matt Clay
24615e10e3 Removed tests migrated to ansible/ansible repo. (#5452) 2016-12-08 11:25:24 -05:00
Matt Davis
2c216cdf35 fix JSON junk in win_file state=directory case (#5427) 2016-12-08 11:25:24 -05:00
Charles Paul
f6676f4957 add id: back to documentation 2016-12-08 11:25:24 -05:00
bencomp
d25ba6a30a Make find return sample a YAML dict
In the description of the find module return value, the sample dict
has its key=value strings converted to key=value: None in the
web documentation. This commit updates the sample output to a 'real'
dict.

Minor additional edit in the description: "return list *of* files".
2016-12-08 11:25:24 -05:00
Matt Davis
8e97539e20 fix win_shell/win_command deadlock on large interleaved stdout/stderr (#5384)
fixes #5229
2016-12-08 11:25:24 -05:00
Fahri Cihan Demirci
1ecb63f0e0 Fix String Type for Python 3 Branch Comparison
* Use the `to_native` conversion method to convert a command output to the
  appropriate form when looking for branch names in the command output,
  therefore avoiding a `TypeError` in Python 3.
2016-12-08 11:25:24 -05:00
Hiroaki Nakamura
c2d37f1db9 hostname: add support for alpine linux (#4837)
* Add update_current_and_permanent_hostname to the hostname module

* Add support for Alpine Linux to the hostname module
2016-12-08 11:25:24 -05:00
Evan Kaufman
42079bcc59 Exposed backup file path, simplified result args (#5364)
Fixes #245
2016-12-08 11:25:24 -05:00
Toshio Kuratomi
38b3c43c68 Fix uri for change in case in response
In python3, response fields are title cased whereas in python2 they were
not.  We return these fields to the module's caller so we need to
normalize all of them to be lower case.

This reverts the lowercase check from 454f741ef5
as that one was only targetted as a single field.
2016-12-08 11:25:24 -05:00
Matt Davis
dfc2a29bdb fix win async tempdir deletion failure 2016-12-08 11:25:24 -05:00
Matt Davis
73f77e2af6 switch win async to use Win32 CreateProcess
should fix flaky async startup behavior where watchdog/module exec starts and immediately dies
2016-12-08 11:25:24 -05:00
Toshio Kuratomi
bd9e790cfe First set of fixes for uri module to work with py3.
This fix handles changes in the response headers (no longer all
lowercased) and switches from unicode() to to_text().
2016-12-08 11:25:24 -05:00
Jonathan Mainguy
51313e6da8 update maintainer 2016-12-08 11:25:24 -05:00
Timothy Appnel
5a17277bd3 clarifies synchronize module on use of --delayed-updates 2016-12-08 11:25:24 -05:00
Evan Kaufman
f8dad7130d Record existing cron file as string property, rather than only recording termination
This seems less hackish, and feels more proper for diff generation
2016-12-08 11:25:24 -05:00
Evan Kaufman
f64990df02 Rendering of crontab should reflect actual newline termination, in diff mode 2016-12-08 11:25:24 -05:00
Evan Kaufman
b416015634 Ensure trailing newline is written to cron file
Records whether existing cron file (or CRONCMD output) has a terminating newline, and ensures a trailing newline is written as necessary EVEN IF NO CHANGE WAS MADE to the target env/job

Fixes #2316
2016-12-08 11:25:23 -05:00
Evgenii Terechkov
da71acf1bf Replace dangerous shell calls with module.run_command 2016-12-08 11:25:23 -05:00
Evgenii Terechkov
8fd4785062 Ensure that we use shell
to run apt-get -y install ... >/dev/null

this commit must fix #2839
2016-12-08 11:25:23 -05:00
Rowan Wookey
914e205eb3 Added work around for Ubuntu Xenial calling php7_module php7.0 2016-12-08 11:25:23 -05:00
Luca Berruti
2bbbf58156 ini_file: return more infos on changes. 2016-12-08 11:25:23 -05:00
Luca Berruti
6d8b140f46 ini_file: diff support. 2016-12-08 11:25:23 -05:00
Luca Berruti
73401182c1 ini_file: add create= option. 2016-12-08 11:25:23 -05:00
Luca Berruti
1a22dde1ac ini_file: fixes #1788, fails --check when file doesn't exist. 2016-12-08 11:25:23 -05:00
Brian Coca
fccaf883da refactor stat
make format function 'format only'
added platform dependant info, when it is available
avoid rechecking same info
added comments to each info gathering section

(cherry picked from commit a79acf73d7eb79b76d808ff8a1d6c505dfd9ec82)
2016-12-08 11:25:23 -05:00
Toshio Kuratomi
e2fce828f6 Order of return values was reversed 2016-12-08 11:25:23 -05:00
Toshio Kuratomi
9aac87e08c Fix builddep when a source package exists without a binary package
builddep only requires a source package to be in the repos but our code
was checking for a binary package before running buiddep.  Reversing the
order makes it work correctly.

Fixes #4519
2016-12-08 11:25:23 -05:00
Toshio Kuratomi
b8279e7447 Only change to short IDs for delete (#5353)
* Only change to short IDs for delete

If the user specifies long IDs, use them for all commands except for
deleting a key.  Need to use short IDs there because of an upstream
apt_key bug.  Fixed in apt_key 1.10 (fix is present in Ubuntu 16.04 but
not Ubuntu 14.0 or some Debians).

Fixes #5237

* Check that apt-key really erased the key

When erasing a key, apt-key does not understand how to process subkeys.
This update explicitly checks that the key_id is no longer present and
throws an error if it is.  It also hints at subkeys being a possible
problem in the error message and the documentation.

Fixes #5119

* Fix apt_key check mode with long ids

apt-key can be given a key id longer than 16 chars to more accurately
define what key to download.  However, we can use a maximum of 16
chars to verify whether a key is installed or not.  So we need to use
different lengths for the id depending on what we're doing with it.

Fixes #2622

Also:

* Some style cleanups
* Use get_bin_path to find the path to apt-key and then use that when
  invoking apt-key
* Return a nice user error message if the key was not found on the
  keyserver
* Make file and keyring parameters type='path' so envars and tilde are
  expanded
2016-12-08 11:25:23 -05:00
Charles Zaffery
4c830400f8 Remove line when 'state: absent' with 'option:' instead of commenting 2016-12-08 11:25:23 -05:00
Adrian Likins
29978344ea Make authorized_key preserve key order (#5339)
* Make authorized_key preserve key order

Track the ordering of keys in the original file (rank)
and try to preserve it when writing out updates.

Fixes #4780
2016-12-08 11:25:23 -05:00
Toshio Kuratomi
e7fcfa981e Remove the yaml dep from the git module 2016-12-08 11:25:23 -05:00
Toshio Kuratomi
fad760dc7a Fix git for py3
Comparing to the output of run_command() needs to use native strings

Also fix imports: We were relying on them coming from the import of
basic.  A few (like yaml) weren't imported at all.
2016-12-08 11:25:23 -05:00
Robin Roth
5446e6639f Fix git failure for use of depth with version (#5135)
* Fixes #5108
* before module fails with "fatal: A branch named 'STABLE' already
  exists." when depth is used on a fresh clone with a non-HEAD branch
2016-12-08 11:25:22 -05:00
René Moser
3dda38a90f doc: add_host: add example without deprecated vars (#5323)
ansible_ssh_* are deprecated since 2.0
2016-12-08 11:25:22 -05:00
John Baublitz
352b620665 GCE: Add support for 'number' parameter for manually provisioned Google Compute clusters (#4276)
* Add option for number parameter to generate manually provisioned clusters from a base name

* Refactor code to work with starting and stopped when number is specified

* Update docs

* Fix documentation error breaking Travis

* Fixes for async gce operations

* Fix documentation

* base_name from parameter to alias for name and fixes for renaming variables

* Fix breaking change on gce.py

* Fix bugs with name parameter

* Fix comments for Github build checks

* Add logic to set changed appropriately for cluster provisioning
2016-12-08 11:25:22 -05:00
Toshio Kuratomi
ff6bac126e On Ubuntu16, virtualenv always tries to use python2 even when python2 is not installed.
Workaround that by mimicing the upstream virtualenv behaviour in code
(use the python version that was used to invoke virtualenv/the ansible
module)
2016-12-08 11:25:22 -05:00
Toshio Kuratomi
9bbe71154c Fix authorized_key module to preserve the order of options
The last fix allowing multiple definitions of the same option key (for
permitopen support) introduced a set() which removed the guaranteed
ordering of the options.

This change restores ordering.  The change is larger than simply
removing the set because we do need to handle the non-dict semantics
around keys not being unique in the data structure.  The new code make
use of __setitem__() and items() to do its work.  Trying to use
getitem() or keys() should be looked upon with suspicion as neither of
those follow dictionary semantics and it is quite possible the coder
doesn't realize this.  The next time we need to touch or enhance the
keydict code it should probably be rewritten to not pretend to extend
the dictionary interface.
2016-12-08 11:25:22 -05:00
Matthew Jones
107a473dd8 Add separate checkout and update parameters (#5306)
* Add separate checkout and update parameters

This brings the svn module in line with the git module for controlling
individual update and checkout functionality based on whether the
directory exists or not.

It also allows specifying `no` for both to pull the remote revision
without performing a checkout

* Update version-added for new parameters
2016-12-08 11:25:22 -05:00
Matthew Jones
97bf5b84e3 Add separate clone parameter (#5307)
* Add separate clone parameter

This brings the hg module in line with the git module for controlling
individual update and checkout functionality based on whether the
directory exists or not.

It also allows specifying `no` for both to pull the remote revision
without performing a checkout

* Reflect the right added ver for the hg clone arg
2016-12-08 11:25:22 -05:00
Ryan S. Brown
422ec08649 Remove unused YAML import from cloudformation 2016-12-08 11:25:22 -05:00
Ryan Brown
dfd57942f9 Support native YAML in CloudFormation module (#5327)
Support the new native YAML format in the CloudFormation API. This means
the existing `template_format` parameter is deprecated. This commit also
adds a warning for the deprecated parameter.
2016-12-08 11:25:22 -05:00
John R Barker
96f9992884 Typo in cleanup (#5322) 2016-12-08 11:25:22 -05:00
Filip Hubík
9a2d8337f2 Fix incorrect line wrapping in output from yum check-updates
https://github.com/ansible/ansible-modules-core/issues/4318#issuecomment-251416661
2016-12-08 11:25:22 -05:00
John R Barker
7a3d93b9f6 Run validate-modules from ansible/ansible@devel (#5257)
* Run validate-modules from devel

Use a clean dir for checkout

typo

Correct path

validate-modules requires mock and voluptuous==0.8.8

typo

Ensure script is running

Remove testing debug

Install Ansible only once

Install ansible and validate_modules requirements

Now that we no longer pip install Ansible we need to manually install
it's dependencies

Debug

Dependencies are listed in ansible/ansible

debug

submodules

typo

typo

working

* Matt's feedback

* Use mktemp to checkout and delete directory after running

* Single quotes
2016-12-08 11:25:22 -05:00
Daniel Andrei Minca
ca36d232d5 fix unclear documentation for docker container
the docker container module's `exposed_ports` was slightly ambigous.

Use the official Docker documentation to define what an `exposed port`
is.

Resolves: ansible/ansible-modules-core#5303
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2016-12-08 11:25:22 -05:00
Michael Scherer
ed590257a3 Fix code for python 3
Since dict.keys return a dictkeys under python 3, we hav to cast it
to a list to avoid traceback:

    Traceback (most recent call last):
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 496, in <module>
        main()
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 490, in main
        results = enforce_state(module, module.params)
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 410, in enforce_state
        parsed_new_key = parsekey(module, new_key)
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 308, in parsekey
        options = parseoptions(module, options)
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 259, in parseoptions
        options_dict[key] = value
      File "/tmp/ansible_sh16ejbd/ansible_module_authorized_key.py", line 164, in __setitem__
        self.itemlist.append(key)
    AttributeError: 'dict_keys' object has no attribute 'append'

Yet another fix for https://github.com/ansible/ansible/pull/18053
2016-12-08 11:25:22 -05:00
Michael Scherer
e6b3c0d88a cleanup import for htpassword module
In order to ease future refactoring, we should avoid importing
'*' from ansible.module_utils.basic.
2016-12-08 11:25:22 -05:00
Michael Scherer
2c078dcb97 Cleanup import for authorized_key
Do not import '*', to ease future refactoring and cleanup of
module_utils.
2016-12-08 11:25:21 -05:00
Ryan S. Brown
08b119df33 Fix cloudformation module return parameter documentation
Always return stack outputs, even if only an empty dict
2016-12-08 11:25:21 -05:00
tedder
d01bfa6a72 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
2016-12-08 11:25:21 -05:00
tedder
763399830d 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
2016-12-08 11:25:21 -05:00
Michael Scherer
3f43879db8 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.
2016-12-08 11:25:21 -05:00
Dag Wieers
858d02ac4c 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
2016-12-08 11:25:21 -05:00
Jamie Evans
606ac78a20 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.
2016-12-08 11:25:21 -05:00
Brian Coca
720574ef77 added allow_duplicates to include_role docs 2016-12-08 11:25:21 -05:00
Michael Scherer
9ecd220683 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.
2016-12-08 11:25:21 -05:00
John R Barker
8fe269f836 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
2016-12-08 11:25:21 -05:00
Michael Scherer
9e3058c323 Make pip module use pip3 on python 3 2016-12-08 11:25:21 -05:00
Michael Scherer
f9478c7618 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()
2016-12-08 11:25:21 -05:00
Michael Scherer
c9da5e98a9 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.
2016-12-08 11:25:21 -05:00
Ryan S. Brown
adc56e52d8 Fix fail_json invocation in cloudformation module 2016-12-08 11:25:21 -05:00
Steven de Vries
054fe53b43 Move job parameter to meet expected requirements (#5151)
closes #5273
2016-12-08 11:25:21 -05:00
Ricardo Carrillo Cruz
10d662ea1b 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.
2016-12-08 11:25:21 -05:00
Alfredo Solano
88d7f0c692 apt: doc: use yaml syntax in examples (#5070) 2016-12-08 11:25:20 -05:00
Michael Scherer
a567942405 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.
2016-12-08 11:25:20 -05:00
Michael Scherer
7a0ef069fa 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', ...]
2016-12-08 11:25:20 -05:00
Davis Phillips
37008e1da1 vsphere_guest: Set extra config and powerstate after template deploy (#4266)
* Fixes #1381
* Fixes #2971
* Fixes #3056
2016-12-08 11:25:20 -05:00
Michael Scherer
5e1dfa9485 Do not leak the password in log (#5189) 2016-12-08 11:25:20 -05:00
Michael Scherer
18b0920311 Do not leak the vtp_password in log (#5199) 2016-12-08 11:25:20 -05:00
Michael Scherer
3b2b33bf29 Do not leak the subversion password in log (#5200) 2016-12-08 11:25:20 -05:00
Michael Scherer
996ccca82f Do not leak various passwords in log (#5202) 2016-12-08 11:25:20 -05:00
Michael Scherer
8b7898e4ab Do not leak the password in log (#5203) 2016-12-08 11:25:20 -05:00
Michael Scherer
180977a727 Do not leak api_key or root password in log (#5201) 2016-12-08 11:25:20 -05:00
Peter Sprygada
2127459794 fixes bug introduced in 3670215 in junos_config (#5251)
The previous fix created a new bug that this PR resolves
2016-12-08 11:25:20 -05:00
John R Barker
25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Tom Melendez
a4077537e0 Added libcloud guard for Managed Instance Groups. (#4911) 2016-12-08 11:25:20 -05:00
Tom Melendez
72635db94d GCE module examples update. Correct syntax, demonstrate other options and creation of multiple instances. (#5192) 2016-12-08 11:25:20 -05:00
Peter Sprygada
810040be05 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
2016-12-08 11:25:19 -05:00
Peter Sprygada
f106ff9e77 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
2016-12-08 11:25:19 -05:00
amitsi
522ed054f7 Update pn_vlan (#5223)
removed name from an older file which got left out
2016-12-08 11:25:19 -05:00
Peter Sprygada
43e6206559 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
2016-12-08 11:25:19 -05:00
Peter Sprygada
25d00838a9 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
2016-12-08 11:25:19 -05:00
John Barker
bca8bbe7c2 Correct functional typos 2016-12-08 11:25:19 -05:00
Peter Sprygada
4dc09e19ea 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
2016-12-08 11:25:19 -05:00
Nathaniel Case
5a8ebf5953 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
2016-12-08 11:25:19 -05:00
jjshoe
706bdbf284 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) 2016-12-08 11:25:19 -05:00
Peter Sprygada
3fbae6f10f updates docstring for sros modules (#5197) 2016-12-08 11:25:19 -05:00
adejongh
a89992f70f Fixed incorrect usage of user_data variable (#5194) 2016-12-08 11:25:19 -05:00
Bill Nottingham
765269e547 Fix deprecation notices. (#5180) 2016-12-08 11:25:19 -05:00
Elena Washington
91e433594a Make is so that the params param truly isn't required (fix for #3860) 2016-12-08 11:25:19 -05:00
Toshio Kuratomi
0fe99f20d9 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
2016-12-08 11:25:19 -05:00
Toshio Kuratomi
064c381608 Fix exception hierarchy for digital ocean and some cleanups of pep8 style
Fixes #4613
2016-12-08 11:25:19 -05:00
Chris Houseknecht
8e9befa5ba Surface Compose stdout on failure
Signed-off-by: Chris Houseknecht <chouseknecht@ansible.com>
2016-12-08 11:25:18 -05:00
Chris Houseknecht
63b6672ea5 Improved enumeration of actions 2016-12-08 11:25:18 -05:00
Chris Houseknecht
1e4b8c13a3 Improved build and pull error handling 2016-12-08 11:25:18 -05:00
Gabriele
f8d2be407d Fixing docstring (#5130) 2016-12-08 11:25:18 -05:00
Peter Sprygada
56120433c9 checks commit comment to make sure it doesn't exceed 60 characters (#5155)
The comment argument can be at most 60 characters per the IOS XR command
line.  If a comment is > 60 characters, the module will now gracefully error
and return a well formed message.

fixes 5146
2016-12-08 11:25:18 -05:00
John R Barker
efca39d4d4 Remove reference to parents parameter which doesn't exist (#5143) 2016-12-08 11:25:18 -05:00
John R Barker
d12f2d2c72 Remove docs for commit which no longer exists (#5152) 2016-12-08 11:25:18 -05:00
Laurent Godet
336c9f9f35 Fix daemon_reload in systemd module 2016-12-08 11:25:18 -05:00
Toshio Kuratomi
283205d7b3 We've changed run_command to return native_strings
on python3, this means that we don't get bytes back by default.  We
probably do want bytes here so modify our call to run_command so we get
bytes instead of text.
2016-12-08 11:25:18 -05:00
Ryan Brown
b091d39baf Handle termination_protection parameter when restarting instances (#5076)
* Restart EC2 instances with multiple network interfaces

A previous bug, #3234, caused instances with multiple ENI's to fail when being
started or stopped because sourceDestCheck is a per-interface attribute, but we
use the boto global access to it (which only works when there's a single ENI).

This patch handles a variant of that bug that only surfaced when restarting an
instance, and catches the same type of exception.

* Default termination_protection to None instead of False

AWS defaults the value of termination_protection to False, so we don't
need to explicitly send `False` when the user hasn't specified a
termination protection level. Before this patch, the below pair of tasks
would:

1. Create an instance (enabling termination_protection)
2. Restart that instance (disabling termination_protection)

Now, the default None value would prevent the restart task from
disabling termination_protection.

```
- name: make an EC2 instance
  ec2:
    vpc_subnet_id: {{ subnet  }}
    instance_type: t2.micro
    termination_protection: yes
    exact_count: 1
    count_tag:
       Name: TestInstance
    instance_tags:
       Name: TestInstance
    group_id: {{ group }}
    image: ami-7172b611
    wait: yes
- name: restart a protected EC2 instance
  ec2:
    vpc_subnet_id: {{ subnet  }}
    state: restarted
    instance_tags:
       Name: TestInstance
    group_id: {{ group }}
    image: ami-7172b611
    wait: yes
```
2016-12-08 11:25:18 -05:00
John R Barker
3333035ef4 Add matching quotes (#5133)
Will fix broken syntax highlighting
2016-12-08 11:25:18 -05:00
Matt Davis
e2f66abe73 fixed windows setup to run in check_mode 2016-12-08 11:25:18 -05:00
Toshio Kuratomi
007b5f4c32 Fix assemble module for python3 2016-12-08 11:25:18 -05:00
Peter Sprygada
9c664f424e adds exception handling for adding an invalid condition (#5125)
This change will now handle a problem adding a condition that raises
an AddConditionError and return a well formed error to the user.
2016-12-08 11:25:18 -05:00
Pradeep
b405931e8b Typo Fix 2016-12-08 11:25:18 -05:00
Gabriele
b4565b6667 Adding more details on DOCSTRING about how to use the module (#5121) 2016-12-08 11:25:18 -05:00
Peter Sprygada
9707ae6490 adds exception handling for AddConditionError (#5124)
AddConditionErrors are now handled by nxos_command and a well formed error
is returned from the module
2016-12-08 11:25:17 -05:00
Peter Sprygada
f5e72c6590 adds check for AddConditionError when adding conditional statements (#5123)
The Conditional instance will now raise the AddConditionError and this
change instructs eos_command to catch the error and return a nicely formed
error message
2016-12-08 11:25:17 -05:00
Matt Davis
48b0cb750c (re)add post-watchdog-launch sleep to Windows async_wrapper (#5122)
fixed apparent race where subprocess appears to never start
2016-12-08 11:25:17 -05:00
Gabriele
d4c2a13325 Improving nxos_igmp_snooping (#5011) 2016-12-08 11:25:17 -05:00
Gabriele
3c257688bc Fixing nxos_igmp_interface (#5010) 2016-12-08 11:25:17 -05:00
Gabriele
b6c07bc9e9 Fixing nxos_hsrp (#5009)
* Fixing nxos_hsrp

* Adding space after =
2016-12-08 11:25:17 -05:00
Senthil Kumar Ganesan
21ae84a04e Remove the dellosX_template module (#5110) 2016-12-08 11:25:17 -05:00
Matt Davis
c07a2b49b6 add JSON junk filter to async_wrapper (#5107) 2016-12-08 11:25:17 -05:00
Peter Sprygada
d58462949f roll up of unicode fixes in junos modules (#5113)
* fixes junos_template (fixes #3962)
* fixes junos_config
2016-12-08 11:25:17 -05:00
Gabriele
62bf8d0c78 Add ethernet-link-oam mapping to nxos_feature (#4956)
* Add ethernet-link-oam mapping

* Adding port-secutiry mapping

* Fixing command output format
2016-12-08 11:25:17 -05:00
Gabriele
67d6f2c0d6 Fixing nxos_vlan (#5005)
* Fixing nxos_vlan

* Fixing docstring

* Fixing docstring
2016-12-08 11:25:17 -05:00
Gabriele
43632951fe Fixing nxos_aaa_server (#5002)
* Fixing command output formatting

* Fixing cmds
2016-12-08 11:25:17 -05:00
Gabriele
7f861fb9ce Fixing nxos_acl (#5006)
* Fixing nxos_acl

* Fixing nxos_acl
2016-12-08 11:25:17 -05:00
Gabriele
272b20000f Fixing nxos_acl_interface (#5007) 2016-12-08 11:25:17 -05:00
Gabriele
75c4051933 Fixing nxos_interface (#5012) 2016-12-08 11:25:16 -05:00
Gabriele
1be7ca4f70 Fxing nxos_ip_interface (#5013) 2016-12-08 11:25:16 -05:00
Gabriele
6708874f1c Fixing nxos_mtu (#5014) 2016-12-08 11:25:16 -05:00
Gabriele
6934f11e1f Fixing nxos_ntp (#5015) 2016-12-08 11:25:16 -05:00
Gabriele
6201a57d83 Fixing nxos_ntp_auth (#5016) 2016-12-08 11:25:16 -05:00
Gabriele
c50324fb08 Fixing nxos_ntp_options (#5017) 2016-12-08 11:25:16 -05:00
Gabriele
4b6ee73f8c Fixing nxos_pim_interface (#5018) 2016-12-08 11:25:16 -05:00
Gabriele
5b96fb1dac Fixing nxos_portchannel (#5019) 2016-12-08 11:25:16 -05:00
Gabriele
ebb39a0151 Fixing nxos_smu (#5021) 2016-12-08 11:25:16 -05:00
Gabriele
cda65cad18 Fixing nxos_snmp_community (#5022) 2016-12-08 11:25:16 -05:00
Gabriele
f74275fc1d Fixing nxos_snmp_contact (#5023) 2016-12-08 11:25:16 -05:00
Gabriele
73d66e28ab Fixing nxos_snmp_host (#5024) 2016-12-08 11:25:16 -05:00
Gabriele
7c7eee94b2 Fixing nxos_snmp_location (#5025) 2016-12-08 11:25:16 -05:00
Gabriele
19769903e6 Fixing nxos_snmp_traps (#5026) 2016-12-08 11:25:16 -05:00
Gabriele
bf59e458b1 Fixing nxos_snmp_user (#5027) 2016-12-08 11:25:16 -05:00
Gabriele
04e62346d1 Fixing nxos_udld_interface (#5030) 2016-12-08 11:25:16 -05:00
Gabriele
6bedeb28d8 Fixing nxos_switchport (#5028) 2016-12-08 11:25:16 -05:00
Gabriele
773f1703b7 Fixing nxos_udld (#5029) 2016-12-08 11:25:15 -05:00
Gabriele
d61950d48c Fixing nxos_vpc_interface (#5032) 2016-12-08 11:25:15 -05:00
Gabriele
51c37e9f58 Fixing nxos_vrf (#5033) 2016-12-08 11:25:15 -05:00
Gabriele
8f331e01ca Fixing nxos_vpc (#5031) 2016-12-08 11:25:15 -05:00
Gabriele
9ff6070eb8 Fixing nxos_vrf_interface (#5034) 2016-12-08 11:25:15 -05:00
Gabriele
e7286ed43c Fixing nxos_vtp_domain (#5036) 2016-12-08 11:25:15 -05:00
Gabriele
c19e3b5924 Fixing nxos_vrrp (#5035) 2016-12-08 11:25:15 -05:00
Gabriele
f89cb1717c Fixing nxos_vtp_password (#5037) 2016-12-08 11:25:15 -05:00
Gabriele
b897b497c1 Fixing nxos_vtp_version (#5038) 2016-12-08 11:25:15 -05:00
Matt Davis
66a1b15f89 remove broken ansible_user_uid fact from Windows setup 2016-12-08 11:25:15 -05:00
Ryan Brown
135b92bf4e Check status of finished spot instance requests (#4990)
Per #3877, the code to wait for spot instance requests to finish would
hang for the full wait time if any spot request failed for any reason.
This commit introduces status checks for spot requests, so if the
request fails, finishes, or is cancelled the task will fail/succeed
accordingly.

One edge case introduced here is tha if a user terminates the instance
associated with the request manually it won't fail the play, under the
presumption that the user *wants* the instance terminated.
2016-12-08 11:25:15 -05:00
Brian Coca
22d29be478 1st draft of include docs 2016-12-08 11:25:15 -05:00
Toshio Kuratomi
132fcc434b Set some hosts privileged so they can perform mount tests (#5087) 2016-12-08 11:25:15 -05:00
Jiri Tyr
2b145a0052 Fixing bind mount pattern in the mount module (#5084) 2016-12-08 11:25:15 -05:00
Peter Sprygada
58a5ec6c51 fixes junos_command module paring of wait_for strings (#5083)
The junos_command module wasn't properly parsing strings to apply
conditionals due to the return value not being converted to json
before the results where handed to the runner.
2016-12-08 11:25:15 -05:00
Peter Sprygada
9ed01d0cfd fixes junos_template ignoring the action directive (#5080)
This updates the junos_template to properly process the action
directive when loading the configuration.
2016-12-08 11:25:15 -05:00
Toshio Kuratomi
9436d013d4 Fix mount default options -- should be defaults, not default 2016-12-08 11:25:14 -05:00
John R Barker
177dcadbc0 deprecated _template network modules: Rename in modules-core (#5072) 2016-12-08 11:25:14 -05:00
Jiri Tyr
be1036f461 Ultimate fix of the mount module for Linux (#5055) 2016-12-08 11:25:14 -05:00
John R Barker
f7b10720ac typo in module name (#5062) 2016-12-08 11:25:14 -05:00
Kevin Carter
e2e7f20e34 apt: fix cache time handling (#1517)
This change is in response to issue #1497 where the apt module would not properly updating the apt cache in some situations and never returned a state change on cache update when the module was used without or without an item to be installed or upgraded.

The change simply allows the apt module to update the cache when update_cache option is used without or without a set cache_valid_time.
If cache_valid_time is set and the on disk mtime for apt cache is ">" the provided amount of seconds, which now has a default of 0, the apt cache will be updated. Additionally if no upgrade, package, or deb is installed or changed but the apt cache is updated the module will return a changed state which will help users to know that the state of the environment has changed due to a task operation, even if it was only an apt cache update.

fixes #1497

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-12-08 11:25:14 -05:00
Peter Sprygada
0a85e64b4a fixes exception raised due to KeyError (#5068)
The vyos_config module would error when looking for a key called `updates`
in module.params.  There is no such key.  This fixes the problem.
2016-12-08 11:25:14 -05:00
Peter Sprygada
73cf85d677 catches exception if conditional cannot be parsed (#5067)
If the conditional cannot be parsed, the module will now catch the exception
and return a well formed failed message.

fixes #5060
2016-12-08 11:25:14 -05:00
Peter Sprygada
da4c11241f fixes error when 'delete ...' config command is specified but doesn't exist (#5064)
The junos_config module will generate an exception if a 'delete ...' config
command is attempted to be loaded into a device configuration.  This change
will first check to see if the delete command is valid and filter it out
of the change set if it is not valid.

fixes #5040
2016-12-08 11:25:14 -05:00
Nathaniel Case
aa82f48dc8 Network module code cleanup (#5061)
* Fix imports in junos_template

* Python 3 compatibility in eos_command

* Python 3 compatibility for ios_command

* Clean up issues with ios_facts

* Python 3 compatibility for ios_facts

* Import shuffle in ios_template

* Python 3 compatibility for iosxr_command

* Clean up iosxr_facts.py

* Python 3 compatibility for iosxr_facts

* Python 3 compatibility for junos_command

* Python 3 compatibility for ops_command

* Cleanup issues with ops_facts

* Python 3 compatibility for ops_facts

* Cleanup issues with ops_template

* Python 3 compatibility for vyos_command

* Cleanup issues with vyos_facts

* Python 3 compatibility for vyos_facts
2016-12-08 11:25:14 -05:00
Nathaniel Case
6ae0342a0a Fix imports in junos_template (#5059) 2016-12-08 11:25:14 -05:00
David Shrewsbury
d0f7af4b09 Fix os_network's create_network() call for older shade versions (#5058)
A value for the project_id parameter to shade's create_network()
call was always being sent, even if no value for 'project' was
supplied. This was breaking folks with older versions of shade
(< 1.6).

Fixes PR https://github.com/ansible/ansible-modules-core/issues/3567
2016-12-08 11:25:14 -05:00
Matt Clay
25d829c8f2 Detect tar type (bsd, gnu) and only use gnu tar. (#4352)
* Detect tar type (bsd, gnu) and only use gnu tar.

* Revert return code checking for TgzArchive.
2016-12-08 11:25:14 -05:00
Nathaniel Case
9b286b1775 eos_facts cleanup (#5057)
* dict.iteritems does not exist in Python 3

Now just dict.items
six.iteritems handles the change

* Addresses point 1

Unsure if this is a good idea or not.

* Addresses point 2

This shouldn't have any particular change, just marks load_comments as abstract

* Remove unused import

Addresses point 3

* Clarify invalid subset error message

Addresses point 4
2016-12-08 11:25:14 -05:00
Chris Houseknecht
0e4b470ee2 Let docker-py handle decoding and JSON parsing of stream data. Fixes #4930. 2016-12-08 11:25:14 -05:00
Chris Houseknecht
9432adfaf7 Put requested devices in correct format to enable config comparison. Fixes #5000. 2016-12-08 11:25:14 -05:00
Peter Sprygada
0ef16b44ca fixes exception being raised when show configuration command issued (#5047)
The junos_command expects commands to be returned as xml by default but
`show configuration [options]` will return text not xml.  This fix
will set the output format for any command that starts with `show
configuration` to text

fixes #4628
2016-12-08 11:25:14 -05:00
Peter Sprygada
a5b32fa0d1 fixes return passing output from command through jxmlease in junos_command (#5044)
The return string from the commands was not being passed through the
jxmlease library and therefore being returned as a string instead of a
json data structure.  This also adds back the missing xml key in the
return that includes the raw xml string.

fixes #5001
2016-12-08 11:25:14 -05:00
Aditya Marella
c3f815a6f6 Docker module: add support for OomScoreAdj
* docker-py param name oom_score_adj
* translates to OomScoreAdj in the docker remote API
* setting version_added to "2.2"
2016-12-08 11:25:13 -05:00
shaung
bcbeed244b Fix #4504 Respect timeout option when starting/stopping/restarting containers. 2016-12-08 11:25:13 -05:00
Denis Tiago
c0c5b9a50a fix health instances count when we have more than one lb in asg 2016-12-08 11:25:13 -05:00
Jiri Tyr
5a9f5918d3 Fixing bind mount on Linux (#1942) (#4439)
* Fixing bind mount on Linux

* Fixing broken implementation
2016-12-08 11:25:13 -05:00
Andrew Gaffney
460b0e1ab6 Match existing INI file entry with leading whitespace (fixes #4997) (#4998) 2016-12-08 11:25:13 -05:00
Senthil Kumar Ganesan
4504f2d8c7 Update minimum required version and ssh rate limit (#4995) 2016-12-08 11:25:13 -05:00
Matt Clay
efaed0b68d Revert "Set PRIVILEGED=true for Linux integration tests. (#4993)"
This reverts commit fb779bf30c.
2016-12-08 11:25:13 -05:00
Matt Clay
2b33d55442 Set PRIVILEGED=true for Linux integration tests. (#4993)
This should allow test_mount tests to run on Shippable.
2016-12-08 11:25:13 -05:00
Matt Clay
1854337eb1 Fix handling of ansible-doc errors. (#4992) 2016-12-08 11:25:13 -05:00
Toshio Kuratomi
08874e4bf6 Fix #3153 again (#4989) 2016-12-08 11:25:13 -05:00
Peter Sprygada
654a38897f fixes exception raised when nxos_facts uses nxapi transport (#4988)
This fixes a condition where an exception is raised when collecting `interface`
facts and the transport is set to nxapi in the nxos_nxapi module.

fixes ansible/ansible#17691
2016-12-08 11:25:13 -05:00
Toshio Kuratomi
27759ee58f Working subset of mount fixes (#4987)
* Fixing bind mount on Linux

* The latest update from jtyr doesn't pass integration tests.

Manually select the changes that are necessary to fix the bug with
unmounting
2016-12-08 11:25:13 -05:00
Peter Sprygada
df6b7703bb fixes default value in docstring for http (#4985)
The docstring incorrectly stated the default value for http is yes when
indeed its no.  This fixes the docstring
2016-12-08 11:25:13 -05:00
Peter Sprygada
88b2c7e1f6 fixes bug where setting state=absent in nxos_nxapi is not idempotent (#4984)
When setting state=absent the nxos_nxapi module would always try to remove
the configuration regardless of the current state of the device.  This will
fix that problem.

This also updates the docstring to correctly reflect https as default=no

fixes #4955
depends on ansible/ansible#17728
2016-12-08 11:25:13 -05:00
John R Barker
f63e5d078e Force is not a 2.2 feature
9b5e6bbfa1 incorrectly chopped some text around
2016-12-08 11:25:13 -05:00
Matt Clay
da8538698b Add shellcheck to sanity checks. (#4976)
Also disable deprecation warnings during module validation.
2016-12-08 11:25:13 -05:00
Trond Hindenes
0da88d4744 win_feature_docs_update (#4421) 2016-12-08 11:25:12 -05:00
Timothy Appnel
6647e8c271 Fixes grammatical error in assert module example (#4972) 2016-12-08 11:25:12 -05:00
Ryan S. Brown
93737f819a Accept JSON type as the content of policy_json parameter on iam_policy module 2016-12-08 11:25:12 -05:00
Søren Kröger
61144f4da9 Added single_transaction and quick to db_dump (#3687)
It was missing before, ...
2016-12-08 11:25:12 -05:00
JesseEmond
6ddbc63b1d Unarchive stop passing file mode to tar command (#4179)
Fixes #4063.

Tar does not use this parameter on extraction (-x) or diff (-d)(the
only two cases where it is passed in unarchive). It only uses it on
creation:
https://www.gnu.org/software/tar/manual/html_section/tar_33.html

Providing `unarchive` with a file mode of `0755` (octal) makes it pass
the argument `--mode 493` (493 = 0755 in decimal) to `tar`, which then
fails while verifying it (because it contains an invalid octal char
'9'). Not passing the parameter to tar solves the issue.
2016-12-08 11:25:12 -05:00
Marius Gedminas
9509224768 postgresql_db: fix inverted 'changed' logic when state=absent (#4934)
Fixes #4933.
2016-12-08 11:25:12 -05:00
David Shrewsbury
56211bd7ed Correct reuse_fips param to reuse_ips (#4939)
This new parameter was incorrectly named. Fixing to match the expected
name in the shade library.
2016-12-08 11:25:12 -05:00
Toshio Kuratomi
77975c232b Fix pip freeze workaround with virtualenv (#4951) 2016-12-08 11:25:12 -05:00
Matt Clay
d1ef5f947e Remove script previously used by Travis. 2016-12-08 11:25:12 -05:00
Toshio Kuratomi
a8fbdcd80d pip list isn't available on pip less than 1.3 so make a fallback (#4947) 2016-12-08 11:25:12 -05:00
Timothy Appnel
b18c22f69b Adds docs for msg param in assert modules plus some other clean up (#4926) 2016-12-08 11:25:12 -05:00
Peter Sprygada
b06123e986 fixes junos_config to be idempotent when confirming a commit (#4946)
The junos_config module would always return true when confirming a commit
This changes the module to now check first making the feature idempontent
2016-12-08 11:25:12 -05:00
René Moser
cb9ec9f802 iam_cert: remove choice list for dup_ok type bool (#4940)
See 8879931f0c
2016-12-08 11:25:12 -05:00
Toshio Kuratomi
e2963c0e25 Fix parsing of pip output 2016-12-08 11:25:12 -05:00
Toopy
74be5a40f9 Fix git get_diff TypeError when fetch (#4881) 2016-12-08 11:25:12 -05:00
Lars Engels
8010b7f980 Add support for password aging on Solaris (#4372)
* Add support for password aging on Solaris

* Fix shadow file editing when {MIN,MAX,WARN}WEEKS is not set in /etc/default/passwd

* Un-break with python3

* _Really_ un-break with python3
2016-12-08 11:25:12 -05:00
Chris Houseknecht
f33828e753 Cast scale value to int. Fixes #4592. 2016-12-08 11:25:11 -05:00
Rob Cutmore
15b41d2718 Pip: use 'pip list' when available for package list (#4644)
* Pip: handle parsing different pip commands

* Pip: use 'pip list' when available

* Pip: explicitly check which command is used

* Pip: add error checking when fetching packages
2016-12-08 11:25:11 -05:00
Chris Houseknecht
b01af0d747 Make project start and stop error handling more resilient, and improve message text. 2016-12-08 11:25:11 -05:00
indispeq
ecb05b03d4 Fix openstack security group rule vrrp choice apostrophe error (#4750)
Fixes #4444 that was erroneously closed and thought fixed
2016-12-08 11:25:11 -05:00
Peter Sprygada
868c298968 fixes import statements in junos_package module (#4929)
This fixes the import statement to import NetworkModule from network instead
of from junos
2016-12-08 11:25:11 -05:00
Peter Sprygada
3e577f6312 fix up junos_facts import statements (#4928)
This fixes the junos_facts import statements and removes importing
NetworkModule from the junos shared module.
2016-12-08 11:25:11 -05:00
Peter Sprygada
b9cb9d6345 fix import in junos_command module (#4927)
This fixes the import statements in the junos_command module to be
consistent with all junos_* modules
2016-12-08 11:25:11 -05:00
Peter Sprygada
82cf70e0f3 roll up of bug fixes for junos_config module (#4925)
* fixed docstring referencing old arguments
* changed out lxml for xml library to avoid import errors
* fixed issue when trying to confirm a commit will end up a NOOP
* fixed issue for passing replace argument to load_config method
2016-12-08 11:25:11 -05:00
Peter Sprygada
0acab8bd19 bug fixes in junos_netconf module (#4924)
* fixes exception thrown when sending commands to device
* fixes exception thrown when retrieving current resource instance
* fixes issue where netconf would be configured in some instances when state
  was set to absent
* now returns the command string sent to the remote device
* fixes argument name to be netconf_port with alias to listens_on
2016-12-08 11:25:11 -05:00
Josh Lothian
319b2b28cb Fix YAML syntax in NXOS documentation (#4922)
* Fix YAML syntax in NXOS documentation

Use ':' and not '=' to ensure valid YAML
in the EXAMPLES

* Correcting introduced syntax error
2016-12-08 11:25:11 -05:00
Will Thames
10af591da2 Check whether yum file or URL install is an upgrade (#4547)
Rather than just checking whether a package with the right
name is installed, use `local_nvra` to check whether the
version/release/arch differs too.

Remove `local_name` as it is a shortcut too far.

Fixes #3807
Fixes #4529
2016-12-08 11:25:11 -05:00
Matt Clay
b2460746d8 Test module docs on Shippable. (#4921) 2016-12-08 11:25:11 -05:00
Matt Clay
6cdcf09984 Remove duplicate keys from module docs. (#4920) 2016-12-08 11:25:11 -05:00
GGabriele
c47fd4b3e9 Add feature mappings 2016-12-08 11:25:11 -05:00
Peter Sprygada
25375f1057 adds exception handling to nxos_command for FailedConditionalError
This adds exception handling as per ansible/ansible#17638 to the
nxos_command module.
2016-12-08 11:25:11 -05:00
Peter Sprygada
a8ca526450 bug fix that now catches FailedConditionalError when specifying conditionals
This is related to ansible/ansible#17638 and updates the eos_command module
to catch the exception and return a santatized error.
2016-12-08 11:25:11 -05:00
Michael Scherer
90378e9168 Fix duplicate required key error
ansible-doc -vvvv -l show this warning:

   [WARNING]: While constructing a mapping from /home/misc/checkout/git/ansible/lib/ansible/modules/core/network/junos/junos_config.py,
   line 88, column 5, found a duplicate dict key (required). Using last defined value only.
2016-12-08 11:25:10 -05:00
Peter Sprygada
0c94d84910 eos_eapi module allows independent configuration of protocol and port
The eos_eapi module would not configure the port if the protocol wasn't
configured as reported in #4905.  This changes the behavior to now allow
the port to be configured independently

fixes #4905
2016-12-08 11:25:10 -05:00
GGabriele
6701f038ba Fixed docstring 2016-12-08 11:25:10 -05:00
GGabriele
0eb63cdeaa Fixing nxos_portchannel 2016-12-08 11:25:10 -05:00
Harnek Sidhu
422edfcbd4 Created digital_ocean_block_storage module (#4469) 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
1ee897e988 Addressed review comments, given as part of other reviews (#4904) 2016-12-08 11:25:10 -05:00
nichivo
c4f43eb965 Insert missing option line before blank lines (#4747) 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
a7242039ad Updated the config module to use the new Parse method for OS6 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
8adc05051c Added support for template module for Dell OS6 devices 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
1a8e0487ff fixing the CI issue, the python interperter line 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
4fd0ad09b3 Updated the copyright 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
89cd8c03c0 Added support for dellos6_facts module 2016-12-08 11:25:10 -05:00
Senthil Kumar Ganesan
1c4efc8b2c dnos* -> dellos* (Rename module & updated copyright) (#4888)
* Renamed the Modules from dnos* -> dellos*, updated copyright, corrected doc issues

* Removed the unwanted module import
2016-12-08 11:25:10 -05:00
Matt Clay
f6386a113b Update CI badge. 2016-12-08 11:25:10 -05:00
Matt Clay
62073612d4 Cosmetic fix to test PR and merge hooks. (#4893) 2016-12-08 11:25:10 -05:00
Matt Clay
f1be653737 Run same tests on Shippable as on Travis. (#4889)
Run the same tests as used on Travis.
2016-12-08 11:25:10 -05:00
Peter Sprygada
989793483f fix up eos_eapi module
* fixes TypeError: load_config() got an unexpected keyword argument 'session'\n"
* removes qos argument

ref #4869
2016-12-08 11:25:09 -05:00
Matt Clay
d75c2ea475 Fix documentation fragment references. (#4890) 2016-12-08 11:25:09 -05:00
Brian Maddy
7ca911d345 typo in stat.executable (was stat.excutable) (#4886)
I didn't actually run this because it's so simple, but it seems correct.
2016-12-08 11:25:09 -05:00
Tom Melendez
ea76dedadf Support for GCE Managed Instance Groups. (#4541)
Create, Delete, Resize and Recreate (of instances) supported.  Autoscalers are also supported.
2016-12-08 11:25:09 -05:00
Ryan S. Brown
10e0ec84fb Fix version_added for ec2_asg feature 2016-12-08 11:25:09 -05:00
GGabriele
13e87e3a6c Adding nxos_igmp_snooping 2016-12-08 11:25:09 -05:00
GGabriele
15c07334c7 Adding nxos_aaa_server_host 2016-12-08 11:25:09 -05:00
GGabriele
4b6a59bd13 Adding nxos_udld_interface 2016-12-08 11:25:09 -05:00
GGabriele
f1a96986c4 Adding 2.1 and 2.2 support to nxos_switchport 2016-12-08 11:25:09 -05:00
GGabriele
e669d3e889 Adding nxos_snmp_user 2016-12-08 11:25:09 -05:00
GGabriele
693f8e623a Improving argument_spec 2016-12-08 11:25:09 -05:00
GGabriele
2f58306564 Adding nxos_pim_interface 2016-12-08 11:25:09 -05:00
GGabriele
48942d6e32 Fixing docstring 2016-12-08 11:25:09 -05:00
GGabriele
b42f6da0ce Adding nxos_mtu 2016-12-08 11:25:09 -05:00
GGabriele
d8b2b0387b Adding nxos_vtp_version 2016-12-08 11:25:09 -05:00
GGabriele
da8aa0dd29 Removing unused function 2016-12-08 11:25:09 -05:00
GGabriele
d53b52d528 Fixing module name 2016-12-08 11:25:08 -05:00
GGabriele
d435aca86e Adding missing version_added 2016-12-08 11:25:08 -05:00
GGabriele
bf2e0ec953 Adding nxos_vtp_domain 2016-12-08 11:25:08 -05:00
GGabriele
b1f33ca5a0 Improved function 2016-12-08 11:25:08 -05:00
GGabriele
d3de4c160f Adding nxos_vtp_password 2016-12-08 11:25:08 -05:00
GGabriele
29ea186bd7 Adding nxos_udld 2016-12-08 11:25:08 -05:00
GGabriele
c45e596159 Adding nxos_ntp_options 2016-12-08 11:25:08 -05:00
GGabriele
77b043dcf3 Fixing conditional format 2016-12-08 11:25:08 -05:00
GGabriele
52dfa697c2 Adding nxos_ntp_auth 2016-12-08 11:25:08 -05:00
GGabriele
6efb79bbeb Adding nxos_aaa_server 2016-12-08 11:25:08 -05:00
GGabriele
821b1606b3 Fixing nxos_interface 2016-12-08 11:25:08 -05:00
GGabriele
095d30ea63 Adding nxos_ntp 2016-12-08 11:25:08 -05:00
GGabriele
5f0060ec41 Fixing argument_spec 2016-12-08 11:25:08 -05:00
GGabriele
57f86c0efc Fixing docstring format 2016-12-08 11:25:08 -05:00
GGabriele
76d7379d73 Adding nxos_snmp_traps 2016-12-08 11:25:08 -05:00
GGabriele
988d6bbb2b Fixing return string 2016-12-08 11:25:08 -05:00
GGabriele
37170dd353 Adding nxos_snmp_location 2016-12-08 11:25:08 -05:00
GGabriele
2c8bc37003 Adding RETURN 2016-12-08 11:25:07 -05:00
GGabriele
de8b759df2 Adding nxos_install_os 2016-12-08 11:25:07 -05:00
GGabriele
c5ab15443f Adding nxos_gir_profile_management 2016-12-08 11:25:07 -05:00
GGabriele
c7ca3654df Adding nxos_gir 2016-12-08 11:25:07 -05:00
GGabriele
58501d3650 Removing indentations 2016-12-08 11:25:07 -05:00
GGabriele
852f5176a1 Removing indentation 2016-12-08 11:25:07 -05:00
GGabriele
4775c257ea Fixing file writing format 2016-12-08 11:25:07 -05:00
GGabriele
2016e5d44a Adding nxos_snapshot 2016-12-08 11:25:07 -05:00
GGabriele
1752082c00 Adding nxos_snmp_host 2016-12-08 11:25:07 -05:00
GGabriele
4a182888b8 Adding nxos_snmp_community 2016-12-08 11:25:07 -05:00
GGabriele
0c4c5467f7 Fixing docstring and more fix 2016-12-08 11:25:07 -05:00
GGabriele
346f83029b Fixing error handling 2016-12-08 11:25:07 -05:00
GGabriele
e1fab98061 Fixed module structure 2016-12-08 11:25:07 -05:00
GGabriele
4cbcc1f91d Adding nxos_vxlan_vtep_vni 2016-12-08 11:25:07 -05:00
Shawn Siefkas
cff256b057 Adding SNS notification support to ec2_asg module
Addresses #1844
2016-12-08 11:25:07 -05:00
Senthil Kumar Ganesan
a757321872 Added support for facts module for Dell Networking OS10 device. (#4879)
* Added support for dnos10_facts module

* Added the missing quotes

* Addressed @privateip comments
2016-12-08 11:25:07 -05:00
Ryan Brown
6dff21bd42 Stop sorting of termination_policies in ec2_asg (#4883)
The AWS API requires that any termination policy list that includes
`Default` must end with Default. The attribute sorting caused any list
of attributes to be lexically sorted, so a list like
`["OldestLaunchConfiguration", "Default"]` would be changed to
`["Default", "OldestLaunchConfiguration"]` because default is earlier
alphabetically. This caused calls to fail with BotoServerError per #4069

This commit also adds proper tracebacks to all botoservererror fail_json
calls.

Closes #4069
2016-12-08 11:25:06 -05:00
amitsi
6a1290230b pn_bgp (New Module) (#4738)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block

* fix type for pn_multiprotocol
2016-12-08 11:25:06 -05:00
amitsi
31b3fbf3ba pn_cluster (New Module) (#4727)
*  made changes to make it 2.4 compatible

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
92877a39b1 pn_ospfarea (New Module) (#4737)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
5ad8cebef9 pn_trunk (New Module) (#4728)
* Cluster Module

* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
700c220d6b pn_vlag (New Module) (#4731)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
cdbf08e10c pn_vlan (New Module) (#4732)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
127a99de30 pn_vrouter (New Module) (#4733)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
e1b07d47be pn_vrouterif (New Module) (#4734)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
23c171c21b pn_vrouterlbif (New Module) (#4735)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block
2016-12-08 11:25:06 -05:00
amitsi
f9082b2d8e pn_show (New Module) (#4739)
* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

* remove type for options block and fix typo
2016-12-08 11:25:06 -05:00
amitsi
d5d0949958 pn_ospf (New Module) (#4736)
* Add pn_ospf module

* remove type from the options block
2016-12-08 11:25:06 -05:00
Senthil Kumar Ganesan
4ecab1e094 Added support dnos9_facts module (#4873)
* Added support dnos9_facts module

* Addressed @gundalow review comments

* Removing the addtional command, which is already in the default
2016-12-08 11:25:06 -05:00
amitsi
8eaae151fc Empty Init Module as required (#4740)
Add network/netvisor/__init__.py
2016-12-08 11:25:06 -05:00
Tom Melendez
35acdec063 Document ability to disable external IP with 'none' setting. Closes #2562. (#4878) 2016-12-08 11:25:06 -05:00
Monty Taylor
7fe300bb29 Expose the reuse_fips flag on os_server (#4849)
* Expose the reuse_fips flag on os_server

* Remove useless line
2016-12-08 11:25:06 -05:00
mzizzi
eaef333215 cloudformation stack events itertools.imap bugfix (#4868) 2016-12-08 11:25:05 -05:00
Senthil Kumar Ganesan
91cc160b43 dnos9_config (New Module) (#4816)
* Added support for dnos9_config module

* Addressed @gundalow comments
2016-12-08 11:25:05 -05:00
Senthil Kumar Ganesan
616af3506c dnos9_template (New Module) (#4819)
* Added support for dnos9_template module

* Addressed @gundalow comments
2016-12-08 11:25:05 -05:00
Senthil Kumar Ganesan
8f14b50b11 dnos6_config (New Module) (#4824)
* Added support for dnos6_config module

* Corrected the documention failure

* Addressed @gundalow comments
2016-12-08 11:25:05 -05:00
Matt Davis
6daa34e1c5 add win_shell/win_command modules + docs (#4827) 2016-12-08 11:25:05 -05:00
Riccardo Murri
6733d1c72c hostname: Support "Scientific Linux CERN" (#4855)
CERN maintains its own fork of "Scientific Linux",
which identifies as "Scientific Linux CERN SLC".
This commit lets Ansible know that this is again
another variant of RHEL.
2016-12-08 11:25:05 -05:00
Matt Clay
49692e98eb Fix python 3 issues with apt* modules. (#4848)
- Use range instead of xrange.
- Use python3-apt package for python 3.
- Eliminate unsupported for/else/raise usage.
- Use list on dict.items when modifying dict.
- Update requirements documentation.

Also made non-intrustive style fixes (adding blank lines).
2016-12-08 11:25:05 -05:00
Brian Coca
21ed52bfe4 fixed incorrect example 2016-12-08 11:25:05 -05:00
John Barker
264bb374b9 RETURNS doesn't support markup, so remove it 2016-12-08 11:25:05 -05:00
Peter Sprygada
b1243feac8 rename arugment from default to defaults
This argument_spec incorrectly named an argument default and it should have
been defaults.  This corrects that issue
2016-12-08 11:25:05 -05:00
Peter Sprygada
4327e67a7e rename the argument default to defaults
The argument_spec incorrectly had the argument default and it should have
been defaults.  This corrects the problem.
2016-12-08 11:25:05 -05:00
John Barker
42d5d7b21b Docs improvements to _config 2016-12-08 11:25:05 -05:00
GGabriele
e375b4c61c Fixing nxos_feature 2016-12-08 11:25:05 -05:00
Christopher Kotfila
f916dae700 Unpack AWS reservations while waiting to terminate (#4012)
Previously calculation of the number of instances that have been
terminated assumed all instances were in the first reservation returned
by AWS.  If this is not the case the calculated number of instances
terminated never reaches the number of instances and the module always
times out. By unpacking the instances we get an accurate number and the
module correctly exits.
2016-12-08 11:25:05 -05:00
Ryan Brown
1a02005b8d Handle EC2 instances with multiple network interfaces (#4766)
Currently instances with multiple ENI's can't be started or stopped
because sourceDestCheck is a per-interface attribute, but we use the
boto global access to it (which only works when there's a single ENI).

This patch handles multiple ENI's and applies the sourcedestcheck across
all interfaces the same way.

Fixes #3234
2016-12-08 11:25:05 -05:00
Peter Sprygada
3a7301bb3b fixes error when calling load_config() with session keyword
The session keyword is no longer needed or supported in the load_config()
method for eos.  This fixes an issue in eos_template where the session
keyword was still being sent.
2016-12-08 11:25:05 -05:00
Toshio Kuratomi
ae310d5034 Fix syntax 2016-12-08 11:25:05 -05:00
Senthil Kumar Ganesan
fffd7ff44b Addressed review comments from @privateip 2016-12-08 11:25:04 -05:00
Robin Roth
2df69fb5d8 Speedup git module on clone and pull (#4562)
* remove redundant if submodules_updated

* speed up git by reducing remote commands

* run fetch only once
* run ls-remote less
  * don't run ls-remote if one would run fetch anyhow
* remove unnecessary remote_branch check in clone
  * kept if depth and version given

* fix fetch on old git versions
2016-12-08 11:25:04 -05:00
Brian Coca
627da622fe removed chdir / as it breaks tasks
fixes #17466
2016-12-08 11:25:04 -05:00
John Barker
c01328b597 Document backup options
To make future diffing easier, use consistent ordering
2016-12-08 11:25:04 -05:00
Senthil Kumar Ganesan
9d32e313b7 Added Command module to support Dell Networking OS6 2016-12-08 11:25:04 -05:00
Senthil Kumar Ganesan
253cbc10a6 Added Command module to support Dell Networking OS9 2016-12-08 11:25:04 -05:00
Brian Coca
6030bcdb47 switched to use built in function for validation 2016-12-08 11:25:04 -05:00
Monty Taylor
e27b7af1e6 Don't change to root dir in async_wrapper (#4779)
The daemonizing code here is taken from an ActiveState recipe, which
includes changing to / as a general best practice. While that is
normally true to allow for deleting the directory that the daemon
process started in, in this case it is not relevant as this is not
intended to be an actual long-running daemon.

Issue ansible/ansible#17466
2016-12-08 11:25:04 -05:00
Antonio Murdaca
b9962d2389 system/systemd: enable systemctl --user (#4208)
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-08 11:25:04 -05:00
glovenglaven
289e5f1884 Added Solaris support to core mount module (#4771)
* Added Solaris support to the mount module.

* Added checking so that if a non-standard fstab file is specified it will
still work in Solaris without breaking existing functionality.

* Added a check to avoid writing duplicate vfstab entries on Solaris

* Added "version_added" to new boot option
2016-12-08 11:25:04 -05:00
Dag Wieers
433dfd0c5b Don't add included files as arguments on the command line (#4626)
This means we will have to unarchive the complete archive if a single change is found.
Unfortunately we cannot fix this for `unzip`, the only hope is a pure-python reimplementation.

This fixes problems reported in the comments of #3810
2016-12-08 11:25:04 -05:00
Martin Matuška
3366a95765 Force download if checksums do not match (#4262) 2016-12-08 11:25:04 -05:00
Gregor Giesen
b87ef7772f cron: replacement for os.getlogin() (#4777)
os.getlogin() returns the user logged in on the controlling terminal. However
'crontab' only looks for the login name of the process' real user id which
pwd.getpwuid(os.getuid())[0] does provide.

While in most cases there is no difference, the former might fail under certain
circumstances (e.g. a lxc container connected by attachment without login),
throwing the error 'OSError: [Errno 25] Inappropriate ioctl for device'.
2016-12-08 11:25:04 -05:00
nitzmahone
915b59a6d5 Fix win_user issue with disabled accounts/expired passwords
Disabled and password-expired accounts cannot call ValidatePassword successfully

fixed #4369
2016-12-08 11:25:04 -05:00
Peter Sprygada
ad707c2724 roll up updates to nxos_config module
* remote 'updates' argument
* clean up functions
* update doc strings
* add required_if dependencies
2016-12-08 11:25:04 -05:00
Peter Sprygada
b6748443c7 roll up updates to junos_config module
* remove 'update' argument
* update doc strings
* reorder functions
2016-12-08 11:25:04 -05:00
Peter Sprygada
47bd484b70 roll up updates to ops_config module
* 'before' and 'after' now only apply to 'lines' argument
* add required_if dependencies
* update doc strings
* remove 'update' argument
* clean up functions
2016-12-08 11:25:04 -05:00
Peter Sprygada
18957c4039 roll up updates to sros_config module
* update doc strings
* update message if rollback isn't configured
2016-12-08 11:25:03 -05:00
Peter Sprygada
a9557bc12b roll up of updates to vyos_config module
* remove 'udpates' argument
* add required_if dependencies
* clean up functions
* update doc strings
2016-12-08 11:25:03 -05:00
Peter Sprygada
8444b1ed8f roll up of updates to iosxr_config module
* 'before' and 'after' arguments now only apply to 'lines'
* update doc strings
* remove update argument
* clean up warnings
2016-12-08 11:25:03 -05:00
Peter Sprygada
6a0b04d6a7 roll up of updates to ios_config module
* 'before' and 'after' are now only applied to 'lines'
* remove update argument
* update doc strings
* add path argument when performing config difference
2016-12-08 11:25:03 -05:00
Peter Sprygada
e5c26150fb roll up of updates to eos_config module
* removes update argument
* adds `config` option to replace argument
* moves session management into shared module
* cleans up doc strings
* `before` and `after` args now only apply to lines
2016-12-08 11:25:03 -05:00
Andrew Gaffney
bac0c4595c Fix missing colons in network module examples (#4778) 2016-12-08 11:25:03 -05:00
Peter Sprygada
d73fbaaf05 add new module sros_rollback
Provides a configuration resource for managing the rollback feature on
remote devices running Nokia SROS
2016-12-08 11:25:03 -05:00
Chris Houseknecht
e95f773d96 Set default log_driver to None to prevent config comparison when a log_driver is not specified. Fixes #4600. 2016-12-08 11:25:03 -05:00
Chris Houseknecht
05303a974d Purge networks using network name rather than ID. Fixes 4596. 2016-12-08 11:25:03 -05:00
Chris Houseknecht
890c2d04e2 Default restart_retries to None rather than 0. Fixes #4534. 2016-12-08 11:25:03 -05:00
Ryan Brown
6ae4e50e47 Fix failure when powering on/off EC2 instances by tag only. (#4767)
If you apply `wait=yes` and use `instance_tags` as your filter for
stopping/starting EC2 instances, this stack trace happens:

```
An exception occurred during task execution. The full traceback is:                                                                          │~
Traceback (most recent call last):                                                                                                           │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1540, in <module>                                                            │~
    main()                                                                                                                                   │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1514, in main                                                                │~
    (changed, instance_dict_array, new_instance_ids) = startstop_instances(module, ec2, instance_ids, state, instance_tags)                  │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1343, in startstop_instances                                                 │~
    if len(matched_instances) < len(instance_ids):                                                                                           │~
TypeError: object of type 'NoneType' has no len()                                                                                            │~
                                                                                                                                             │~
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "ec2"}, "module_stderr": "Traceb│~
ack (most recent call last):\n  File \"/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1540, in <module>\n    main()\n  File \"/tmp/│~
ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1514, in main\n    (changed, instance_dict_array, new_instance_ids) = startstop_instances│~
(module, ec2, instance_ids, state, instance_tags)\n  File \"/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1343, in startstop_insta│~
nces\n    if len(matched_instances) < len(instance_ids):\nTypeError: object of type 'NoneType' has no len()\n", "module_stdout": "", "msg": "│~
MODULE FAILURE", "parsed": false}
```

That's because the `instance_ids` variable is None if not supplied
in the task. That means the instances that result from the instance_tags
query aren't going to be included in the wait loop. To fix this, a list
needs to be kept of instances with matching tags and that list needs to
be added to `instance_ids` before the wait loop.
2016-12-08 11:25:03 -05:00
Dag Wieers
976d876e55 Ensure unicode characters in zip-compressed filenames work correctly (#4702)
* Ensure unicode characters in zip-compressed filenames work correctly

Another corner-case we are fixing hoping it doesn't break anything else.

This fixes:
- The correct encoding of unicode paths internally (so the filenames we scrape from the output and is returned by zipfile match)
- Disable LANG=C for the unzip command (because it breaks the unicode output, unlike on gtar)

* Fix for python3 and other suggestions from @abadger
2016-12-08 11:25:03 -05:00
Peter Sprygada
53bcf18eab minor updates to junos_package module for 2.2 (#4761)
* replaces get_module() with NetworkModule()
* removes old call to package_version()
2016-12-08 11:25:03 -05:00
Peter Sprygada
09b8e220ca update junos_facts module to remove get_module() factory function (#4760)
Replaces get_module() with NetworkModule instance
2016-12-08 11:25:03 -05:00
Peter Sprygada
290a4b5fac adds path kwarg when difference() is called from iosxr_config
Adds the path kwarg to handle use cases with exact and strict matching
2016-12-08 11:25:03 -05:00
Matt Clay
e8f70f25df Python 3 fixes for apt_* modules. (#4754) 2016-12-08 11:25:03 -05:00
Peter Sprygada
d339004437 minor bug fix to pass path to difference() in ios_config
The ios_config module needs to pass the path kwarg to difference when
specifying match=exact or strict.
2016-12-08 11:25:02 -05:00
afunix
f2c324facc Updated get_url module to process FTP results correctly [#3661] (#4601) 2016-12-08 11:25:02 -05:00
Peter Sprygada
6cca2b06fe fixes bug where nxos_config wasn't handling checkpoints correctly 2016-12-08 11:25:02 -05:00
Abhijit Menon-Sen
841ceb808d Fix spot instance creation by ignoring instance_initiated_shutdown_behavior (#4741)
Before this, all spot instance requests would fail because the code
_always_ called module.fail_json when the parameter was set (which it
always was, because the module parameter's default was set to 'stop').

As the comment said, this parameter doesn't make sense for spot
instances at all, so the error message was also misleading.
2016-12-08 11:25:02 -05:00
Florian Dambrine
2adc325ef6 Fix ec2 module source_dest_check when running on non VPC instances (EC2 Classic) (#3243) 2016-12-08 11:25:02 -05:00
Peter Sprygada
d6e16ded3f fix bug in ios_template when include_defaults is set to true
Module was ignoring  include_defaults argument.  This fixes the issue
such that the correct configuration is returned
2016-12-08 11:25:02 -05:00
Peter Sprygada
8a87d7ff11 adds path kwarg when performing config diff checks in ios_config 2016-12-08 11:25:02 -05:00
mlewe
afa9d30717 Fixes ansible/ansible#15922 (#3793) 2016-12-08 11:25:02 -05:00
Matt Ferrante
d88f5f6808 Properly support tag updates on CloudFormation stack-update actions (#3638) 2016-12-08 11:25:02 -05:00
@skg_net
eae69a154f dnos10_template module 2016-12-08 11:25:02 -05:00
David J Peacock
14fb0e4136 description expanded for 112, AKA VRRP protocol) (#4645)
* description expanded for 112, AKA VRRP protocol)

* corrected syntax for description for IP protocols
2016-12-08 11:25:02 -05:00
Brian Coca
a42cb96b75 added backup_file to module returns (#4723)
fixes #14502
also cleaned up some unused stuff and fixed imports
2016-12-08 11:25:02 -05:00
Peter Sprygada
bfdc5098cb minor bug fixes in eos_template
* fixes issue where configuration was not being loaded (#4704)
* fixes issue where defaults were not included when argument was set to True

tested on EOS 4.15.4F
2016-12-08 11:25:02 -05:00
Matt Davis
009ebf619b fix async_wrapper start suspended race (#4718)
Main thread in started-suspended process may not be immediately resumable on slow targets- poll for proper state for awhile before attempting resume
2016-12-08 11:25:02 -05:00
Matt Davis
6099e6d19e Windows async module support (#4710)
Powershell impls of async_wrapper, async_status- associated tests and async action changes are in https://github.com/ansible/ansible/pull/17400.
2016-12-08 11:25:02 -05:00
Brian Coca
909e62b25b updated include_role docs 2016-12-08 11:25:02 -05:00
Dag Wieers
5995097e61 Support DOS file attributes (e.g. archive-bit or hidden-bit) (#4705)
This fixes #4554
2016-12-08 11:25:02 -05:00
GGabriele
bc7b093089 Removed newline 2016-12-08 11:25:01 -05:00
GGabriele
dfa9904599 Added missing fullstop 2016-12-08 11:25:01 -05:00
Peter Sprygada
db49e1e436 fixes issue where the configobjs are not deserialized to a list
When the configuration is compared and the results deserialized, the
dumps() function returns a string.  This cohereces the return to a list
in case before and/or after needs to be applied

fixes 4707
2016-12-08 11:25:01 -05:00
GGabriele
87b839e1f8 Adding missing fullstop 2016-12-08 11:25:01 -05:00
GGabriele
d2d1b18ef4 Fixed param value format in docstring 2016-12-08 11:25:01 -05:00
GGabriele
745b504aa1 Fixed module structure and added one new param 2016-12-08 11:25:01 -05:00
GGabriele
a71b84853c Fixed config function 2016-12-08 11:25:01 -05:00
GGabriele
f577f46ccf fix imports 2016-12-08 11:25:01 -05:00
Peter Sprygada
8eab599ade removes state argument from ops_config module
this removes the state argument from ops_config.  The state argument should
not have been there
2016-12-08 11:25:01 -05:00
Peter Sprygada
c071273fbf removes argument from vyos_config module
The state argument should not be in vyos_config.  This commit removes the
state argument
2016-12-08 11:25:01 -05:00
Peter Sprygada
807974f515 updates nxos_config to remove state argument
The state argument should not be in the nxos_config module.  This change
removes the state argument for this release
2016-12-08 11:25:01 -05:00
Peter Sprygada
c38a90a2e9 removes state argument from ios_config
The state argument should not be in ios_config.  This change removes the
state argument
2016-12-08 11:25:01 -05:00
Peter Sprygada
51613d4307 roll up of minor fixes in eos_config module
* fixes save argument to be type bool
* now properly sets the changed returned flag based on diff
* updates docstring RETURNS to add backup_path
* removes unneeded state argument

tested on EOS 4.15.4F
2016-12-08 11:25:01 -05:00
GGabriele
7010a66638 Removed tabs 2016-12-08 11:25:01 -05:00
Peter Sprygada
7a234fc7cc update junos_netconf module
Updates the junos_netconf module with changes to load the
NetworkModule instead of the get_module factory method.  This
update is part of the 2.2 refactor of network modules
2016-12-08 11:25:01 -05:00
Peter Sprygada
f5e62a0611 update junos_template module
This updates the junos_template module implementing the changes for
Ansible 2.2
2016-12-08 11:25:01 -05:00
GGabriele
174ffde2e9 Adding nxos_igmp_interface 2016-12-08 11:25:00 -05:00
GGabriele
93d816a183 Adding nxos_igmp 2016-12-08 11:25:00 -05:00
Matt Clay
1f6e3326db Python 3 fixes for async_wrapper and async_status. (#4671) 2016-12-08 11:25:00 -05:00
GGabriele
693fc690d7 nxos_vrf_interface support for 2.1 and 2.2 2016-12-08 11:25:00 -05:00
Peter Sprygada
213c8e5a81 update junos_config module
* adds src argument to load configuration from disk
* adds src_format to set the source file format
* adds update argument with choices merge or replace
* deprecates the replace argument in favor of update=replace
2016-12-08 11:25:00 -05:00
GGabriele
0303c813c8 Updating nxos_vrf 2016-12-08 11:25:00 -05:00
GGabriele
7560c6dac2 nxos_vlan support 2.1 and 2.2 2016-12-08 11:25:00 -05:00
Matt Clay
cb30558a41 Make async_wrapper ignore '_' as an argsfile. (#4678)
This provides support for passing additional positional parameters to async_wrapper.
Additional parameters will be used by the upcoming async support for Windows.
2016-12-08 11:25:00 -05:00
GGabriele
7391b5ba63 nxos_ping support for 2.1 and 2.2 2016-12-08 11:25:00 -05:00
GGabriele
85e65a7873 nxos_ip_interface support for 2.1 and 2.2 2016-12-08 11:25:00 -05:00
GGabriele
631ee66ed9 Adding nxos_reboot 2016-12-08 11:25:00 -05:00
GGabriele
6d9a63a08b Fix PR 2016-12-08 11:25:00 -05:00
GGabriele
4c3a1e37ff Added python object for 2.1 and 2.2 support 2016-12-08 11:25:00 -05:00
GGabriele
4bcf5797b6 Increase timeout 2016-12-08 11:25:00 -05:00
GGabriele
3c0a1675c0 Adding nxos_rollback 2016-12-08 11:25:00 -05:00
GGabriele
25f9d122aa Adding nxos_vxlan_vtep 2016-12-08 11:25:00 -05:00
GGabriele
b3c428e61f Adding nxos_vrf_af 2016-12-08 11:25:00 -05:00
GGabriele
705b61ae7a Adding nxos_portchannel 2016-12-08 11:24:59 -05:00
GGabriele
933a555408 Adding nxos_vpc 2016-12-08 11:24:59 -05:00
GGabriele
eb32565b73 Adding nxos_static_route 2016-12-08 11:24:59 -05:00
GGabriele
4ee018e51d Fix error handling 2016-12-08 11:24:59 -05:00
GGabriele
1d393941c0 Adding nxos_smu 2016-12-08 11:24:59 -05:00
GGabriele
751f63c6a2 Adding nxos_pim_rp_address 2016-12-08 11:24:59 -05:00
GGabriele
1327e6bcd4 Adding nxos_pim module 2016-12-08 11:24:59 -05:00
GGabriele
9c254656aa Fixing module description 2016-12-08 11:24:59 -05:00
GGabriele
2b434515d5 Addin nxos_overlay_global 2016-12-08 11:24:59 -05:00
Scott Butler
bbf209b071 Added semicolon to invalid operators list redux. 2016-12-08 11:24:59 -05:00
Kenny Woodson
3cb42fc5dd Fix for validate rule. Ensure rule is a dict. (#4640) 2016-12-08 11:24:59 -05:00
Evan Kaufman
77f5472a53 Declare empty diff dict ahead of time (#4646)
Fixes #4634
2016-12-08 11:24:59 -05:00
Kenny Woodson
f1db594e9f Getting rid of a None type error when no resource tags are defined. (#4638) 2016-12-08 11:24:59 -05:00
Toshio Kuratomi
69ec272982 Python3 fixes to copy, file, and stat so that the connection integration tests can be run (#4632)
* Python3 fixes to copy, file, and stat so that the connection integration tests can be run

* Forgot to audit the helper functions as well.

* Fix dest to refledt b_dest (found by @mattclay)
2016-12-08 11:24:59 -05:00
GGabriele
cba6804824 Adding nxos_interface_ospf 2016-12-08 11:24:59 -05:00
GGabriele
0a8a84a50d Adding nxos_hsrp 2016-12-08 11:24:59 -05:00
GGabriele
c902f2da14 Fix typo 2016-12-08 11:24:58 -05:00
GGabriele
aabab30a4f Fix try/except 2016-12-08 11:24:58 -05:00
GGabriele
e392417232 Adding nxos_file_copy 2016-12-08 11:24:58 -05:00
GGabriele
40e600e901 Adding nxos_evpn_vni 2016-12-08 11:24:58 -05:00
GGabriele
52ed410679 Fixed DOCSTRING 2016-12-08 11:24:58 -05:00
GGabriele
0bedbb6bed Adding nxos_bgp_neighbor_af module 2016-12-08 11:24:58 -05:00
GGabriele
bd758e8188 Adding nxos_bgp_neighbor module 2016-12-08 11:24:58 -05:00
GGabriele
fdfec51cce Fixing DOCSTRING yaml format 2016-12-08 11:24:58 -05:00
GGabriele
b5dbfd70d4 Fixing DOCSTRING 2016-12-08 11:24:58 -05:00
GGabriele
e0f4565822 Adding nxos_bgp_af module 2016-12-08 11:24:58 -05:00
GGabriele
a6f09215ec Adding python object for 2.1 support 2016-12-08 11:24:58 -05:00
GGabriele
77c247ba3b Adding python objects for 2.1 support 2016-12-08 11:24:58 -05:00
GGabriele
d0acaf72e8 Removing delete for bollean, fixing argparse, embedding python object 2016-12-08 11:24:58 -05:00
Peter Sprygada
ac1c643cc8 bugfix that adds missing itertools import to ios_facts
fixes #4647
2016-12-08 11:24:58 -05:00
Peter Sprygada
702efda508 add new functionality to junos_command module
* commands argument now accepts a dict arguments
* rpcs argument now accepts a dict argument
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all
2016-12-08 11:24:58 -05:00
Michael Scherer
30cd0e8afe Add support for selinux_boolean_sub conversion (#4570)
SELinux since 2012 use a configuration file to
convert boolean names from a old name to a new name,
for preserving backward compatibility.

However, this has to be done explicitely when using the python
bindings, and the module was not doing it.

Openshift ansible script use this construct to detect if
a boolean exist or not:

    - name: Check for existence of virt_sandbox_use_nfs seboolean
      command: getsebool virt_sandbox_use_nfs
      register: virt_sandbox_use_nfs_output
      failed_when: false
      changed_when: false

    - name: Set seboolean to allow nfs storage plugin access from containers(sandbox)
      seboolean:
        name: virt_sandbox_use_nfs
        state: yes
        persistent: yes
      when: virt_sandbox_use_nfs_output.rc == 0

On a system where virt_sandbox_use_nfs do not exist, this work. But
on a system where virt_sandbox_use_nfs is a alias to virt_use_nfs (like
Fedora 24), this fail because the seboolean is not aware of the alias.
2016-12-08 11:24:58 -05:00
Toshio Kuratomi
45846127c5 to_text, to_bytes, and to_native now have surrogate_or_strict error handler (#4630)
On python3, we want to use the surrogateescape error handler if
available for filesystem paths and the like.  On python2, have to use
strict in these circumstances.  Use the new error strategy for to_text,
to_bytes, and to_native that allows this.
2016-12-08 11:24:57 -05:00
John R Barker
aa0b93a338 Consistent naming of Arista EOS device (#4616) 2016-12-08 11:24:57 -05:00
Matt Clay
928ef28fc8 Add python3 testing for module PRs. (#4629) 2016-12-08 11:24:57 -05:00
Senthil Kumar Ganesan
fed23d2f31 Cleaned up the module imports 2016-12-08 11:24:57 -05:00
Tobias Wolf
cda78382b6 Fix database table quoting in privileges_unpack() (#3858)
In Ansible 2.x this module gives `changed = True` for all privileges
that are specified including a table with

    priv: "database.table:GRANT"

Mysql returns escaped names in the format

    `database`.`tables`:GRANT

However in PR #1358, which was intended to support dotted database names
(a crazy idea to begin with), the quotes for the table name were left
out, leading to `curr_priv != new_priv`.

This means that the idempotency comparison between new_priv and
curr_priv is always 'changed'.

This PR re-introduces quoting to the table part of the priv.
2016-12-08 11:24:57 -05:00
Jean Prat
ed246a328f if user is empty, it is not converted to tuple when using host_all (#3038) 2016-12-08 11:24:57 -05:00
James Cammarata
aa67bb43fe Adding 'end_play' docs to meta module 2016-12-08 11:24:57 -05:00
GGabriele
5277f645e5 Fixing DOC string 2016-12-08 11:24:57 -05:00
GGabriele
0b887cd193 Fixing RETURN string 2016-12-08 11:24:57 -05:00
GGabriele
6590c4677d Adding nxos_ospf_vrf module 2016-12-08 11:24:57 -05:00
GGabriele
a678439059 Adding nxos_ospf module 2016-12-08 11:24:57 -05:00
GGabriele
c8016946f3 Adding nxos_evpn_global module 2016-12-08 11:24:57 -05:00
GGabriele
fb4da92308 Fixing typo 2016-12-08 11:24:57 -05:00
Toshio Kuratomi
5bd9cdad5a We've decided that pythn 3.5 is the minimum python3 version (#4572) 2016-12-08 11:24:57 -05:00
GGabriele
a539ea47bc Adding nxos_acl_interface_module 2016-12-08 11:24:57 -05:00
Michael Scherer
25fd3928b6 Make async work on python 3 (#4583)
Since dict no longer have a iteritems method, we have to
use six to support python 2 and 3.
2016-12-08 11:24:56 -05:00
Michael Scherer
f4158304ac Port mount.py to python3, need to use six.iteritems (#4581) 2016-12-08 11:24:56 -05:00
Michael Scherer
b48e65219b Fix uri to run on python3 (#4580)
Since dict no longer have a method iteritems, we have to use
the six wrapper.
2016-12-08 11:24:56 -05:00
Michael Scherer
f59af7d29e Port postgresql module to python3 (#4579)
Iteritems is no longer a dict method in Python3, replace it with
the six wrapper.
2016-12-08 11:24:56 -05:00
Michael Scherer
839d5b6de4 Fix mysql_user for python3 (#4576)
dict no longer have a iteritems method, it was replaced
by items. So we need to use six.

    Traceback (most recent call last):
      File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 587, in <module>
        main()
      File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 571, in main
        changed = user_add(cursor, user, host, host_all, password, encrypted, priv, module.check_mode)
      File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 239, in user_add
        for db_table, priv in new_priv.iteritems():
    AttributeError: 'dict' object has no attribute 'iteritems'
2016-12-08 11:24:56 -05:00
GGabriele
549ca5183d Adding RETURN string 2016-12-08 11:24:56 -05:00
Michael Scherer
f2b6c7b6a2 Fix user module under python3 (#4560)
Using something like:

    - name: Create ssh keys
      user:
        name: root
        generate_ssh_key: yes
      register: key

result into this traceback on F24

    Traceback (most recent call last):
      File \"/tmp/ansible_jm5d4vlh/ansible_module_user.py\", line 2170, in <module>
        main()
      File \"/tmp/ansible_jm5d4vlh/ansible_module_user.py\", line 2108, in main
        (rc, out, err) = user.modify_user()
      File \"/tmp/ansible_jm5d4vlh/ansible_module_user.py\", line 660, in modify_user
        return self.modify_user_usermod()
      File \"/tmp/ansible_jm5d4vlh/ansible_module_user.py\", line 417, in modify_user_usermod
        has_append = self._check_usermod_append()
      File \"/tmp/ansible_jm5d4vlh/ansible_module_user.py\", line 405, in _check_usermod_append
        lines = helpout.split('\\n')
    TypeError: a bytes-like object is required, not 'str'
2016-12-08 11:24:56 -05:00
Michael Scherer
898cf5b462 Fix traceback on python3 (#4556)
Traceback (most recent call last):
  File "/tmp/ansible_csqv781s/ansible_module_systemd.py", line 374, in <module>
    main()
  File "/tmp/ansible_csqv781s/ansible_module_systemd.py", line 263, in main
    for line in out.split('\\n'): # systemd can have multiline values delimited with {}
2016-12-08 11:24:56 -05:00
GGabriele
a4817cff30 Adding nxos_acl module 2016-12-08 11:24:56 -05:00
John R Barker
51aa4e803f Consistent naming of Arista EOS device 2016-12-08 11:24:56 -05:00
GGabriele
bc47cf362b Fixing string case 2016-12-08 11:24:56 -05:00
Senthil Kumar Ganesan
8c5b189f8b Incorporated Ansible community feedback 2016-12-08 11:24:56 -05:00
Peter Sprygada
019de090d4 update ops_facts with enhancements
* adds support for default facts subset
* adds support for config facts subset
* maintain legacy facts from ops_facts pre-2.2

Tested on Openswitch 0.4.0
2016-12-08 11:24:56 -05:00
Peter Sprygada
018cdf33a2 update ops_template module using refactored network shared modules
This updates the ops_template module to work with the network shared
modules introduced in Ansible 2.2

Tested with OpenSwitch 0.4.0
2016-12-08 11:24:56 -05:00
Peter Sprygada
54232c3b2d update ops_config module with new enhancements
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge or check
* add backup argument to backup current running config to control host
* add save argument to save current running config to startup config
* add state argument to control state of config file
* deprecated force argument, use match=none instead

Note: this module only supports transport=cli

Tested on OpenSwitch 0.4.0
2016-12-08 11:24:56 -05:00
Peter Sprygada
ef46627f1f added new functionality to ops_command
* commands argument now accepts a dict arguments
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowed when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

Tested on OpenSwitch 0.4.0
2016-12-08 11:24:56 -05:00
GGabriele
882f201aa0 Fixing DOC 2016-12-08 11:24:56 -05:00
GGabriele
2b2636510d Adding nxos_bgp.py 2016-12-08 11:24:55 -05:00
Senthil Kumar Ganesan
c66432bbae Moved the modules to Dell folder 2016-12-08 11:24:55 -05:00
Senthil Kumar Ganesan
90cb4710d7 Added Command and Config modules to support Dell Networking OS10 device 2016-12-08 11:24:55 -05:00
Peter Sprygada
0f4446166b update eos_eapi module with new enhancements
* add support for vrf configurations
* add support for configing the qos value for eapi
* add config argument to specify the device running-config

Tested on EOS 4.15.4F
2016-12-08 11:24:55 -05:00
Peter Sprygada
5e5698dc9e removes output keyword from command in ios_command
IOS devices only support a single command output which is structured
text.  This removes the ability to specify the command output format
when providing complex arguments to the commands
2016-12-08 11:24:55 -05:00
Peter Sprygada
7280b2642a update nxos_nxapi module with minor enhancements (#4573)
* added new config argument
* added states present and absent
* update to use network shared modules

Tested on NXOS 7.3(0)D1(1)
2016-12-08 11:24:55 -05:00
Timothy Appnel
5b00b40c22 Fixes get_url examples in docs and applies native YAML syntax. (#4474) 2016-12-08 11:24:55 -05:00
John R Barker
89529366bf digital_ocean_tag name is a required field
Spotted during final review of https://github.com/ansible/ansible-modules-core/pull/4218/files
Simple to change, so fixing post merge
2016-12-08 11:24:55 -05:00
Victor Volle
6a20e6649d Digitalocean tags (replaces #4209) (#4218)
* Fixes #4117: Add DigitalOcean Tag support

* Add GPLv3 license header and RETURN documentation

* ansible.module_utils.urls instead of "requests"
2016-12-08 11:24:55 -05:00
Arun prasath
7a7ac2ee83 Fixes bug #4546 - Made password optional (#4574) 2016-12-08 11:24:55 -05:00
David J Peacock
bcc738bd0d Fix #4412: os_security_group_rule support numbered protocols (#4444) 2016-12-08 11:24:55 -05:00
Ryan Brown
c85d854c84 Remove spurious changed state on iam_policy module (#4381)
Due to a mixup of the group/role/user and policy names, policies with
the same name as the group/role/user they are attached to would never be
updated after creation. To fix that, we needed two changes to the logic
of policy comparison:

- Compare the new policy name to *all* matching policies, not just the
  first in lexicographical order
- Compare the new policy name to the matching ones, not to the IAM
  object the policy is attached to
2016-12-08 11:24:55 -05:00
James S. Martin
4d75f9b4bc Shows messages for uncaught exceptions from called modules in async_wrapper output. (#4591) 2016-12-08 11:24:55 -05:00
Rick Mendes
503c2b6158 Fixes #3144 (#4305) 2016-12-08 11:24:55 -05:00
Vytis Banaitis
3149fdf158 Fix change status on django_manage collectstatic. (#4239)
Ignore blank lines in collectstatic output.
2016-12-08 11:24:55 -05:00
Guillaume Delpierre
90bf5434d0 gem: add support for --env-shebang (#4377)
* gem: add support for --env-shebang

* fix version added
2016-12-08 11:24:55 -05:00
Levi Morales
0c9d895438 Fixes #2322 fix for missing append check on Darwin systems (#4256) 2016-12-08 11:24:55 -05:00
Evan Kaufman
254df9bcca Implemented file content diff for replace module (#4479) 2016-12-08 11:24:54 -05:00
Matías Pizarro
c1dae481e8 Use named parameters in new_droplet method call (#4483)
This mirrors the original method signature and guards against any
change in order parameter
2016-12-08 11:24:54 -05:00
Anton Onufriev
f5f1062d72 Remove colors from git-branch output for correct local search (#4545)
We got an error while switching on existent local branch
because git module can not find branch in function get_branches
if we have color.branch=always in git config.
2016-12-08 11:24:54 -05:00
Michael Scherer
ee5a48b84d Port the module to run on python 3 (#4496)
One of the usual issue is that run_command return bytes,
so we have to adapt the string to either be bytes too,
or convert to string.

This result into that kind of traceback:

    Traceback (most recent call last):
      File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 1009, in <module>
        main()
      File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 873, in main
        git_version_used = git_version(git_path, module)
      File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 788, in git_version
        rematch = re.search('git version (.*)$', out)
      File \"/usr/lib64/python3.5/re.py\", line 173, in search
        return _compile(pattern, flags).search(string)
    TypeError: cannot use a string pattern on a bytes-like object

Another issue is filter being a object instead of a list.
2016-12-08 11:24:54 -05:00
James Pharaoh
06f5f2e26d fix error in documentation for stat checksum (#4582) 2016-12-08 11:24:54 -05:00
Ilja Bauer
729486809e Replaced use of bare variables with full variable syntax (#4149) 2016-12-08 11:24:54 -05:00
Gennady Trafimenkov
7ea7564bf4 Clarify what checksum algorithm is used by copy modules (#4198) 2016-12-08 11:24:54 -05:00
Ali Ok
1e411f9551 Fix minor syntax error in authorized_key module doc (#4491) 2016-12-08 11:24:54 -05:00
Robin Roth
ccddeb8cdc Clarify that refspec is needed to checkout a git hash (#4564)
fixes #1531
2016-12-08 11:24:54 -05:00
Michael Scherer
338a8c8632 Convert command output to native string (#4559)
Without it, the module always return changed on python3,
which is harmless but add noise and can have some side effects.
2016-12-08 11:24:54 -05:00
Peter Sprygada
66b0a1ef2d convert nxos_facts map from dict to frozenset
* key maps are now frozenset instead of dict objects
* FactsBase now includes utility functions for transforming json data structures

Tested on NXOS 7.3(0)D1(1)
2016-12-08 11:24:54 -05:00
chouseknecht
964b7ecffa Fix container labels expected vs actual comparison. 2016-12-08 11:24:54 -05:00
Brian Coca
e37f57fc90 added docs for vars_from/defaults_from 2016-12-08 11:24:54 -05:00
Brian Coca
79d970d5b8 updated include_role docs to latest info 2016-12-08 11:24:54 -05:00
Peter Sprygada
4fd4ff8d5c update eos_template for network shared module
This updates the eos_template module to work with the changes introduced
in the network shared module in Ansible 2.2

Tested on EOS 4.15.4F
2016-12-08 11:24:54 -05:00
Peter Sprygada
d0a98bc433 update nxos_template module with network shared module changes
This updates the nxos_template module to work with the network shared
modules introduced in Ansible 2.2

Tested on NXOS 7.3(0)D1(1)
2016-12-08 11:24:54 -05:00
Peter Sprygada
8f303981d4 update ios_template module using refactored network shared modules
This updates the ios_template module to work with the network shared
modules introduced in Ansible 2.2

Tested in IOS 15.6(1)T
2016-12-08 11:24:54 -05:00
Peter Sprygada
7eb550aa53 update iosxr_template to use network shared modules
This updates the iosxr_template module to make it work with the new
shared network modules introduced in Ansible 2.2

Tested on IOSXR 6.0.0
2016-12-08 11:24:53 -05:00
Peter Sprygada
0da190abbd add new iosxr_facts module for fact collection from XR devices
* adds support for std network facts
* adds support for default facts subset
* adds support for config facts subset
* adds support for interface facts subset
* adds support for hardware facts subset

Tested on IOS-XR 6.0.0
2016-12-08 11:24:53 -05:00
Jason Edelman
3b83e676e6 removed feature check for nxos_interface 2016-12-08 11:24:53 -05:00
Brian Coca
b7d2c62f2b 1st draft of include role docs 2016-12-08 11:24:53 -05:00
Peter Sprygada
751eab187f updates nxos_facts with more fact collections
* adds support for std network facts
* adds support for default facts subset
* adds support for config facts subset
* adds support for interface facts subset
* adds support for hardware facts subset
* maintains backwards capabilitity with 2.1 facts module

Tested on NXOS 7.3(0)D1(1)
2016-12-08 11:24:53 -05:00
Peter Sprygada
733ee349b0 add new eos_facts module for fact collect of EOS nodes
* adds support for std network facts
* adds support for default facts subset
* adds support for config facts subset
* adds support for interface facts subset
* adds support for hardware facts subset

Tested on EOS 4.15.4F
2016-12-08 11:24:53 -05:00
Peter Sprygada
d138b94c70 update iosxr_config with new arguments
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge, replace or check
* add backup argument to backup current running config to control host
* add comment argument to provide comment to commit
* deprecated force argument, use match=none instead
2016-12-08 11:24:53 -05:00
Toshio Kuratomi
c4988262b5 Fixes for lineinfile (#4553)
Lineinfile deals heavily with Unic text files.  Makes some sense to deal
with it all as byte strings.  So there is a lot of work done here to
show that we're dealing with byte strings throughout.
2016-12-08 11:24:53 -05:00
Peter Sprygada
28ab66cef2 update RETURNS doc string in ios_facts
updates the doc string for consistency and completeness
2016-12-08 11:24:53 -05:00
Patrick Marques
697a328124 ssh_public_keys on Azure virtual machine is a list (#4350)
The ssh_public_keys must be a list otherwise will give the error:
"argument ssh_public_keys is of type <type 'dict'> and we were unable to convert to list"
2016-12-08 11:24:53 -05:00
Peter Sprygada
5ebe26e782 initial add of network/sros modules
* adds support for sros_command module for sending arbitrary commands
* adds support for sros_config module for working with sros configurations
2016-12-08 11:24:53 -05:00
Dag Wieers
32e3cc7778 Fix multiple issues with unzip and gtar support (#4131)
* Improve the correct handling of gtar and unzip options

Add the option --show-transformed-names when extra_opts is being used
Ignore bogus warnings related to empty filenames
Properly quote _and_ escape filenames for unzip command
Rewrite gtar options and provide run_command with array, not string

This fixes #2480 and #4109.

* Make check-mode work for zip-files

Check-mode was disabled for zip-files since gtar did not support it.
This change enables check-mode support for zip-files, but does skip the task when used with gtar.
(Best of both worlds)

Also remove unused compress_mode variable.

This replaces PR #4401, the changes overlap somewhat so I merged them
2016-12-08 11:24:53 -05:00
Dag Wieers
02b906d70f Remove redundant code AFAICT (#3908) 2016-12-08 11:24:53 -05:00
Toshio Kuratomi
b7522c5a1c Fix hg for python3 (#4528)
* Remove import of unused ConfigParser (ConfigParser has been renamed in py3)
* When retrieving version, normalize to a native string
2016-12-08 11:24:53 -05:00
Peter Sprygada
bbcde06e75 added new functionality to vyos_command
* commands argument now accepts a dict arguments
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all
2016-12-08 11:24:53 -05:00
Peter Sprygada
003b6da05a add new functionality to iosxr_command module
* commands argument now accepts a dict arguments[1]
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

[1] The commands argument will now accept a dict argument that can
specifiy the output format of the command.  To specify a dict argument
use the form of { command: <str>, output: <str>, prompt: <str>,
response: <str> }.
2016-12-08 11:24:53 -05:00
Peter Sprygada
df972feb23 updates to vyos_config module arguments
* arguments for vyos_config for 2.2 are now complete
* adds loading config file from disk (src argument)
* removes unsupported rollback argument
* changes update_config to update with options merge or check
* changes backup_config to backup
* add state argument for state of configuration file
* adds backup argument to backup current configuration
* adds save argument to control if active config is saved to disk
* adds comment argument for setting commit comment
* adds match argument to control configuraiton match

Tested with VyOS 1.7
2016-12-08 11:24:52 -05:00
Gary Rybak
e2d55d86e4 Move call to filter_exit out of command execution block to prevent setting 'changed' on a command list that is completely filtered (empty). 2016-12-08 11:24:52 -05:00
Richard Adams
b0135fadea Add parameter to ec2 module to control instance shutdown behavior (stop|terminate) 2016-12-08 11:24:52 -05:00
Toshio Kuratomi
9b7e866964 Cleanups of command.py (#4526)
* Import module_utils at the top
* Fix python3 by marking literals combined with stdout/stderr as byte
  literals
* Mark parameters as type=path where appropriate
2016-12-08 11:24:52 -05:00
Karthik Suresh
4d7d3cdbb1 Removing duplicate name: parameter possible typo (#4525)
Removed name:parameter in documentation. Possible typo.
2016-12-08 11:24:52 -05:00
Matt Clay
f804bdad48 Enable CI on Shippable for OS X. (#4515) 2016-12-08 11:24:52 -05:00
chouseknecht
1b4a3dbc86 Fix doc strings. Use of > was breaking HTML generation on docs site module page. 2016-12-08 11:24:52 -05:00
Michael Scherer
1f8b2f3e6e Add support for setting fstab location on Linux too for mount (#3271)
Fix #3153
2016-12-08 11:24:52 -05:00
Michael Scherer
441205feed Add acl freebsd (#3656)
* FreeBSD do not support --omit-header and --absolute-names

* The option for following symlink wth getfacl is different on FreeBSD

* ZFS on Freebsd use nfsv4 acls, who use a slightly different syntax

* FreeBSD do not have a --test flag, so always return 'True'

* FreeBSD do not have the --omit-headers options, so we have to filter by ourself

* Mark Freebsd as working for the acl module
2016-12-08 11:24:52 -05:00
Peter Sprygada
c98a906cf0 add new functionality to eos_command module
* commands argument now accepts a dict arguments[1]
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

[1] The commands argument will now accept a dict argument that can
specifiy the output format of the command.  To specify a dict argument
use the form of { command: <str>, output: <str>, prompt: <str>,
response: <str> }.  Command and output are required arguments. Output
accepts valid values text and json.
2016-12-08 11:24:52 -05:00
Peter Sprygada
717af59c96 update eos_config with new arguments
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge, replace or check
* add backup argument to backup current running config to control host
* add defaults argument to control collection of config with or without defaults
* add save argument to save current running config to startup config
* add state argument to control state of config file
* deprecated force argument, use match=none instead
2016-12-08 11:24:52 -05:00
Peter Sprygada
12fc073f91 fix example in nxos_command module 2016-12-08 11:24:52 -05:00
codyrat
c4d5b13c8f re.match for numeric only for kwargs[key] = int(value) (#4495) 2016-12-08 11:24:52 -05:00
Peter Sprygada
619e3bba7e fixes issue with duplicated commands in CommandRunner
The CommandRunner will not allow duplicate commands to be added to the
command stack.  This fix will now catch the exception and continue if
a duplicate command is attempting to be added to the runner instance.
2016-12-08 11:24:52 -05:00
Peter Sprygada
e09cfec2e9 added new functionality to nxos_command
* commands argument now accepts a dict arguments[1]
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

[1] The commands argument will now accept a dict argument that can
specifiy the output format of the command.  To specify a dict argument
use the form of { command: <str>, output: <str>, prompt: <str>,
response: <str> }.  Command and output are required arguments. Output
accepts valid values text and json.
2016-12-08 11:24:51 -05:00
Peter Sprygada
543ec0f14e update nxos_config with new arguments
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge or check
* add backup argument to backup current running config to control host
* add defaults argument to control collection of config with or without defaults
* add save argument to save current running config to startup config
* add state argument to control state of config file
* deprecated force argument, use match=none instead
2016-12-08 11:24:51 -05:00
Peter Sprygada
525cd8b947 merge functions from ios into ios_config
* merge changes from ios shared module functions into ios_config.
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge or check
* add backup argument to backup current running config to control host
* add defaults argument to control collection of config with or withoutdefaults
* add save argument to save current running config to startup config
* add state argument to control state of config file
* deprecated force argument, use match=none instead
2016-12-08 11:24:51 -05:00
Peter Sprygada
aa79cdb7d9 added new functionality to ios_command
* commands argument now accepts a dict arguments[1]
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

[1] The commands argument will now accept a dict argument that can
specifiy the output format of the command.  To specify a dict argument
use the form of { command: <str>, output: <str>, prompt: <str>,
response: <str> }.  Command and output are required arguments. Output
accepts valid values text and json.
2016-12-08 11:24:51 -05:00
jctanner
c73f9d0492 git: add a umask parameter (#4473)
Sources #10504
Fixes #10279
2016-12-08 11:24:51 -05:00
nishiokay
fc79615e38 Add ipv6 paramater to digital_ocean module (#4447) 2016-12-08 11:24:51 -05:00
Toshio Kuratomi
07e79ac683 Refactor stat.py so that it would be more friendly for unittests. (#4462)
* Refactor stat.py so that it would be more friendly for unittests.

* PEP8ify since we're moving most of the lines in the file and there's no open PRs
2016-12-08 11:24:51 -05:00
Jason Edelman
4f09d6065f added a period 2016-12-08 11:24:51 -05:00
Jason Edelman
56d8146495 make aliases a list in the docstring 2016-12-08 11:24:51 -05:00
Jason Edelman
47164d70d3 remove commented out code, add alias, and doc 2016-12-08 11:24:51 -05:00
Jason Edelman
b8ff21fb07 updated version_added for new param 2016-12-08 11:24:51 -05:00
Jason Edelman
5d033241af fixed error handling 2016-12-08 11:24:51 -05:00
Jason Edelman
5640711166 fixed docs 2016-12-08 11:24:51 -05:00
Jason Edelman
995083c0d9 improve functionality for vlan trunks based on #4082 2016-12-08 11:24:51 -05:00
Linus Arver
8da17b750d docker_service: fix files/project_files typo
The original decision to rename from `project_files' to `files' was in
3a5dd00076.
2016-12-08 11:24:51 -05:00
chouseknecht
fb99277066 Exposing tcp and udp for same port fails. Fixes issue #4354. 2016-12-08 11:24:51 -05:00
Chris Short
8ffe5c3c54 find.py: Editing contains description to say regex (#4452)
find module contains argument appears to accept regex; correcting description accordingly
2016-12-08 11:24:51 -05:00
Alexey Sheplyakov
8d4fe2a767 apt_key: fix spurious failure to import a subkey (#4366)
Importing a (sign only) subkey with apt_key module always fails,
however the actual keyring gets created and contains the correct keys.
Apparently the all_keys function skips the subkeys, hence the problem.

Fixes #4365
2016-12-08 11:24:50 -05:00
PikachuEXE
fc87dd9650 Allow specifying human readable value for option memory_limit again (#4049) 2016-12-08 11:24:50 -05:00
jctanner
53a0a64bda git: set the file:// protocol if needed and refactor HEAD parser (#4434)
* make HEAD parsing more robust
* Fail the module for any splitter errors
* fix combining depth and version on filepath urls by prepending file://

Addresses #907
2016-12-08 11:24:50 -05:00
Timmo Verlaan
159918a8ef Determine branch name more reliable (#907)
* Made some changes to determine branch name more reliable (it may contain slashes now).

* Determination of branch name more reliable, as per comment on PR #907
2016-12-08 11:24:50 -05:00
jctanner
7e65315d92 git: Use a local copy of unfrackpath to avoid using ansible.lib (#4426)
Fixes #4425
2016-12-08 11:24:50 -05:00
jctanner
c60954605b git: If force=yes, apply --force to submodule updates to overwrite local changes (#4415)
Fixes #238
2016-12-08 11:24:50 -05:00
chouseknecht
76260d3aa8 Fix network alias and network link comparison. - Using set based comparison was not working consistently - With != operator worked locally but consistently failed on Travis - With 'not in' operator failed locally and on Travis 2016-12-08 11:24:50 -05:00
Brian Coca
1160c79671 added meta as 'documentation' 2016-12-08 11:24:50 -05:00
chouseknecht
433b5e187f If debug true, include actions and differences in output. 2016-12-08 11:24:50 -05:00
Chris Houseknecht
a8111adcd6 Some post merge clean up: (#4406)
- Removed required_if.
  - Fixed doc strings.
  - Removed debug output being appended to actions.
  - Put import of basics at bottom to be consistent with other docker modules
  - Added 'containers' alias to 'connected' param
  - Put facts in ansible_facts.ansible_docker_network
2016-12-08 11:24:50 -05:00
Brian Coca
94486c5c77 doc fix 2016-12-08 11:24:50 -05:00
Rob Cutmore
09b06a601c Git: Determine if remote URL is being changed (#4243)
* Git: Determine if remote URL is being changed

Ansible reported there were no changes when only the remote URL for a
repo was changed. This properly tracks and reports when the remote URL
for a repo changes.

Fixes #4006

* Fix handling of local repo paths

* Git: Use newer method for fetching remote URL

* Git: use ls-remote to fetch remote URL

Using ls-remote to fetch remote URL is supported in earlier versions
of Git compared to using remote command.

* Maintain previous behavior for older Git versions

Previously whether or not the remote URL changed was not factored
into command's changed status. Git versions prior to 1.7.5 lack the
functionality used for fetching a repo's remote URL so these versions
will update the remote URL without affecting the changed status.
2016-12-08 11:24:50 -05:00
Chris Houseknecht
af3884f558 Adding docker_network module. (#4404) 2016-12-08 11:24:50 -05:00
jctanner
6c439a4882 user: Cast all arguments to string before passing to run_command (#4398)
Fixes #4397
2016-12-08 11:24:50 -05:00
Matt Clay
0b01e53b16 Only run integration script if it exists. 2016-12-08 11:24:50 -05:00
Matt Clay
033850b14a Update call to generate-tests. 2016-12-08 11:24:50 -05:00
Lucas Costa Beyeler
6aeea1fe7e Fix #4202: Can't unarchive remote files (#4244)
When you try to remote unarchive files with the option copy=no the code always fail, as evidenced in issue #4202. That happens because the conditional to check "if remote_src=no or copy=yes" will always be true since the default value of them is remote_src=no and copy=yes.
My modification is only to change the condition from or to and, that way only if both the vars stay with the default value will be true, otherwise you can unarchive remote files.
2016-12-08 11:24:49 -05:00
Brian Coca
16ccde49ad remove X bit 2016-12-08 11:24:49 -05:00
jctanner
634b1024d6 git: save changed submodules in check and non-check mode (#4392) 2016-12-08 11:24:49 -05:00
Dag Wieers
4ee9cc4b3f Add diff mode support to git module (#3364)
* Add diffmode support to git module

This patch adds missing diffmode support to the git module.

* Remodel get_diff() and calls to it

As proposed by @abadger

* Ensure we fetch the required object before performing a diff

Also we handle the return code ourselves, so don't leave this up to run_command().
2016-12-08 11:24:49 -05:00
Indrajit Raychaudhuri
fb255b3607 Improve hostname module to support systemd in more generic way (#4382)
Now that there is general purpose `Fact` helper to detect if systemd
is active, we would be able to rely on that to apply SystemdStrategy.

Detecting presence of systemd at runtime would be more reliable than
distribution version based heuristics. (e.g., Debian, Ubuntu allows
user to change the default init system, Gentoo allows switching as
well, and so on).
2016-12-08 11:24:49 -05:00
Brian Coca
ab3a87cc1a improved logic when dealing with init scripts 2016-12-08 11:24:49 -05:00
Brian Coca
3c89a21e0c fixes corner case for systemd services
when both unit file and sysv init script exist
Thanks to @olfway for fix.

fixes #3764
2016-12-08 11:24:49 -05:00
Dag Wieers
fe273a4e09 Improve the documentation (#4385)
Improvements to make it more clear that pure compressed files (.gz, .bz2 and .xz) files are not supported.

This improves on #3241.
2016-12-08 11:24:49 -05:00
Sam Doran
4c6cfb9eec Improve regexp for matching file permissions (#4306)
A capital "S" appears when the the setuid or setgid bit are set but have no effect. Likewise, a capital "T" appears when the sticky bit is set but it has no effect.
2016-12-08 11:24:49 -05:00
Roman
7b547e3e0b get_url headers param values parsing (#4245) 2016-12-08 11:24:49 -05:00
Evan
7b66bdc1c4 pip: Fix uninitialized variable during check_mode (#4379)
During check_mode (`--check`), the variable change could be
used uninitialized, yielding this error:

`UnboundLocalError: local variable 'changed' referenced before assignment`

This changeset simply initializes it to False.
2016-12-08 11:24:49 -05:00
Evan Kaufman
3a44d60fbc Fixes #3791 cron always returning changed state for multiline jobs (#4285)
Strip only newlines and carriage returns. Instead of stripping ALL whitespace, which may have unintended side effects
2016-12-08 11:24:49 -05:00
BradLook
766413e79d Allow cron to target remote user (#4270) 2016-12-08 11:24:49 -05:00
René Moser
03022875c4 mysql_db: use new exception handling, fixes build (#4373) 2016-12-08 11:24:49 -05:00
Jan Malte Gerth
9549883e78 reuse already split output for filtering (#4310)
there is no need to call out.split('\n') multiple times (line 275 and 277)
2016-12-08 11:24:49 -05:00
Brian Coca
81e87cefd7 unsafe writes! (#4314)
* unsafe writes!

* moved unsafe_write docs and args to file common

* added unsafe_writes option handling
2016-12-08 11:24:49 -05:00
Saurabh Sharma
a5695c8b24 error handling for importing non-existent db. Fixes ##2068 (#3617)
* error handling for importing non-existent db

* creating db on import state and suitable message on deleting db

* handling all possible cases when db exists/not-exists
2016-12-08 11:24:49 -05:00
Toshio Kuratomi
c5052f9b01 Be explicit about specifying the ssh port if it was user specified (#4302)
Previously, if the port specified by the user or inventory was 22, then
the ssh client port would be used instead.

Fixes #3895
2016-12-08 11:24:48 -05:00
Zoltán Müllner
ac561772ea Revert "Reset all locale environment variables before running svn commands" (#4358)
* Revert "Reset all locale environment variables before running svn commands"

This reverts commit 99456fbc98.

* Reset locale environment variables before running svn commands
2016-12-08 11:24:48 -05:00
Michael Scherer
cd3c454917 Add a example with a non service unit (#4355)
Since the documentation focus mostly on service
units, a explicit example may help people realizing
it can be used for socket and timer too.
2016-12-08 11:24:48 -05:00
Alvaro Aleman
d9c28454ae Make ios_command example working 2016-12-08 11:24:48 -05:00
muxator
16db1d54d1 typo in the documentation of the "state" parameter (#4353) 2016-12-08 11:24:48 -05:00
John R Barker
1357e7e83a ios & iosxr Documentation improvements (#4321) 2016-12-08 11:24:48 -05:00
Chris Houseknecht
2514ec5056 Add buildargs parameter to support Dockerfile ARG directive. (#4349)
* Add buildargs parameter to support Dockerfile ARG directive.

* Fix doc_strings. Doc string for load_path was completely missing.
2016-12-08 11:24:48 -05:00
chouseknecht
f6b126d412 Default repository tag value to tag parameter value or 'latest'. 2016-12-08 11:24:48 -05:00
chouseknecht
3dab1785ba Always returns changed when state present and name includes :tag. 2016-12-08 11:24:48 -05:00
Chris Houseknecht
1cf9d3e68e Add *build* to state parameter choices. Updated deprecation message. Will be deprecated in release 2.3. Removed (#4342)
mention of *tagged* state in the force parameter doc strings. There is no *tagged* state.
2016-12-08 11:24:48 -05:00
John Barker
ecc7e445b5 vyos: Docs fixes 2016-12-08 11:24:48 -05:00
John Barker
d76a4e71c2 openswitch: Docs fixes 2016-12-08 11:24:48 -05:00
John Barker
3f8f67e359 NXOS Docs update 2016-12-08 11:24:48 -05:00
chouseknecht
2ea29fee3f Fix image tag operation. Allows repository in form of repo:tag. If no tag value, defaults to 'latest'. 2016-12-08 11:24:48 -05:00
John Barker
d4200b0389 junos: Docs update 2016-12-08 11:24:48 -05:00
Nathaniel Case
36ba105b91 Fix ios_config broken logic 2016-12-08 11:24:48 -05:00
John Barker
6ad7d6b3cd Cumulus - consistent docs formatting 2016-12-08 11:24:47 -05:00
Nathaniel Case
6857cea9e6 Quick fix to nxos_command and minify imports 2016-12-08 11:24:47 -05:00
chouseknecht
0c4da5d3a0 Added implementation of ignore_image, which prevents recreation of containers on image change. 2016-12-08 11:24:47 -05:00
chouseknecht
5992c21c9c Fix #3670 host IP defaults to 0.0.0.0 ignoriing bridge Host IP option. 2016-12-08 11:24:47 -05:00
chouseknecht
a6bfeea1c4 Improved documentation for returned actions. 2016-12-08 11:24:47 -05:00
chouseknecht
cd7b34547d When build true call docker-compose build, and add nocache option. 2016-12-08 11:24:47 -05:00
chouseknecht
df09b4f668 Set version_added 2016-12-08 11:24:47 -05:00
chouseknecht
1670d9b030 Add pull option to pull images prior to evaluating service state. 2016-12-08 11:24:47 -05:00
Kevin Kirsche
db03ebdfb9 Fix typo in "ssantaize" typo
ssantaize to santaize
2016-12-08 11:24:47 -05:00
John Barker
2b82389705 General EOS documentation improvements
Typos, formatting, choices.
2016-12-08 11:24:47 -05:00
Shawn Siefkas
e9bf046c26 Check mode fixes for ec2_vpc_net module (#2179)
* Check mode fixes for ec2_vpc_net module

Returns VPC object information

Detects state change for VPC, DHCP options, and tags in check mode

* Early exit on VPC creation in check mode
2016-12-08 11:24:47 -05:00
Shawn Siefkas
0b95051039 Fix #2526 (#2527)
Fail on unhandled exception in ec2_asg rather than raise
2016-12-08 11:24:47 -05:00
Shawn Siefkas
66f1f6d537 Check mode fix for ec2_group module (#2184)
The default VPC egress rules was being left in the egress rules for
purging in check mode.  This ensures that the module returns the correct
change state during check mode.
2016-12-08 11:24:47 -05:00
Michael Scherer
3c2110215c Do not hardcode default ssh key size for RSA (#4074)
By default, ssh-keygen will pick a suitable default for ssh keys
for all type of keys. By hardocing the number of bits to the
RSA default, we make life harder for people picking Elliptic
Curve keys, so this commit make ssh-keygen use its own default
unless specificed otherwise by the playbook
2016-12-08 11:24:47 -05:00
peter.jang
b06f3bbb22 fix for rsync protocol (#4211) 2016-12-08 11:24:47 -05:00
John R Barker
aa6a7d5789 State runnng v running
Fix typo
2016-12-08 11:24:46 -05:00
Matt Clay
c2270a37ff Enable FreeBSD tests on Shippable. (#4296) 2016-12-08 11:24:46 -05:00
Rick Mendes
be33879152 Fixes #4227: just changing messaging 2016-12-08 11:24:46 -05:00
Rick Mendes
eae75cf727 Fix #3549, failure to reference module in ec2_eip module 2016-12-08 11:24:46 -05:00
David Chwalisz
f979928ecc file module: add clarification on state=absent re files that do not exist. 2016-12-08 11:24:46 -05:00
Christian Schwarz
e526b2ad3d system/service.py: fix false-positive service enablement on FreeBSD. (#4283)
sysrc(8) does not exit with non-zero status when encountering a
permission error.

By using service(8) `service <name> enabled`, we now check the actual
semantics expressed through calling sysrc(8), i.e. we check if the
service enablement worked from the rc(8) system's perspective.

Note that in case service(8) detects the wrong value is still set,
we still output the sysrc(8) output in the fail_json() call:
the user can derive the exact reason of failure from sysrc(8) output.
2016-12-08 11:24:46 -05:00
Lyle Mantooth
f57ece661f Remove file extension from policy names (#3805)
Fixes #3804.

Prevents `__file__` from contributing ".", which is an illegal character in ELB policy names.
2016-12-08 11:24:46 -05:00
Julien Vey
7ba3ba2da9 Fix Typo in docker_image_facts module 2016-12-08 11:24:46 -05:00
Monty Taylor
f441e2c1a9 Rename a confusing variable
I had to read the two lines in question twice. That might just make me
dumb, but if I'm dumb, someone else might be too.
2016-12-08 11:24:46 -05:00
Rick Mendes
4fad93561a please remove me as maintainer 2016-12-08 11:24:46 -05:00
Rick Mendes
d6cc007380 Fixes #4227 2016-12-08 11:24:46 -05:00
Jasmine Hegman
f5c3f4dd6b Update docs to indicate ec2_asg state defaults to present (#4046)
* Update docs to indicate ec2_asg state defaults to present

Hopefully fixes Issue #4016

* Forgot to flip required to false
2016-12-08 11:24:46 -05:00
Matt Clay
df5869df4a Enable Windows tests on Shippable. (#4278) 2016-12-08 11:24:46 -05:00
Shaun Brady
7b8d625546 Make ec2_elb_lb respect VPCs when resolving groups
AWS security groups are unique by name only by VPC (Restated, the VPC
and group name form a unique key).

When attaching security groups to an ELB, the ec2_elb_lb module would
erroneously find security groups of the same name in other VPCs thus
causing an error stating as such.

To eliminate the error, we check that we are attaching subnets (implying
that we are in a VPC), grab the vpc_id of the 0th subnet, and filtering
the list of security groups on this VPC.  In other cases, no such filter
is applied (filters=None).
2016-12-08 11:24:46 -05:00
Shaun Brady
3b32b60338 Remove trailing white space 2016-12-08 11:24:46 -05:00
Shaun Brady
04199140c5 Make group_name resolution VPC aware
EC2 Security Group names are unique given a VPC.  When a group_name
value is specified in a rule, if the group_name does not exist in the
provided vpc_id it should create the group as per the documentation.

The groups dictionary uses group_names as keys, so it is possible to
find a group in another VPC with the name that is desired.  This causes
an error as the security group being acted on, and the security group
referenced in the rule are in two different VPCs.

To prevent this issue, we check to see if vpc_id is defined and if so
check that VPCs match, else we treat the group as new.
2016-12-08 11:24:46 -05:00
Rob Phoenix
6339398e7c various typo corrections to ios network modules 2016-12-08 11:24:46 -05:00
John Baublitz
fe09641476 Doc update 2016-12-08 11:24:45 -05:00
John Baublitz
c8dc0bf5c9 Fix exception handling to be compatible with Python 3 2016-12-08 11:24:45 -05:00
John Baublitz
4b11312737 Additional error handling for corner cases like deleting networks with active subnetworks 2016-12-08 11:24:45 -05:00
John Baublitz
e4697c3780 Documentation 2016-12-08 11:24:45 -05:00
John Baublitz
96599a5963 Logic to allow subnet creation 2016-12-08 11:24:45 -05:00
John Baublitz
5591e6bb0b Add error handling for specifying 'mode' with insufficiently recent libcloud 2016-12-08 11:24:45 -05:00
John Baublitz
9c9b22dc8f Changes to allow 'auto' mode which does not allow IP address specification 2016-12-08 11:24:45 -05:00
John Baublitz
839871d87b Support for newer networking modes in GCE 2016-12-08 11:24:45 -05:00
Brian Coca
7f1e6ca005 updated docs to reflect new feature 2016-12-08 11:24:45 -05:00
Ryan
8b582cceaa fix typo in azure_rm_storageaccount (#4236) 2016-12-08 11:24:45 -05:00
Brian Coca
d579dab0a0 deprecated accelerate 2016-12-08 11:24:45 -05:00
chrisweaver
531954e2f6 Enforce boolean type for dup_ok
Stop "choices" from being interpreted as strings.
2016-12-08 11:24:45 -05:00
Toshio Kuratomi
879afebf77 Remove git and synchronize modules from list of commands we want users to use the module for instead. (#4233) 2016-12-08 11:24:45 -05:00
Matthew Martin
4d952d6e6e Add CAPABILITY_NAMED_IAM to cloudformation capabilities
While from the documentation[1] one would assume that replacing
CAPABILITY_IAM with CAPABILITY_NAMED_IAM; this as empirically been shown
to not be the case.

1: "If you have IAM resources, you can specify either capability. If you
have IAM resources with custom names, you must specify
CAPABILITY_NAMED_IAM."
http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
2016-12-08 11:24:45 -05:00
Michael Baydoun
3818cc2b95 fixes issues where iam_policy incorrected reported changed 2016-12-08 11:24:45 -05:00
John Baublitz
906b457bf1 Collapse boilerplate code into change_instance_state function 2016-12-08 11:24:45 -05:00
John Baublitz
eb97165acc Add states for stopping and starting machines 2016-12-08 11:24:44 -05:00
Tom Melendez
067bb6ec01 Added helper function and logic to sort attributes before comparing. 2016-12-08 11:24:44 -05:00
Kai Kousa
4a8a052e2e Improve documentation on security_groups-option 2016-12-08 11:24:44 -05:00
Tom Melendez
8becd9a14d Allow GCE firewall rules to be updated when attributes changes. Fixes #2111.
Previously, when the attributes of a GCE firewall change, they were ignored.  This PR changes that behavior and now updates them.

Note that the "update" also removes attributes that are not specified.

An overview of the firewall rule behavior is as follows:

1. firewall name in GCP, state=absent in PLAYBOOK: Delete from GCP
2. firewall name in PLAYBOOK, not in GCP: Add to GCP.
3. firewall name in GCP, name not in PLAYBOOK: No change.
4. firewall names exist in both GCP and PLAYBOOK, attributes differ: Update GCP to match attributes from PLAYBOOK.
2016-12-08 11:24:44 -05:00
yfried-redhat
b1ee47f358 Make os_floating_ip module idempotent
Current module fails when tries to assign floating-ips to server that
already have them and either fails or reports "changed=True" when no
ip was added

Removing floating-ip doesn't require address

Server name/id is enough to remove a floating ip.
2016-12-08 11:24:44 -05:00
Andrei Lukovenko
436ff356e7 Bug: repeatable invocation with state=present leads to (#3052)
[localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"'Domain' object has no attribute 'id'"}

How to reproduce:

- name: create domain
  digital_ocean_domain: state=present name=DOMAIN_NAME ip=DROPLET_IP

- name: create domain
  digital_ocean_domain: state=present name=DOMAIN_NAME ip=DROPLET_IP

Problem: DigitalOcean API changed API
(https://developers.digitalocean.com/documentation/v2/#list-all-domain-records)
2016-12-08 11:24:44 -05:00
Brian Coca
544b044129 stop trying to set permissions in check mode
fixes #4195
2016-12-08 11:24:44 -05:00
Brian Coca
498dc61154 documenting behaviour as clear as possible 2016-12-08 11:24:44 -05:00
Toshio Kuratomi
0364831c22 Remove version-added on name field.
This parameter was actually added in 2.0.  It's just that the
documentation in previous versions of the module were wrong (it said the
name was  "network" rather than "name.)  I've renamed the parameter in
the documentation of prior versions so ansible-module-validate should no
longer think that this is a new parameter.
2016-12-08 11:24:44 -05:00
Peter Sprygada
42da47813b adds update_config argument to ios_config
New argument controls whether or not configuration is applied to the
remote device.
2016-12-08 11:24:44 -05:00
Peter Sprygada
4611e2b9ad initial add of new module vyos_config
New module for sending configuration commands to remote devices running
the VyOS operating system.
2016-12-08 11:24:44 -05:00
Peter Sprygada
cff91c4c3b initial add of new module vyos_facts
* adds collection of default facts
* adds collection of configuration facts
* adds collection of lldp neighbors
2016-12-08 11:24:44 -05:00
Ryan S. Brown
9336e0d070 Indent unarchive module documentation to fix parsing error. 2016-12-08 11:24:44 -05:00
tobixx
ed1d80b7d8 added read-/write-/executeable flags for invoking user (#4130) 2016-12-08 11:24:44 -05:00
James Cammarata
aa1e9e3d5f Add remote_src param for unarchive to deprecate copy param
From ansible/ansible#10218
2016-12-08 11:24:44 -05:00
Peter Sprygada
92ac734e13 initial commit of vyos_command module
This adds a new module, vyos_command for sending CLI commands to remote
devices running VyOS operating system.
2016-12-08 11:24:44 -05:00
Peter Sprygada
25294f40c8 bug fix in ios_config module for handling config contents
Config contents when passed via argument were returning a string but
the module expects an instance of NetworkConfig.  This fixes that
problem.
2016-12-08 11:24:44 -05:00
Jan Hutař
5eb4e0dd0d Add way to specify environment (#3453) 2016-12-08 11:24:43 -05:00
h-hirokawa
57921c0b4d Fix azure_rm_virtualmachine (#4174). 2016-12-08 11:24:43 -05:00
Chris Houseknecht
c91de38322 Entrypoint fails with 'command not found' error. 2016-12-08 11:24:43 -05:00
Chris Houseknecht
7ffa6a43c5 Add push parameter. Let API handle registry authentication check. 2016-12-08 11:24:43 -05:00
Chris Houseknecht
4002caf60e Fix module failing when no ports are exposed 2016-12-08 11:24:43 -05:00
jjshoe
d8b752b3cf Fixed a typo (#4168) 2016-12-08 11:24:43 -05:00
Richard Levenberg
4943d329a4 handle multiple winrm listeners (#4142)
* handle multiple winrm listeners

* use the sorterd array
2016-12-08 11:24:43 -05:00
Marcos Diez
f10413b919 better authorized_keys documentation (#3739) 2016-12-08 11:24:43 -05:00
Peter Sprygada
43ba7f3b3b removes unneeded check_args function from ios_command
The module would raise a KeyError trying to find the save_config key
which is not present in the argument_spec.  This was caused by the
check_args() function.  Since the ios shared argument spec isn't used
the check_args function is not needed and has been removed.
2016-12-08 11:24:43 -05:00
Chris Houseknecht
030dcccad4 Fix multi-interface port binding. 2016-12-08 11:24:43 -05:00
Chris Houseknecht
bd3e1c77fe Add cleanup parameter. (#4144) 2016-12-08 11:24:43 -05:00
Peter Sprygada
438b9328ea fixup ios_template module to use NetworkModule
This removes the get_module() factory function and directly creates
an instance of NetworkModule.  This commit includes some minor clean
up to transition to the ios shared module for 2.2
2016-12-08 11:24:43 -05:00
Chris Houseknecht
7515b2d563 Fix 'all' option for published_ports parameter. 2016-12-08 11:24:43 -05:00
David Shrewsbury
37edf33955 Fix bug in os_router.py when router is not actually updated. (#4107)
The shade update_router() call will return None if the router is
not actually updated. This will cause the module to fail if we
do not protect against that.
2016-12-08 11:24:43 -05:00
Brian Coca
72eaf0281a updated checkmode for update-rc.d
fixes #4146
2016-12-08 11:24:43 -05:00
Chris Houseknecht
dc496ffeb4 Fix purge_networks 2016-12-08 11:24:43 -05:00
Peter Sprygada
66268dd3ec fix up ios_command to use NetworkModule
* using check mode will now block all commands except show commands
* module will no longer allow config mode commands
* check args for unused values and issue warning
2016-12-08 11:24:43 -05:00
Qi Luo
b86a229b61 Fix getting actual_stdin_open 2016-12-08 11:24:42 -05:00
Peter Sprygada
5fe848fca2 refactor ios_config for network module
This refactors the ios_config module to use the network module added
in 2.2 to simplify common network functions

new features

* add src, dest arguments for working with config
* results now return flag if the config was saved or not
* adds append argument for updating the dest file (when dest is used)
2016-12-08 11:24:42 -05:00
Rene Moser
5e3249b244 os_server, doc: add version added for delete_fip
Also see #3509
2016-12-08 11:24:42 -05:00
David Shrewsbury
530fd1365a Allow os_server to delete FIP (#3509)
The os_server module could automatically generate a floating IP for
the user with auto_ip=true, but we didn't allow for this FIP to be
automatically deleted when deleting the instance, which is a bug.
Add a new option called delete_fip that enables this.
2016-12-08 11:24:42 -05:00
Andrei Lukovenko
85bd975238 Bug: invocation with state=absent always leads to (#3051)
[localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"'Domain' object has no attribute 'id'"}

How to reproduce:

- name: create domain
  digital_ocean_domain: state=present name=DOMAIN_NAME ip=DROPLET_IP

- name: destroy domain
  digital_ocean_domain: state=absent name=DOMAIN_NAME

Problem: DigitalOcean API accepts domain name, not record ID
(https://developers.digitalocean.com/documentation/v2/#delete-a-domain)
2016-12-08 11:24:42 -05:00
Adrian Moisey
28716f565c Add default port for aurora (#4102)
If a port isn't specified, it's looked up. The lookup breaks without
this.

Related: https://github.com/ansible/ansible-modules-core/pull/3414
2016-12-08 11:24:42 -05:00
Peter Sprygada
28a701128d update ios_facts module to use NetworkModule
minor update to ios_facts to remove get_module() in favor of NetworkModule
2016-12-08 11:24:42 -05:00
jctanner
d5b35eb8db add gather_timeout parameter (#4093) 2016-12-08 11:24:42 -05:00
James Cammarata
2aad8bd882 Removing erroneous import from async_status 2016-12-08 11:24:42 -05:00
James Cammarata
204e83aeed Ensure async wrapper and status return consistent fields 2016-12-08 11:24:42 -05:00
Matt Clay
72cd76e023 Enable IRC and Slack notifications on Shippable. 2016-12-08 11:24:42 -05:00
Matt Clay
a7bef31ab3 Run each integration test separately. 2016-12-08 11:24:42 -05:00
Matt Clay
1b69cff1a4 Initial support for module integration tests. 2016-12-08 11:24:42 -05:00
Dag Wieers
017eeaea29 Fix a problem where the newly provided mode is a string (#3769)
* Fix a problem where the newly provided mode is a string

This fixes #3597

* Implement python3-compatible get_exception() handling
2016-12-08 11:24:42 -05:00
Dag Wieers
855ca9b204 Revert PR #3575 since it causes problems related to exclude patterns (#3767)
* Revert PR #3575 since it causes problems related to exclude patterns

By using a different method for getting archive filelists, and extracting we introduced new problems related to excluding based on gtar patterns.

As a result files that would be excluded by gtar, would still be in the filelist. Implementing our own gtar compatible pattern exclusion mechanism is near to impossible (believe me, we looked at it...). The best way is to look at the original problem and deal with that, and ensure that extraction and filelists are done with the exact same tool and exact same options.

The solution is to decode the octal unicode representation in gtar's output back to unicode. Since gtar has no problem extracting these files in LANG=C, we simply has to compensate for it.

This reverts #3575 and fixes #11348.

* Implement codecs.escape_decode() instead of decode("string_escape") for python3
2016-12-08 11:24:42 -05:00
Chris Houseknecht
a8059c68d0 Remove object name validation. 2016-12-08 11:24:41 -05:00
Brian Coca
b55fd5f67a updated set_fact docs with note about typing 2016-12-08 11:24:41 -05:00
nitzmahone
b51a1e175e minor win_template doc corrections 2016-12-08 11:24:41 -05:00
Brian Coca
ad996f162b name was the issue, not pkg 2016-12-08 11:24:41 -05:00
Brian Coca
d8e91f01b0 protect another portion against None name 2016-12-08 11:24:41 -05:00
Brian Coca
506e6ff2e2 another fix for None in name 2016-12-08 11:24:41 -05:00
Brian Coca
c871f488eb avoid traceback when name is None 2016-12-08 11:24:41 -05:00
Robin Roth
5d928ca13c Fix git shallow update (#3912)
* remove unused variables

* fetch branch name instead of HEAD

fix #3782, which was introduced by f1bacc1d3f

* disable git depth option for old git versions

fixes #3782
git support for `--depth` did not fully work in old git versions (before 1.8.2)
fall back to full clones/fetches on those versions

* raise required git version to 1.9.1 for depth option

* use correct depth argument in switch_version
2016-12-08 11:24:41 -05:00
Christian Schwarz
e25cb4df77 service module: use sysrc on FreeBSD (#4042)
* service module: use sysrc on FreeBSD

sysrc(8) is the designated userland program to edit rc files on FreeBSD.

It first appeared in FreeBSD 9.2, hence is available on all supported
versions of FreeBSD.

Side effect: fixes #2664

* Incorporate changes suggested by bcoca.

- Use `get_bin_path` to find sysrc binary.
- Only use sysrc when available (support for legacy versions of FreeBSD)
2016-12-08 11:24:41 -05:00
Brian Coca
186db40864 make daemon reload first thing always run
otherwise service detection can fail before we run it which might
be required to actually detect the service.
2016-12-08 11:24:41 -05:00
Brian Coca
f874c29dff allow pip to take a list of names (#4056)
also simplified argspec by removing defaults
2016-12-08 11:24:41 -05:00
Patrick Uiterwijk
6b4359080e nova_compute: indicate argument type (#4070)
Without this, ansible 2.1 will convert some arguments that are
meant to be dict or list type to their str representation.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2016-12-08 11:24:41 -05:00
Adrian Likins
e2bd4a87d8 Update docs and internal naming s/RHN/RHSM (#3977) 2016-12-08 11:24:41 -05:00
Adrian Likins
09b34c764a Add 'force_register' to redhat_subscriptions (#3976)
Fixes #2448
2016-12-08 11:24:41 -05:00
Adrian Likins
127b854d2c Fix default perm for apt_repo files. (#4072)
Change the file mode arg to 'raw' ala file args

Following the file_common_args model, change the
type of the 'mode' arg here to type='raw' with no
default arg value.

The default mode for file creation is the module
constant DEFAULT_SOURCES_PER, and is used if no
mode os specified.

A default mode of 0644 (and not specified as int or str)
would get converted to an octal 420, resulting in the
sources file being created with mode '0420' instead of '0644'

Fixes #16370
2016-12-08 11:24:41 -05:00
Michael LoSapio
20d8103b53 Showing some of the sysctl settings in proper yaml format per Ansible documentation (#4073) 2016-12-08 11:24:41 -05:00
Lukas Grossar
4a532fb60c also match on tabs in ini_file (fixes #106) (#4067)
also match on tabs in ini_file
2016-12-08 11:24:41 -05:00
Ryan Brown
d4cec5ccc1 Remove double-assignment of EC2 parameters (#4081)
The `source_dest_check` and `termination_protection` variables are being
assigned twice in ec2.py, likely due to an incorrect merge somewhere
along the line.
2016-12-08 11:24:40 -05:00
Hrishikesh Barua
cf9bfc3459 Fix for #16518 - added missing regions 2016-12-08 11:24:40 -05:00
nitzmahone
1a4804cc60 fixes to windows setup
coerce multi-socket win32_processor to a single value
WindowsIdentity.Label doesn't exist on .NET 4.0
2016-12-08 11:24:40 -05:00
chouseknecht
9c6da9194a Update and pin to azure-2.0.0rc5 2016-12-08 11:24:40 -05:00
Brian Coca
992b999bde made password no_log in htpasswd 2016-12-08 11:24:40 -05:00
Toshio Kuratomi
30399d94f6 A few more sanity checks for detecting unzip output that's not a file entry (#3982)
* A few more sanity checks for detecting unzip output that's not a file entry

Also note that there's a rounding error somewhere in the mtime
comparison code.

* Fix reference to sub-array
2016-12-08 11:24:40 -05:00
Brian Coca
c59510aaf4 updated docs in pause to reflect 0 value behaviour 2016-12-08 11:24:40 -05:00
Dag Wieers
df2ef26bc7 Comment out $win32_cs.SystemFamily, cfr. @nitzmahone
Since it fails on everything pre-10/2016
2016-12-08 11:24:40 -05:00
Stian Vikan
714ced8e1c Fixed delete statement for juniper_config.py #4007 #3984 2016-12-08 11:24:40 -05:00
Shubham
162b75068f Fix broken link for issue template (#3680) 2016-12-08 11:24:40 -05:00
David Shrewsbury
88122e0f72 Use os.rename() in async_wrapper
Because the async_status module will read from the same file that
the async_wrapper module is writing, it's possible that the file
may not be fully synced during a read, causing spurious failures.
Use a temp file to do an atomic operation on the file. We can't
use atomic_move() here as that doesn't work properly under async.

Also, let's not read concurrently from the same file the subprocess
is writing to. Instead, capture stdout/stderr via PIPE and write to
the file to avoid nasty races.
2016-12-08 11:24:40 -05:00
Brian Coca
f9cb5ecc3c removed extra space
as pointed out by @lloydbenson
2016-12-08 11:24:40 -05:00
jctanner
4480b8d37f Cleanup unused variable in yum.py (#4009) 2016-12-08 11:24:40 -05:00
Peter Sprygada
b0bdf09a00 refactor ios_command to use CommandRunner class
* fixes running commands in check mode.  now only show commands are allowd
* renamed waitfor to wait_for with alias to waitfor for consistency
2016-12-08 11:24:40 -05:00
Dag Wieers
35b9810e39 Fix ansible_distribution and weekday locale (as hinted by @nitzmahone) 2016-12-08 11:24:40 -05:00
Dag Wieers
36d0bac0a3 Retain an important note regarding Win32_PhysicalMemory on virtual platforms 2016-12-08 11:24:40 -05:00
Dag Wieers
efaaa79157 Ensure we are using an English locale for date formatting. (as hinted by @nitzmahone) 2016-12-08 11:24:40 -05:00
Dag Wieers
790adc126f Added CPU information comparable to Linux 2016-12-08 11:24:39 -05:00
Rodríguez, Jorge
82c26ad2d7 Do not forcibly push when building, either. 2016-12-08 11:24:39 -05:00
Rodríguez, Jorge
89e8787d65 Don't forcibly push loaded images to registry. Fixes #3763 2016-12-08 11:24:39 -05:00
Peter Sprygada
622592c413 refactor the eos_command module to use the CommandRunner
* This adds support the CommandRunner to handle executing commands on
the remote device.
* It also changes the waitfor argument to wait_for to remain compatable
with other modules and adds an alias for waitfor.
* Restricts commands to show commands only when check mode is specified.
* add version_added to wait_for doc string
2016-12-08 11:24:39 -05:00