Commit graph

11315 commits

Author SHA1 Message Date
Fabio Alessandro Locati
2e34bad425 Call main in conditional way - files (#5828) 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
8855b3274c Call main in conditional way - databases 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
21bd86ef1d Call main in conditional way - cloud/rackspace 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
c8fd24ee04 Call main in conditional way - cloud/amazon 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
1c3aeb5cb7 Call main in conditional way - source_control 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
a6cd0272fb Call main in conditional way - system 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
4d2a3229d3 Call main in conditional way - web_infrastructure 2016-12-08 11:25:35 -05:00
Toshio Kuratomi
42a5b1977f Do not use the fstab parameter on openbsd for mounting (#5805)
* Do not use the fstab parameter on openbsd for mounting

OpenBSD's mount command doesn't allow selecting which fstab file to use.
So if we're operating on the live filesystem (mount or remount) return
an error if the user specified an fstab file.

Fixes #5591

* Fix the logic inversion (thanks to @landryb)
2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
a5a15acd55 Native YAML - files/file.py (#5799)
* Native YAML - files/file.py

* Rollaback part of the change as for request
2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati
8b7db84e91 Native YAML - cloud/google/gce.py (#5800) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
2b0bdd45e8 Unquote urls in YAML - windows (#5798) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
ca047c3881 Unquote urls in YAML - cloud (#5797) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
eb54b80a92 Unquote urls in YAML - system (#5796) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
18d022d808 Unquote urls in YAML - source_control (#5795) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
013be6fa1c Unquote urls in YAML - web_infrastructure (#5794) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
8ae7d2dcc4 Unquote urls in YAML - packaging (#5793) 2016-12-08 11:25:34 -05:00
Fabio Alessandro Locati
e49667d94c Unquote urls in YAML - network (#5792) 2016-12-08 11:25:34 -05:00
Evan Kaufman
580c74140a Fix for python 2.4 compatibility (#5693)
Fixes #5692
2016-12-08 11:25:34 -05:00
Asara
dddf810a19 Fixed typo in docker_image.py docs (#5764) 2016-12-08 11:25:34 -05:00
Brian Coca
e3a43c0d4b made fact_path actual path (#5789) 2016-12-08 11:25:34 -05:00
Ted Timmons
367f675420 use 'six' for urlparse compatability (#5777)
* use 'six' for urlparse compatability
2016-12-08 11:25:34 -05:00
John R Barker
b05df29978 Missing space between key:value (#5785) 2016-12-08 11:25:34 -05:00
René Moser
507559dba5 doc: network: fix syntax errors in examples (#5780) 2016-12-08 11:25:34 -05:00
Rob White
3f81a65e53 Fail if specifying an ENI as device but in_vpc is not true 2016-12-08 11:25:34 -05:00
Dustin C. Hatch
b49aa70c29 systemd: Start inactive units for reload/restart
The `service` module starts services that are not running when
`action=restarted` or `action=reloaded`, which is especially convenient
for initial deployments because it eliminates an extraneous operation
for when the service starts for the first time. This commit adjusts the
behavior of the `systemd` module to match.
2016-12-08 11:25:33 -05:00
Matt Davis
ce0412aa85 Fix test failures in win_command/win_shell on Powershell 3
Switched to use Exit-Json to avoid JSON escaping bugs in ConvertTo-Json formatter without -Compress option.
2016-12-08 11:25:33 -05:00
Wouter Oosterveld
61060f4b5f mysql_user: fix user_mod on MySQL(-like) 5.7+ (Fixes #3003) (#5388) 2016-12-08 11:25:33 -05:00
ekultails
0358919db8 add correct SELinux file context for crontabs (#4511) (#4595) 2016-12-08 11:25:33 -05:00
David Wittman
cc334a078b Set IdentitiesOnly=yes when using key_file (#5682)
Sets the SSH option `IdentitiesOnly=yes` in the SSH wrapper when a
`key_file` is provided to the git module. This option ensures that
the provided key is used. Otherwise, the system's ssh-agent could
provide undesired identities when connecting.

From ssh_config(5):

> Specifies that ssh(1) should only use the authentication identity and
> certificate files explicitly configured in the ssh_config files or
> passed on the ssh(1) command-line, even if ssh-agent(1) or a
> PKCS11Provider offers more identities. The argument to this keyword
> must be “yes” or “no”. This option is intended for situations where
> ssh-agent offers many different identities. The default is “no”.
2016-12-08 11:25:33 -05:00
Matt Clay
86d53db3e4 Update async_wrapper.py to remove own temp dir. (#5719) 2016-12-08 11:25:33 -05:00
jctanner
d41b4e3802 Use the the new features of fail_if_missing for checkmode (#5750) 2016-12-08 11:25:33 -05:00
Brian Coca
d2fec9d259 added docs for use option
(cherry picked from commit ad5cb0f0d7231ff74d7918faa26091ba710c4709)
2016-12-08 11:25:33 -05:00
Toshio Kuratomi
b95f483b8d Force BSDs to use umount/mount instead of trying to use remount. (#5715)
* Force BSDs to use umount/mount instead of trying to use remount.

Fixes #5591

* Initialize out and err
2016-12-08 11:25:33 -05:00
Brian Coca
da9adccb02 systemctl show rc changes across versions
to avoid different errors across versions, ignore rc in favor of
found/notfound

fixes #5710
2016-12-08 11:25:33 -05:00
Jiri Tyr
b264f8c1cd Fall back if mountinfo reading failed (fixing #5603) 2016-12-08 11:25:33 -05:00
Matt Clay
82e74668a6 Support script interpreters in async_wrapper. (#5703) 2016-12-08 11:25:33 -05:00
Andrea Tartaglia
48d47a57d5 ported iterkeys to py3 syntax (#5657)
* ported iterkeys to py3 syntax

Addresses ansible/ansible#18507

* Use ansible.module_utils.six.moves iterkeys instead of dict.keys()

* Removed 'iterkeys'
2016-12-08 11:25:33 -05:00
Sam Doran
c0c26f83a8 Examples syntax batch7 (#5624)
* Change example syntax on nxos_feature module

* Change example syntax on nxos_hsrp module

* Change example syntax on nxos_igmp module

* Change example syntax on nxos_interface module

* Change example syntax on nxos_interface_ospf module

* Change example syntax on nxos_ip_interface module

* Change example syntax on nxos_ping module

* Change example syntax on nxos_switchport module

* Change example syntax on nxos_vlan module

* Change example syntax on nxos_vrf module

* Change example syntax on nxos_vrf_interface module

* Change example syntax on nxos_vrrp module

* Change example syntax on meta module

* Change example syntax on set_fact module

* Change example syntax on win_copy module

* Change example syntax on win_file module

* Change example syntax on win_get_url module

Remove escaping of \ characeter in Windows paths since it's no longer required for single quoted or unquoted values when using multi-line YAML syntax.

* Change example syntax on win_lineinfile module

* Change example syntax on win_msi module

* Change example syntax on win_stat module

* Remove nxos_bgp example from nxos_igmp module

* Mark examples as regexp to avoid syntax error

* Cleanup win_copy.py examples

* Cleanup win_file.py examples

* Remove quotes in win_get_url.py examples

* Cleanup quotes and languare in win_lineinfile.py

* Cleanup examples in win_group.py

* Cleanup examples in win_service.py

* Don't use : in documentation because it breaks the YAML syntax check

* Cleanup win_copy.py examples

* Cleanup win_copy.py examples

* Minor change to fix test failure

* Use single quotes
2016-12-08 11:25:33 -05:00
Sam Doran
bf184b1a92 vyos_command Document ANSIBLE_VYOS_TERMINAL_LENGTH (#5676)
* Update documentation for vyos_command

Add information on new environment variable added in #18546.
Add note on command that should not be run via Ansible.

* White space changes

Two spaces after period.
2016-12-08 11:25:33 -05:00
Kevin Kirsche
1fe0bd33f3 Remove set from junos_facts as it errors out (#5670)
Fix #5636 per @ganeshnalawade
2016-12-08 11:25:33 -05:00
Ganesh Nalawade
d39ae36ab1 Fix 5646 junos_config issue if config format is text (#5658)
If 'src_format' is not mentioned in playbook
and config is in text format a list object is
passed to 'guess_format' function instead
of string, hence TypeError execption is seen.
Fix is to pass string object instead of list.
2016-12-08 11:25:32 -05:00
Brian Coca
2ba5967673 fix yaml format, clarify docs 2016-12-08 11:25:32 -05:00
Brian Coca
b278fafec8 updated desc 2016-12-08 11:25:32 -05:00
Orion Poplawski
ade7b47f28 Be able to find all contents of a directory (#3711) 2016-12-08 11:25:32 -05:00
tedder
78f8ef267c update formatted lines to use named identifiers 2016-12-08 11:25:32 -05:00
Dag Wieers
c22e383836 Ensure proper error when fetch_url returns status -1
When using a file:// or ftp:// URL the normal provisions that a non-200 status code means error have been disabled.
But the common error status -1 from fetch_url is not properly returning an error message.
This fix ensures that if the status code returns -1, we return a proper error message.

This fixes #3563
2016-12-08 11:25:32 -05:00
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