Commit graph

11230 commits

Author SHA1 Message Date
Sam Doran
c773539359 Change example syntax on group_by module 2016-12-08 11:25:30 -05:00
Sam Doran
a97964a22d Change example syntax on add_host module 2016-12-08 11:25:30 -05:00
Sam Doran
385d34a3d7 Change example syntax on xattr module 2016-12-08 11:25:30 -05:00
Sam Doran
c5921612d1 Change example syntax on unarchive module 2016-12-08 11:25:29 -05:00
Rezart Qelibari
d7e9fbe631 Update system/group.py module.
Add ability to add system groups with next free system gid (< 500) on macOS.
2016-12-08 11:25:29 -05:00
John R Barker
5945b19ad3 double quotes for consistency 2016-12-08 11:25:29 -05:00
John R Barker
1d00dd80f1 Need to quote if there is a : 2016-12-08 11:25:29 -05:00
Ben Tomasik
0de338824a Set suspend_processes version_added to 2.3 2016-12-08 11:25:29 -05:00
Ben Tomasik
f2af5b8664 Add support for suspending scaling processes Ref: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html 2016-12-08 11:25:29 -05:00
Sam Doran
f71134cb98 Change example syntax on template module 2016-12-08 11:25:29 -05:00
Sam Doran
a1b945a23e > Change example syntax on synchronize module 2016-12-08 11:25:29 -05:00
Sam Doran
065749ee2a Change example syntax on stat module 2016-12-08 11:25:29 -05:00
Sam Doran
d3e7d4f469 Change example syntax on replace module 2016-12-08 11:25:29 -05:00
Sam Doran
25f6f36a92 Change examples syntax on lineinfile module 2016-12-08 11:25:29 -05:00
Sam Doran
1923666b22 Change examples syntax on ini_file module 2016-12-08 11:25:29 -05:00
Sam Doran
ba76df1af1 Change examples syntax on find module 2016-12-08 11:25:29 -05:00
Sam Doran
0c46813871 Change examples syntax on file module 2016-12-08 11:25:29 -05:00
Sam Doran
6ea87c583b Change examples syntax on fetch module 2016-12-08 11:25:29 -05:00
Sam Doran
532c77849a Change examples syntax on copy module 2016-12-08 11:25:29 -05:00
Sam Doran
8f097580ec Change examples syntax on assemble module 2016-12-08 11:25:28 -05:00
Sam Doran
c694fe6ca4 Change examples syntax on acl module 2016-12-08 11:25:28 -05:00
Sam Doran
6d06f80097 Change examples syntax on postgresql_user module 2016-12-08 11:25:28 -05:00
Sam Doran
13c827a31c Change examples syntax on postgresql_privs module 2016-12-08 11:25:28 -05:00
Sam Doran
8edd2673b2 > Change examples syntax on postgresql_db module 2016-12-08 11:25:28 -05:00
Sam Doran
e0cfe14901 Change examples syntax on mysql_variables module 2016-12-08 11:25:28 -05:00
Sam Doran
db723af8aa Change examples syntax on mysql_user module 2016-12-08 11:25:28 -05:00
Sam Doran
119a767cd2 Change examples syntax on mysql_db module 2016-12-08 11:25:28 -05:00
Sam Doran
079bf05ec3 Change examples syntax on shell module 2016-12-08 11:25:28 -05:00
Sam Doran
60a92eadd7 Change examples syntax on script module 2016-12-08 11:25:28 -05:00
Brian Coca
847cc0a1ec Revert "stat: doc: add version for new returns" 2016-12-08 11:25:28 -05:00
Brian Coca
50c9a276d7 added file flags/attributes to stat (#5358)
depends on http://github.com/ansible/ansible/issue/18213
also documented return version of fields added in 2.2
added get_mime to keep consistency
changed default mime behaviour
2016-12-08 11:25:28 -05:00
Gyorgy Szombathelyi
33ef72b584 Ini_file: fix regression with the create option
The new create option with the default value 'no' changes the
behavior from the previous Ansible releases. Change the default to
'yes' to create missing ini files by default.

Fixes: #5488
2016-12-08 11:25:28 -05:00
René Moser
c8da9b012b stat: doc: add version for new returns (#5594) 2016-12-08 11:25:28 -05:00
Fabio Alessandro Locati
2cacc3e787 Use native YAML (#5571) 2016-12-08 11:25:28 -05:00
einarc
22df46d168 Avoid TypeError when desired_capacity is not provided to ec2_asg module (#5501)
Moving the "check if min_size/max_size/desired_capacity..." code to execute BEFORE the desired_capacity code is used in the following operation:
num_new_inst_needed = desired_capacity - len(new_instances)

Otherwise the following exception occurs when desired_capacity is not specified and you're replacing instances:
    num_new_inst_needed = desired_capacity - len(new_instances)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

Stack Trace:

An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 3044, in <module>
    main()
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 3038, in main
    replace_changed, asg_properties=replace(connection, module)
  File "/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg", line 2778, in replace
    num_new_inst_needed = desired_capacity - len(new_instances)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "ec2_asg"}, "module_stderr": "Traceback (most recent call last):\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 3044, in <module>\n    main()\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 3038, in main\n    replace_changed, asg_properties=replace(connection, module)\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1478229985.74-62334493713074/ec2_asg\", line 2778, in replace\n    num_new_inst_needed = desired_capacity - len(new_instances)\nTypeError: unsupported operand type(s) for -: 'NoneType' and 'int'\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}
	to retry, use: --limit @
2016-12-08 11:25:28 -05:00
Patrick F. Marques
dc4cff7350 Remove duplicated option from examples 2016-12-08 11:25:28 -05:00
Zaius Dr
d8c21b153d Improve ec2 module Python3 Support (#5497)
Imported six module from ansible module_utils for backwards compatibility.
2016-12-08 11:25:27 -05:00
Lars Van Casteren
0a435058a5 Docs update for os_security_group (#5531)
The example used equal characters and not colon characters.
2016-12-08 11:25:27 -05:00
Andrew Gaffney
2ef59561ba Fix bare variable references in docs (#5554) 2016-12-08 11:25:27 -05:00
Ryan Brown
e45e25c257 Fix cloudformation error when stack-rollback fails (#5550)
In cases where a CFN stack could not complete (due to lack of
permissions or similar) but also failed to roll back, the gathering of
stack resources would fail because successfully deleted items in the
rollback would no longer have a `PhysicalResourceId` property.

This PR fixes that by soft-failing when there's no physical ID
associated to a resource.
2016-12-08 11:25:27 -05:00
Ryan S. Brown
bf9077bfad Fix doc examples for ec2_elb_lb module
The examples had the listeners as a list item for each param, when they
really need to be their own objects.
2016-12-08 11:25:27 -05:00
Ryan S. Brown
5dd9372ff8 Fail gracefully in ec2_asg module when there are no matching launch configurations 2016-12-08 11:25:27 -05:00
jctanner
06e1141106 replace type() with isinstance() (#5541)
Replace all use of type() with isintance()

Addresses https://github.com/ansible/ansible/issues/18310
2016-12-08 11:25:27 -05:00
Ryan S. Brown
2744fde7c9 Fix link in cloudformation module docs 2016-12-08 11:25:27 -05:00
Sean Summers
59b11be65d added requires for botocore with RoleARN support
Added a requires for the minimum botocore version required to support RoleARN
2016-12-08 11:25:27 -05:00
Sean Summers
67934ac7db add role_arn to support Service Role
Add `role_arn` to support [AWS CloudFormation Service Role](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html)
2016-12-08 11:25:27 -05:00
jctanner
019acfa9b0 Correct the handling of state=latest for yum groups. (#4141)
* Correct the handling up state=latest for yum groups.
* Use yum-deprecated when available

Fixes #4119
2016-12-08 11:25:27 -05:00
Jason Cormie
9baca6ef3d Addition of InstanceUUID to facts (#4424)
The Instance UUID(refered to as PersistenceUUID in the API) is a the ID
vcenter uses to idenify VMs.
My use case for this is that I configure Zabbix using ansible and its
vmware module relies on using these to identify VMs.
2016-12-08 11:25:27 -05:00
Yair Fried
7eeb3445a4 Expose internal_network in os_floating_ip (#5510)
* Expose internal_network in os_floating_ip

Shade project has finally exposed this argument so now this module
matches old quantum_floatingip module's capabilities.

Use "nat_destination" term instead of "internal_network" to match shade
terminology.

* Add (private|internal)_network aliases to os_floating_ip

* Fix typo in os_floating_ip
2016-12-08 11:25:27 -05:00
mrLarbi
3bee788b72 ios_config : Set multiline_delimiter version to 2.3 (#5525) 2016-12-08 11:25:27 -05:00
Peter Sprygada
7d374689ad roll up of more fixes for ios_config multiline banners (#5524)
* now works for any banner in the config
* provides a configurable delimiter

link #5318
2016-12-08 11:25:27 -05:00
bdowling
ddd13bf53a ios_mods - added stdout to exception output. Removed to_lines() (#5428)
stdout lines are now available when certain exceptions occur
(Ref ansible/ansible#18241)

Also noticed that to_lines was essentially handled in
lib/ansible/plugins/action/__init__.py -- only difference was
it didn't handle a list.  to_lines() could be removed across
network modules now, but this commit is only for ios_command.

Also adds disconnect() to ios_command that was added
to ios_config in #5247
2016-12-08 11:25:26 -05:00
Michael Scherer
6806965bda Add no_log on password argument
Also do not use a wildcard import, for later refactoring
2016-12-08 11:25:26 -05:00
mickael-ange
23eba8fd97 Added aws and ec2 extends_documentation_fragment to cloud/amazon/rds module. (#3951) 2016-12-08 11:25:26 -05:00
Abel Boldú
6077028560 Add uplink provider type (#5282) 2016-12-08 11:25:26 -05:00
Michael Herold
e5cc4a45d3 Removes outdated "requirement" and outdated "note" (#5332)
- 7f59773460 no longer uses `ConfigParser`
- 1d4c0abe29 removed the `import` statement
2016-12-08 11:25:26 -05:00
Eduard Iskandarov
8ec5757789 Fixes: #4516 add placement_group argument for ec2_asg module 2016-12-08 11:25:26 -05:00
René Moser
447842c524 apt: fix changed when cache updated but not pkg (#5487) 2016-12-08 11:25:26 -05:00
Matt Martz
08ce50c2b3 If fetch_url failed to download the URL fail early with a proper error message. Fixes #5474 (#5476) 2016-12-08 11:25:26 -05:00
Michael Scherer
352d280058 Make service work when the service is not present in rc.conf
After installing a package from the ports collection on a
fresh FreeBSD 11.0, Ansible was unable to enable it, failing with
"unable to get current rcvar value". Debugging showed that sysrc
didn't see the variable from /usr/local/etc/rc.d/myservice, but
adding the value was working.

So we will just fallback to the default value if we can't find it.
2016-12-08 11:25:26 -05:00
Tom Melendez
b85bcb71c3 Support for named_ports in Managed Instance Groups. A libcloud guard has been implemented, as this feature will only be available in libcloud >= 1.3, or by using trunk. (#5167) 2016-12-08 11:25:26 -05:00
Jesse Keating
0ec56bb563 Add update_password argument to os_user (#5219)
There is a desire to not have this module always result in a change if a
password argument is supplied. The OpenStack API does not return a
password back when we get a user, so we've been assuming that if a
password argument was supplied, we should attempt to change the password
(even if nothing else is changing), and that results in a "changed"
state. Now we will only send along a password change attempt if the user
wants one (the default to match history).

Fixes #5217
2016-12-08 11:25:26 -05:00
Peter Sprygada
f8bcf55289 fixes problem when trying load banner into ios device (#5494)
this fix will now handle loading a multiline banner on ios based
devices without hanging.  It separates the processing of banners
from the remainder of the config

link #5318
2016-12-08 11:25:26 -05:00
jctanner
1ccd4ae8b0 Re-add version_added to include_vars (#5493) 2016-12-08 11:25:26 -05:00
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