Commit graph

11269 commits

Author SHA1 Message Date
Rob Cutmore
6a3969ca6b Git: indicate if remote url was changed or not (#5677) 2016-12-08 11:25:32 -05:00
jctanner
10f0d3ca95 Set b_src to abspath of b_path so that symlinks work again. (#5678)
Fixes #5653
2016-12-08 11:25:32 -05:00
John R Barker
b1c6b9272f win_msi - Don't list choices twice (#5684)
* win_msi - Dont list choices twise

http://docs.ansible.com/ansible/win_msi_module.html shows

Choices:
True
True
False
False

As the yes/no are expanded to true/false by the docs generation

* Update win_msi.py
2016-12-08 11:25:32 -05:00
Toshio Kuratomi
ef3699e277 Fix for call to umount() in remount() 2016-12-08 11:25:32 -05:00
Brian Coca
1d8be78963 try remount but fallback to unmount + mount (#2445)
* allow mount to try remount

falls back to unmount/mount

* fixed fstab handling and switched to ismount

custom function deals with bind mounts unlike built in

* un ** args

* last ** args
2016-12-08 11:25:32 -05:00
tedder
c77f7af765 add .format indexes for 2.6 compatability
Fixes #5551; the "".format() style needs to have `{0}` instead of the implied `{}` version for compatability with 2.6.
2016-12-08 11:25:32 -05:00
zaiusdr
74b32d9ec0 Fix wait_for Module to handle socket response as string in Python3
In Python3 socket module returns responses as bytes type. So it's
necessary to convert it to string for the module work correctly.
2016-12-08 11:25:32 -05:00
Kevin Kirsche
4e95ee036e Update pull request template to provide context
This updates the pull request template to provide more context about why specific things may be needed. This helps to make it feel like it is being asked for to help the team rather than arbitrary questions that don't seem applicable, such as command output for a docs change.
2016-12-08 11:25:32 -05:00
Matt Davis
13a9b98565 Prevent handle inheritance from blocking Windows async_wrapper (#5666) 2016-12-08 11:25:32 -05:00
Brian Coca
44c07d7ca8 Several systemd fixes
Allow some operations on missing services
Better sysv handling
Rearranged error reporting
fixed load error catching and order logic
also minor doc/comment updates
added warnings
2016-12-08 11:25:32 -05:00
Peter Sprygada
7079fe41be Revert "ios_mods - added stdout to exception output. Removed to_lines()" (#5663) 2016-12-08 11:25:31 -05:00
Monty Taylor
509846e6d6 Add a few lines about testing (#5662) 2016-12-08 11:25:31 -05:00
Toshio Kuratomi
52698596bc Clarify the comment 2016-12-08 11:25:31 -05:00
Toshio Kuratomi
91d98bb1a6 Older versions of rhn-client-tools don't understand containment tests. 2016-12-08 11:25:31 -05:00
Dag Wieers
54fdff16db Performance improvement using in-operator on dicts
Just a small cleanup for the existing occurrences.

Using the in-operator for hash lookups is faster than using .keys()
http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
2016-12-08 11:25:31 -05:00
Dag Wieers
c843eeabc2 Performance improvement using in-operator for hash lookups
Just a small cleanup for the existing occurrences.

Using the in-operator for hash lookups is faster than using .has_key()
http://stackoverflow.com/questions/1323410/has-key-or-in
2016-12-08 11:25:31 -05:00
David Wittman
85f6c26dff Add 'link' file_type to find_module
- Adds the 'link' file_type for finding symbolic or hard links
 - Use `os.lstat` instead of `os.stat` to prevent the following
   of links when statting the file.
2016-12-08 11:25:31 -05:00
Sam Doran
895179929c Examples syntax batch6 (#5623)
* Change example syntax on os_auth module

* Change example syntax on os_client_config module

* Change example syntax on os_image_facts module

* Change example syntax on os_networks_facts module

* Change example syntax on os_nova_flavor module

* Change example syntax on os_object module

* Change example syntax on os_server module

* Change example syntax on os_subnet_facts module

* Change example syntax on rax_files module

* Change example syntax on rax_files_objects module

* Change example syntax on mysql_db module

* Change example syntax on file module

* Change example syntax on uri module

* Change example syntax on cl_bond module

* Change example syntax on cl_bridge module

* Change example syntax on cl_img_install module

* Change example syntax on cl_interface module

* Change example syntax on cl_license module

* Change example syntax on cl_ports module

* Remove trailing colon
2016-12-08 11:25:31 -05:00
Jesse Keating
4c3f8cbd92 Do not require password when deleting os_user (#5601)
I broke backwards compat with the addition to define when a password
should be updated. It was requiring that a password value be passed when
deleting a user, which seems silly.

This moves the argument logic out of the argument spec and into when it
would be needed, when state is present.
2016-12-08 11:25:31 -05:00
Luc Charpentier
be7af0193d error in docker_container example (#5631) 2016-12-08 11:25:31 -05:00
Abdul Anshad A
480c364afd fixes issue #5517 (#5519) 2016-12-08 11:25:31 -05:00
Sam Doran
38c0769abb Examples syntax batch5 (#5622)
* Change example syntax on supervisorctl module

* Change example syntax or _ec2_ami_search module

* Change example syntax on cloudformation module

* Change example syntax on ec2 module

* Change example syntax on ec2_facts module

* Change example syntax on ec2_eip module

* Change example syntax on rds module

* Change example syntax on route53 module

* Change example syntax on s3 module

* Change example syntax on digital_ocean module

* Change example syntax on docker_service module

* Change example syntax on cloudformation module

* Change example syntax on gc_storage module

* Change example syntax on gce module

* Change example syntax on gce_mig module

* Change example syntax on _glance_image module

* Change example syntax on _keystone_user module

* Change example syntax on _nova_keypair module

* Change example syntax on _quantum_floating module

* Change example syntax on _quantum_floating_ip_associate module

* Change example syntax on _quantum_network module

* Change example syntax on _quantum_router module

* Change example syntax on _quantum_router_gateway module

* Change example syntax on _quantum_router_interface module

* Change example syntax on _quantum_subnet module

* SQUASH _quantum_subnet

* Add missing quotes
2016-12-08 11:25:31 -05:00
Sam Doran
b56a9852ee Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module

* Change example syntax on cron module

* Change example syntax on group module

* Change example syntax on hostname module

* Change example syntax on seboolean module

* Change example syntax on selinux module

* Change example syntax on service module

* Change example syntax on sysctl module

* Change example syntax on systemd module

* Change example syntax on user module

* Change example syntax on debug module

* Change example syntax on fail module

* Change example syntax on include module

* Change example syntax on include_role module

* Change example syntax on include_vars module

* Change example syntax on pause module

* Change example syntax on wait_for module

* Change example syntax on apache2_module module

* > Change example syntax on django_manage module

* Change example syntax on htpasswd module
2016-12-08 11:25:31 -05:00
Sam Doran
ad6999e2eb Change example syntax on subversion module 2016-12-08 11:25:31 -05:00
Sam Doran
8a1caba407 Change example syntax on hg module 2016-12-08 11:25:31 -05:00
Sam Doran
1c801ac574 Change example syntax on git module 2016-12-08 11:25:30 -05:00
Sam Doran
2bb5ab9776 Change example syntax on pip module 2016-12-08 11:25:30 -05:00
Sam Doran
d42f73f5e9 Change example syntax on gem module 2016-12-08 11:25:30 -05:00
Sam Doran
8a1bd4178a Change example syntax on easy_install module 2016-12-08 11:25:30 -05:00
Sam Doran
4c93d3edf0 Change example syntax on yum module 2016-12-08 11:25:30 -05:00
Sam Doran
ea3c8ee406 Change example syntax on rpm_key module 2016-12-08 11:25:30 -05:00
Sam Doran
66c92d5623 Change example syntax on rhn_register module 2016-12-08 11:25:30 -05:00
Sam Doran
25af0652b9 Change example syntax on rhn_subscription module 2016-12-08 11:25:30 -05:00
Sam Doran
3208cf5abf Change example syntax on redhat_subscription module 2016-12-08 11:25:30 -05:00
Sam Doran
6c16ab6ca8 Change example syntax on package module 2016-12-08 11:25:30 -05:00
Sam Doran
ca12f5acac Change example syntax on apt_rpm module 2016-12-08 11:25:30 -05:00
Sam Doran
e4978ea98d Change example syntax on apt_repository module 2016-12-08 11:25:30 -05:00
Sam Doran
b2ffded3a7 Change example syntax on apt_key module 2016-12-08 11:25:30 -05:00
Sam Doran
f8ce66cbde Change example syntax on apt module 2016-12-08 11:25:30 -05:00
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