Commit graph

11618 commits

Author SHA1 Message Date
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
Ryan S. Brown
a2e6ac6ca8 IAM group modules need module passed
The IAM group modules were not receiving the `module` object, but they
use `module.fail_json()` in their exception handlers. This patch passes
through the module object so the real errors from boto are exposed,
rather than errors about "NoneType has no method `fail_json`".
2016-12-08 11:24:39 -05:00
jhawkesworth@users.noreply.github.com
2090304511 double backslashed all single backslashes to keep travis happy 2016-12-08 11:24:39 -05:00
Dag Wieers
dc432c5697 Added more properties 2016-12-08 11:24:39 -05:00
Dag Wieers
f8b0cf50b4 Format BIOS date string like on Linux 2016-12-08 11:24:39 -05:00
Dag Wieers
457ccc2e73 win_setup: Add missing properties
We add some basic properties for Windows that are available on other platforms.
2016-12-08 11:24:39 -05:00
jhawkesworth@users.noreply.github.com
d3d108e13e document how force=no works for win_get_url and add RETURN 2016-12-08 11:24:39 -05:00
Daniel Petty
6441556b98 fixed $source null check, reference to $Params
$source check causes:
FAILED! => {"changed": false, "failed": true, "msg": "A parameter cannot be found that matches parameter name 'Source'."}

$Params.Remove causes:
FAILED! => {"changed": false, "failed": true, "msg": "Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named 'Remove'."}
2016-12-08 11:24:39 -05:00
Peter Sprygada
a522c2d99f initial add of ios_facts module
This adds the new module ios_facts for collect fact information from
ios devices
2016-12-08 11:24:39 -05:00
Erik Nadel
4619513d9e apt remove now recognizes the force parameter (#3756) 2016-12-08 11:24:39 -05:00
Graham Goldstein
9632b47a85 Change documented options for os_networks_facts (#3970)
* Change documented options for os_networks_facts

os_network_facts currently lists 'network' as an available option, taking the Name or ID. In Ansible 2.0.2 to 2.2.0, this is not valid. Options 'name' and 'id' should be used instead.

* Update os_networks_facts.py

* Update os_networks_facts.py

Set version_added to the only accepted value

* Update os_networks_facts.py

Removed inappropriate 'ID' parameter
2016-12-08 11:24:39 -05:00
mattymo
5692d28f93 Add retries to apt_key with keyserver, fixes #3986 (#3987)
Public SKS gpg servers frequently are unavailable, but a retry
can mitigate frequent failures.
2016-12-08 11:24:39 -05:00
jctanner
17ebf51bd4 Add local and url support to yum state=latest (#4003)
Fixes #3807
2016-12-08 11:24:39 -05:00
jctanner
3a0056e571 Add a note about using the script module with pseudo-tty's lack of stderr channel (#4000)
Addresses #3610
2016-12-08 11:24:39 -05:00
Toshio Kuratomi
eadef56a06 Add comment 2016-12-08 11:24:38 -05:00
Marius Gedminas
3a8a11d85f git: fix change testing when version is HEAD (#3025)
When `version` is not specified, it defaults to "HEAD".  "HEAD" is not a
remote tag, and it's not listed in the output of get_branches(), so we'd
keep repo_updated at the default value (None) and then return early with
changed=True in --check mode, even when before == after.

Fixes #3024.
2016-12-08 11:24:38 -05:00
chouseknecht
3d5f84c528 Fix compose_version error. Check has compose before checking version. 2016-12-08 11:24:38 -05:00
chouseknecht
1e9590ab65 Fix index 2016-12-08 11:24:38 -05:00
chouseknecht
cc053c45ce Fix ulimit comparison 2016-12-08 11:24:38 -05:00
Allen Sanabria
6d6b8a1823 Fixes #1715 Allow authorized_module accept multi. (#3573)
This will allow the authorized_module to accept options that can be
passed multiple times into ssh options. For instance permitopen.
2016-12-08 11:24:38 -05:00
Mario David
88e4e1af18 add project to os_router (#3869)
* add project to os_router

* version_added fix

* correct place of version_added

* remove extraneous else

* * add shade version dependency check
* option project only on router creation

* * fix shade minimal version
* remove pop of option project

* * fix square brackets
* delete router by router_id
2016-12-08 11:24:38 -05:00
Javier M. Mellid
49f9404cd2 Add s3_url requirement in doc when rgw support is enabled in s3.py
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Javier M. Mellid
6346cad9d0 Add proper version_added for rgw option in s3.py
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Javier M. Mellid
0b156aae16 Add Ceph RGW S3 compatibility
Ceph Object Gateway (Ceph RGW) is an object storage interface built on top of
librados to provide applications with a RESTful gateway to Ceph Storage
Clusters:

http://docs.ceph.com/docs/master/radosgw/

This patch adds the required bits to use the RGW S3 RESTful API properly.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Stanislav Antic
4c92652e7b Fix wait_for on python < 2.6 (#3790) (#3973) 2016-12-08 11:24:38 -05:00
Brian Coca
f595b27e47 reverted need for module utils imports 2016-12-08 11:24:38 -05:00
Brian Coca
0c82db9cda added missing import
readded raise
2016-12-08 11:24:38 -05:00
Brian Coca
51c3eda259 exception ans sys.exit fixes 2016-12-08 11:24:38 -05:00
Toshio Kuratomi
1b88df0bda Fix exception handling in async_wrapper 2016-12-08 11:24:38 -05:00
Keisuke Kamada
259c4b31fb Do not copy file if running on check mode 2016-12-08 11:24:38 -05:00
Adam Butler
0c7ec1e860 Fixes incorrect key name protocols -> protocol (#3963) 2016-12-08 11:24:38 -05:00
nitzmahone
363ff55445 StrictMode fixes for win_get_url 2016-12-08 11:24:37 -05:00
Brian Coca
1f6c3766b0 restored incorrectly removed docs, jinja2 override 2016-12-08 11:24:37 -05:00
Hagen Kuehn
320aea77c6 fixed unknown type <type 'list'> error (#3959) 2016-12-08 11:24:37 -05:00
Brano Zarnovican
9fd52ac40e Py2.4: SystemExit in async_wrapper is not an error - compatibility fix
Prior to Python 2.5, SystemExit was a subclass of Exception.
In Py2.4, this is causing extra error output on valid sys.exit(0).

(Toshio) Call sys.exit from inside of the SystemExit exception handler so py2.4 and py2.5+ behaviour matches
2016-12-08 11:24:37 -05:00
Brian Coca
079948eef0 updated raw docs for environment and executable
it should now reflect how raw works in combination with
become and environment directives
2016-12-08 11:24:37 -05:00
nitzmahone
e7075f3e93 rename ansible_winrm_certificate_expires fact to avoid collision with connection vars 2016-12-08 11:24:37 -05:00
chouseknecht
16e7dc4e2e Remove dns from container create parameters. 2016-12-08 11:24:37 -05:00
chouseknecht
4d51a51ac3 Fix #3945 docker_container detach not waiting on container to execute. 2016-12-08 11:24:37 -05:00
Brian Coca
01490688f4 document that get_url also takes file params
has for a long time, but was never documented, mode,group, owner can all be set here
2016-12-08 11:24:37 -05:00
Brian Coca
34b94ec4c4 Revert "Add mode option to the list" (#3946) 2016-12-08 11:24:37 -05:00
Victor Bocharsky
6037684d23 Add mode option to docstring for get_url (#3630)
Add mode option to the list
2016-12-08 11:24:37 -05:00
Toshio Kuratomi
53a22ce93a Finish python3 syntax compilation fixing for core repo 2016-12-08 11:24:37 -05:00
@
c901b70a01 Fixing compile time errors irt (, e => as e, print(), ocat now 0o not 0) exception handling for Python 3 (#3851)
* Fixing compile time errors irt a) exception handling for Python 3 in util, also: b) problem octal usage (fixed) and c) print json_dump -> print(json_dump(xyz) ... et al

* This code was not Python 2.4 compliant. Octal codes and exception handling is now working with Py 2.4, 2.6, & 3.5.

* Fixing formating (or rather reverting an non 2.4 compatible change). Works in compile & runtime checking.

* a) revert to use print sys.stderr not fail_json; b) fixed var name in exception

* Python 3 compatible print (print >>sys.stderr will generate a TypeError - now uses sys.stderr.write instead).
2016-12-08 11:24:37 -05:00
chouseknecht
82436d5519 Fix #3941 2016-12-08 11:24:37 -05:00
Stefan Hajnoczi
7c4a469174 docker_service: make PyYAML requirement explicit
The "Developing Modules" documentation states:

  Include a minimum of dependencies if possible. If there are
  dependencies, document them at the top of the module file, and have
  the module raise JSON error messages when the import fails.

When docker_service runs on a remote host without PyYAML it crashes with
ImportError.

This patch raises a JSON error message when import fails, but only if
the PyYAML module is actually used.  It's only needed when the
"definition" parameter is given.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2016-12-08 11:24:37 -05:00
chouseknecht
617c230b62 Fix #16211 - only stop/kill running containers 2016-12-08 11:24:36 -05:00
neo
07c8804486 fix unarchive doesn't extract changed tar file #3901 2016-12-08 11:24:36 -05:00
Chris Houseknecht
b5820c7398 Fix #3906 - Enforce required minimum compose version. (#3925)
* Fix #3906 - Require minimum compose version.

* Fix typo in message text.
2016-12-08 11:24:36 -05:00
Matt Fischer
a28b23db86 Update delete notes for Synrhconize docs (#3723)
The example for delete=yes does not specify recursive although it is
required. In addition, the wording for the delete option is confusing
about from where files are really deleted. This should clarify that.
2016-12-08 11:24:36 -05:00
Thomas Quinot
0bd32c3465 Clarify behaviour when state=present and no name is given (#3904) 2016-12-08 11:24:36 -05:00
Dag Wieers
9387c1b758 Update GitHub templates to reflect ansible/ansible (#3900)
* Update GitHub templates to reflect ansible/ansible

Update the GitHub templates to what is used for some time on ansible/ansible
For more information, see ansible/ansible#15961

* Small improvement from ansible/ansible
2016-12-08 11:24:36 -05:00
Dag Wieers
6bcf88ef54 Adapt module to use new module._name property (#3918)
This is in line with the change from ansible/ansible#16087
2016-12-08 11:24:36 -05:00
Dag Wieers
c6fb3ceb85 Improve the unzip output scraping (#3819)
* Improve the unzip output scraping

Ensure we capture the complete file (also when it includes spaces).
Drop lines that do not conform (in length) to what we expect (e.g. header/footer).

This fixes #3813

* Fix how split() works
2016-12-08 11:24:36 -05:00
Bradley Phipps
17985f9917 added missing colons to documentation (#3913) 2016-12-08 11:24:36 -05:00
Toshio Kuratomi
b259c65b20 Revert "Fix git shallow update (#3794)" -- Broke integration tests: https://app.shippable.com/runs/57599a7897ae890c00c2898d
This reverts commit c26eb1217f.
2016-12-08 11:24:36 -05:00
jctanner
48f096b52c Use the six import for urlsplit instead of importing directly. (#3902)
Fixes https://github.com/ansible/ansible/issues/16191
2016-12-08 11:24:36 -05:00
Robin Roth
513c3bf287 Fix git shallow update (#3794)
* 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
2016-12-08 11:24:36 -05:00
Stefan Hajnoczi
38013de366 Stream image data in load_image() to avoid out-of-memory
Reading the entire tar file into memory can result in out-of-memory
conditions such as this traceback:

Traceback (most recent call last):
  File "/tmp/ansible_YELTSu/ansible_module_docker_image.py", line 486, in load_image
    self.client.load_image(image_data)
  File "/usr/local/lib/python2.7/dist-packages/docker/api/image.py", line 147, in load_image
    res = self._post(self._url("/images/load"), data=data)
  ...
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 848, in _send_output
    msg += message_body
MemoryError

Luckily docker-py's load_image(), which calls requests post(), accepts a
file-like object instead of a string.  Pass in the file object to avoid
reading the full file into memory.  This allows larger tar files to load
succesfully.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2016-12-08 11:24:36 -05:00
Vince v. Oosten
42a38f9141 move environment variable gathering to end of __init__() (#3890)
* This moves the lines in the code that parse the `env` and `env_file` options for docker to the end of the `__init__()` function.
This is needed because the `_check_capabilites` function needs both a working `self.client` and a proper `self.docker_py_versioninfo`.
`_check_capabilities` is used by `ensure_capabilities` which is, in turn, used by `get_environment`

This means that before this commit, the environment variables could not be loaded because both `self.client` and `self.docker_py_versioninfo` were not set at that time.

This commit fixes that by putting the environment variable parsing after those two.

* This moves the lines in the code that parse the `env` and `env_file` options for docker to the end of the `__init__()` function.
This is needed because the `_check_capabilites` function needs both a working `self.client` and a proper `self.docker_py_versioninfo`.
`_check_capabilities` is used by `ensure_capabilities` which is, in turn, used by `get_environment`

This means that before this commit, the environment variables could not be loaded because both `self.client` and `self.docker_py_versioninfo` were not set at that time.

This commit fixes that by putting the environment variable parsing after those two.
2016-12-08 11:24:36 -05:00
Matt Davis
81e7720f62 Iam trust policy (#3885)
* added support for trust policies

* added version_added to new params in DOC string

* update version_added on new iam args to 2.2
2016-12-08 11:24:36 -05:00
Peter Sprygada
d8cb09a121 removes requirement for config argument to be specified in junos_facts
The config argument is optional and should not be required.  This
removes the required attribute from the config argument.

fixes #3878
2016-12-08 11:24:36 -05:00
Trond Hindenes
7747be71b4 Return reboot pending as true/false 2016-12-08 11:24:35 -05:00
mansunkuo
be6ce922a6 Add an example to delete Route53 alias record set (#3834) 2016-12-08 11:24:35 -05:00
Brendan Jurd
c5fbda395b Fix grammar in docs for fetch 'fail_on_missing' (#3872) 2016-12-08 11:24:35 -05:00
Robin Naundorf
03515fc26c Fixed Typo in Examples of systemd module (#3870) 2016-12-08 11:24:35 -05:00
Brian Coca
03f06ca2e8 fixed issue with multiline output from systemd
fixes #3868
2016-12-08 11:24:35 -05:00
Mike Mars
eb4813f1ca a) fail_json uses kwargs, b) outside the fork, log instead of returning json on stdout. 2016-12-08 11:24:35 -05:00
Mike Mars
1426a99cc0 data type fix on format string 2016-12-08 11:24:35 -05:00
Mike Mars
a406ec30df corrected the string formatting (format isn't in 2.4 and even in some later versions of python 2.x requires an index). Tested for both compile ***& runtime exceptions*** against 2.4, 2.6, and 3.5. 2016-12-08 11:24:35 -05:00
Toshio Kuratomi
79d12db02f Fix the six import 2016-12-08 11:24:35 -05:00
Toshio Kuratomi
8ba0af5df3 Be sure to import urllib.parse from somewhere 2016-12-08 11:24:35 -05:00
chouseknecht
fc486824b8 Fix issue #3866 2016-12-08 11:24:35 -05:00
Mike Mars
097f57d327 Missed umask octal conversion. 2016-12-08 11:24:35 -05:00
Mike Mars
f592e92177 Corrected string of text... 2016-12-08 11:24:35 -05:00
Mike Mars
7af767f435 1) Modified error handling to work with Python 2.4. 2) Fixed octal codes to fall in line with the ansible guide, "Porting Modules to Python 3" 3) updated the requirements. All changes have been verified against Python 2.4, 2.6, & 3.5. 2016-12-08 11:24:35 -05:00
nitzmahone
570defc6d8 correct gs_storage docs to match reality 2016-12-08 11:24:35 -05:00
Mike Mars
b30f6e02f6 Fixing compile time errors irt exception handling for Python 3. This particular diff fixes problems with Exception handling and the use/misues IRT Python 3 of octal numbers (InvalidToken exceptions). 2016-12-08 11:24:35 -05:00
Elena Washington
cf31b4d8b5 Add support for PostgreSQL 9.5 in rds_param_group (fix for #3846) 2016-12-08 11:24:35 -05:00
Gilles Gagniard
bbfea348df better error message if libcloud is not recent enough to use gce subnetworks 2016-12-08 11:24:34 -05:00
Jonathan A. Sternberg
97917121a6 Paginate the results from boto.iam
The default pagination is every 100 items with a maximum of 1000 from
Amazon. This properly uses the marker returned by Amazon to concatenate
the various pages from the results.

This fixes #2440.
2016-12-08 11:24:34 -05:00
Gilles Gagniard
152a713fd3 fix documentation to reflect subnetwork option is new in ansible 2.2 2016-12-08 11:24:34 -05:00
Gilles Gagniard
3404c0891b Initial support for specifying in which subnetwork a gce instance should be created. This is required for non-legacy networks. 2016-12-08 11:24:34 -05:00
pic
8494b0af4b fix #3528 : dns type 2016-12-08 11:24:34 -05:00
Michael Pappas
585003c546 Prevent ec2group from deleting sgs during check_mode runs 2016-12-08 11:24:34 -05:00
@
7e4b1ebff5 Fixing Rackspace compile time errors irt exception handling for Python 3 (#3849) 2016-12-08 11:24:34 -05:00
@
7960e99310 Fixing open stack compile time errors irt exception handling for Python 3 (#3848) 2016-12-08 11:24:34 -05:00
@
13bebda244 Fixing gce compile time errors irt exception handling for Python 3 (#3845) 2016-12-08 11:24:34 -05:00
chouseknecht
950931144f Fix 3857 name regex 2016-12-08 11:24:34 -05:00
chouseknecht
9549c66a56 Fix #147 automatically expose published ports 2016-12-08 11:24:34 -05:00
chouseknecht
17fc0f11db Remove unused method in ContainerManager 2016-12-08 11:24:34 -05:00
@
c3aab8ddcf Fixing compile time error exception handling for python 3. (#3843) 2016-12-08 11:24:34 -05:00
Mike Mars
e2dbd0f445 Fixing Docker compile time errors irt exception handling for Python 3 2016-12-08 11:24:34 -05:00
@
3fa745eef9 Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing compile time errors IRT error exception handling for Python 3.5.
This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
2016-12-08 11:24:34 -05:00
@
1573066ec1 Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. (#3839) 2016-12-08 11:24:33 -05:00
chouseknecht
ec9f56d8e0 Fix #3822 stop container 2016-12-08 11:24:33 -05:00
chouseknecht
c9e4955d38 Remove registery option per #3824. 2016-12-08 11:24:33 -05:00
chouseknecht
be2d32f04d Fix upate typo and expected volume compare. 2016-12-08 11:24:33 -05:00
René Moser
b7265d7b28 apt: fix deb=file with --diff does not show diff on upgrades (#3826) 2016-12-08 11:24:33 -05:00
René Moser
a85d9930c5 apt: fix KeyError for deb=file (#3816)
Fix KeyError: 'prepared' while installing dependencies using deb=<file>.deb
This error shows up when --diff was not passed by and the deb files has dependencies not yet installed.
Closes #3752.
2016-12-08 11:24:33 -05:00
Brian Coca
73bc9fd0e0 Revert "Add prefixing and suffixing fuctionality to assemble"
This reverts commit 4c386dba56.
keeping in sync with main repo revert
2016-12-08 11:24:33 -05:00
Brian Coca
cffe358260 fixed enabled state 2016-12-08 11:24:33 -05:00
Brian Coca
df1b03d0c6 fixed reported state 2016-12-08 11:24:33 -05:00
chouseknecht
9dd95efe76 Fixed binds and volumes. Now recognizes bound vs unbound as well as named volumes. 2016-12-08 11:24:33 -05:00
chouseknecht
abbddbde49 Fix missing ansible_facts. 2016-12-08 11:24:33 -05:00
Matthias Frey
d5fc44610b Fixed error in assemble module when validation failed. (#3814)
Error was: TypeError: fail_json() takes exactly 1 argument (2 given)
2016-12-08 11:24:33 -05:00
Jirayut 'Dear' Nimsaeng
d373e0a7c4 Fix volume to support not binding volumes to host 2016-12-08 11:24:33 -05:00
Anton Simernia
1aa1b617f5 Update gc_storage.py (#3802) 2016-12-08 11:24:33 -05:00
chouseknecht
96192ead02 Remove debug/register from examples. 2016-12-08 11:24:33 -05:00
chouseknecht
3d0d14c5ff Fix network comparison. Fix handling of links. Updated doc strings. Added more examples. 2016-12-08 11:24:33 -05:00
chouseknecht
a4bd558240 Set version added to 2.2 so that tests pass 2016-12-08 11:24:32 -05:00
chouseknecht
e398efb04f For new options move vesion_added to 2.1.1 2016-12-08 11:24:32 -05:00
chouseknecht
c8f63e867a Fixed bug in _get_network_id 2016-12-08 11:24:32 -05:00
chouseknecht
a9ddb5023d Fix doc strings. 2016-12-08 11:24:32 -05:00
chouseknecht
1d327a23cd Fixed issues post testing. 2016-12-08 11:24:32 -05:00
chouseknecht
39bfb136a7 First pass at implementing networks parameter. Also added purge_networks option to remove container from networks not included in networks param. 2016-12-08 11:24:32 -05:00
chouseknecht
f3c33ee35f Fix for 3768 - adding support for env_file 2016-12-08 11:24:32 -05:00
Jan Fader
3afbe28b8a fix for #3706 (#3778) 2016-12-08 11:24:32 -05:00
chouseknecht
2016911e64 Check self.parameters.env exists. 2016-12-08 11:24:32 -05:00
chouseknecht
bc665fca9c Fix for issue #3775 - env config comparison 2016-12-08 11:24:32 -05:00
chouseknecht
65e71d8960 Update restart_policy doc strings. 2016-12-08 11:24:32 -05:00
chouseknecht
b5666c0f1c Fix restart_poicy 2016-12-08 11:24:32 -05:00
chouseknecht
8f9ef1213d Fix for #3783 - command returns not found or does not exist. 2016-12-08 11:24:32 -05:00
Dan Schmidt
c8ec843ac2 Fix "ansbile_facts" typo in docker_container module 2016-12-08 11:24:32 -05:00
Erik Nadel
6f5dfcf1bd Added statement about escaping characters in chron tasks (#3770) 2016-12-08 11:24:32 -05:00
David Fischer
adec050165 Add MariaDB to valid RDS engines (#3337)
* Add MariaDB to valid RDS engines

* Update RDS module documentation
2016-12-08 11:24:32 -05:00
Gabriele
1977b42956 Fixing bug, added missing param (#3737) 2016-12-08 11:24:31 -05:00
Dmitry Marakasov
13d7a61160 Fix crontab argument order for writing (#3750)
Currently, when writing user's crontab, ansible calls

    crontab <file> -u <user>

This is incorrect according to crontab(1) on both FreeBSD and Linux,
which suggest that file argument should be the last.

At least on FreeBSD, this leads to incorrect cron module bahavior which
writes to root's crontab instead of users's
2016-12-08 11:24:31 -05:00
Ghe Rivero
3ae6583510 Make add ip_floating_ip idempotent
Closes issue #1858
2016-12-08 11:24:31 -05:00
Dag Wieers
f7fcb81dd9 Add unpack results to error output, for debugging purposes on failure
This may help understand what is going on with #3631
2016-12-08 11:24:31 -05:00
Toshio Kuratomi
286a46e8b4 Python2.4's zipfile library cannot handle zip 64bit extensions which are needed for > 64K files (#3754)
Fallback to unzip if zipfile fails and hope that unzip can deal with it
(sites have an easier time upgrading the unzip utility than all of
python).

https://bugs.python.org/issue3997

Fixes #3560
2016-12-08 11:24:31 -05:00
Wolfgang Powisch
20d9c0c484 Update junos_facts.py (#3759) 2016-12-08 11:24:31 -05:00
Brian Coca
01819bbc9d fixed enabled reporting 2016-12-08 11:24:31 -05:00
Brian Coca
38d71b9eef fixed typo 2016-12-08 11:24:31 -05:00
Brian Coca
472d5c11ef added state in results for backwards compat 2016-12-08 11:24:31 -05:00
chouseknecht
0c5eac4243 Fix missing key error when updating existing virtual network. 2016-12-08 11:24:31 -05:00
Roberto Bampi
375884464e Add an example for SRV record in route53 (#3749) 2016-12-08 11:24:31 -05:00
Brian Coca
8085678dc8 first draft systemd service plugin (#3660)
* first draft systemd service plugin

* now systemd status handles multiline values
2016-12-08 11:24:31 -05:00
chouseknecht
d0da544aef Fix for issue 3740. Make docker_service more resilient when targeting older API versions. 2016-12-08 11:24:31 -05:00
Brian Coca
f6690828af deprecated docker (#3710)
* deprecated docker

* updated formatting
2016-12-08 11:24:31 -05:00
Alvaro Aleman
2f2f80ad4c Fix can_update test in os_subnet (#3664) 2016-12-08 11:24:31 -05:00
René Moser
5fc7bc45ac Add no_gateway_ip option to os_subnet module (#3736)
no_gateway_ip option can provide subnet that is not having a gateway.
fixes #1880
2016-12-08 11:24:31 -05:00
james-prior
68b9c2ffa7 Make explicit that virtualenv is created if needed for pip module. (#3731)
packaging/language/pip.py:
    virtualenv option:
        Mention that virtualenv is created if it does not exist.
            (Explicit is better than implicit.)
        Mention other relevant options.
    notes:
        initialized -> created
    Wrap long lines.
2016-12-08 11:24:31 -05:00
Doug Luce
9167abdd10 Fix S3 unavailable region error
This is to address this error:

  fatal: [site]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to connect to S3: Region  does not seem to be available for awsmodule boto.s3. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path"}

Commit 0dd58e9 changed the logic so an exception is thrown (by
`connect_to_aws`) before the `s3 is None` check is performed. This
changes the `None` check to a catch so the old logic can compensate.
2016-12-08 11:24:30 -05:00
Marcos Diez
d34c5dfd69 Added one extra example in the authorized_key module. (#3637) 2016-12-08 11:24:30 -05:00
Marcos Diez
366d52cf18 The documentation of lineinfile now makes reference to blockinfile (#3639) 2016-12-08 11:24:30 -05:00
Ken Mitchell
8c2b333a73 Proposed fix to not require src and fstype arguments for mount. Issue #1259. (#1357) 2016-12-08 11:24:30 -05:00
Michael Scherer
d519fca04b Port vsphere_guest to py3/py2.4 syntax (#3721) 2016-12-08 11:24:30 -05:00
Michael Scherer
fefc0cdd50 Fix wait_for to compile on python3 (#3722) 2016-12-08 11:24:30 -05:00
Michael Scherer
82df6f981e Improve error reporting when git binary fail (#3266)
Showing stderr or stdout is a great help to understand
when something go south.
2016-12-08 11:24:30 -05:00
Michael Scherer
b8175f70ce Convert packaging/* to py3/py2.4 syntax (#3702) 2016-12-08 11:24:30 -05:00
Kenny Woodson
cd09aab9b4 Unindenting the delete to user (#3147) 2016-12-08 11:24:30 -05:00
Ryan Brown
962a446238 Allow users to pick AWS Aurora as an RDS engine (#3414)
Per the [RDS docs](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html),
add `aurora` as a valid DB engine.
2016-12-08 11:24:30 -05:00
Nathan Brown
c053fa5378 Do not expect the elb to have policies or instances. Fixes #3593 (#3595) 2016-12-08 11:24:30 -05:00
kwerey
963cb64337 Add option to make RDS param groups for the MySQL 5.7 engine family. (#3695) 2016-12-08 11:24:30 -05:00
Lloyd Hazlett
20e86d1062 Add path type to argument_spec where applicable (#3040) 2016-12-08 11:24:30 -05:00
Matt Martz
a2d94c85e9 2 Module fixes (#3611)
* Fix syntax error in azure_rm_virtualmachine.py

* Allow rhn_register to fail gracefully when rhn-client-tools is not installed
2016-12-08 11:24:30 -05:00
jctanner
c952753735 Do not ignore the primary group if modifying the list of secondary groups. (#3585)
Fixes #1118
2016-12-08 11:24:30 -05:00
Toshio Kuratomi
7d9fb08e1a Py3 exclude list (#3698)
* Fix a few modules to pass syntax checks under python3

* Move from a whitelist of modules to check for python3 compat to a blacklist
2016-12-08 11:24:29 -05:00
Cheuk Lam
a2ff7fc7ea Added support for accepting extra config options in vm reconfiguration. (#3327) 2016-12-08 11:24:29 -05:00
chouseknecht
afc8c42e57 Fixed the URL in description. It's now valid Yaml. 2016-12-08 11:24:29 -05:00
chouseknecht
f14d675d2a Remove the U(). 2016-12-08 11:24:29 -05:00
chouseknecht
176363052f Uppercase 2016-12-08 11:24:29 -05:00
chouseknecht
2b4ee0c19d Make the new bits a NOTE 2016-12-08 11:24:29 -05:00
chouseknecht
4ac31f1e8d Where to get the full docker picture. 2016-12-08 11:24:29 -05:00
Michael Scherer
c0217e14a7 Convert the network subfolder to py3/py2.4 syntax (#3690) 2016-12-08 11:24:29 -05:00
Michael Scherer
09066f1518 Convert all databases modules to python3 and 2.4 syntax (#3688) 2016-12-08 11:24:29 -05:00
Michael Scherer
f7b29ba8fd Convert the whole files/ directory to py3 syntax (#3685) 2016-12-08 11:24:29 -05:00
Mike Bryant
0027158b74 junos_template: Simplify arguments. Fixes #3621
Simplify the arguments to junos_template, such that
merge/overwrite/replace can be selected easily.
2016-12-08 11:24:29 -05:00
Kei Nohguchi
d738ad0ee0 ops_template.py: Change integer key into stirng
This fix passing the update variable to the str()
so that it avoids the exception when ops.dc.read()
returns a dictionary which contains non-string keys.

This is due to the fact that some of the key types in
OpenSwitch schema are actually defined as integer
and ops.dc declerative config module encode those
in integer inside the dictionary.  This could be
the right encoding from the schema point of view
but someone needs to convert it to the string
somewhere, as JSON key should be string.
2016-12-08 11:24:29 -05:00
Kaz Cheng
ff1c591c3e Allow create_iam_role to return an additional value of role_result and (#2418)
instance_profile_result, in addition to the existing role list and change value
2016-12-08 11:24:29 -05:00
Shubham
8a6237955d remove module argument, fix #3682 (#3683) 2016-12-08 11:24:29 -05:00
Michael Scherer
cca89ef489 Port seboolean to py3/py2.4 syntax (#3679) 2016-12-08 11:24:29 -05:00
Michael Scherer
c793571bc3 Port mount to python3 and python 2.4 compatible syntax (#3678) 2016-12-08 11:24:29 -05:00
Michael Scherer
fd61e81764 Port authorized_keys to a syntax compatible with python3 and 2.4 (#3677) 2016-12-08 11:24:28 -05:00
Michael Scherer
907b3fb667 Port hostname to a py24 and py3 compatible syntax (#3676) 2016-12-08 11:24:28 -05:00
Michael Scherer
e02f401225 Port sysctl to a py3 and py24 compatible syntax (#3675) 2016-12-08 11:24:28 -05:00
Michael Scherer
f0fd1109dd Port cron to a py3 and py24 compatible syntax (#3674) 2016-12-08 11:24:28 -05:00
Michael Scherer
f2212dc41a Port user module to python3 and 2.4 compatible syntax (#3673) 2016-12-08 11:24:28 -05:00
Michael Scherer
31126034b0 Port htpasswd to python3 compatible syntax (#3672) 2016-12-08 11:24:28 -05:00
Michael Scherer
73a33c02a9 Do not use a tuple as argument for _create_connection (#3655) 2016-12-08 11:24:28 -05:00
Michael Scherer
abfc8d36a8 Add a test on jnpr.junos.utils.sw presence (#3666) 2016-12-08 11:24:28 -05:00
jhawkesworth
2042d948db fix formatting to avoid smart quotes, which breaks ability to copy and paste the jinja2 header from the web docs (#3671) 2016-12-08 11:24:28 -05:00
Michael Scherer
f423554e20 Testing the module on freebsd fail, since module is not assigned yet 2016-12-08 11:24:28 -05:00
Michael Scherer
98c729bfd7 Fix the argument for acl module (#3653) 2016-12-08 11:24:28 -05:00
Matt Martz
190f24f30e Revert "Fix doc strings spacing."
This reverts commit 127d518011.
2016-12-08 11:24:28 -05:00
chouseknecht
26392077c0 Fix doc strings spacing. 2016-12-08 11:24:28 -05:00
chouseknecht
8e6d00f28e Fix doc strings. Missing requirements and doc fragment reference. 2016-12-08 11:24:28 -05:00
Michael Scherer
b788f45b49 Use the proper type for 'dest' argument 2016-12-08 11:24:28 -05:00
Toshio Kuratomi
291e00d43a Docs fixes 2016-12-08 11:24:28 -05:00
Dag Wieers
c650f06b03 Fix small typo (#3642) 2016-12-08 11:24:28 -05:00
chouseknecht
d5b82d67b8 Fail gracefully when build path is not found. 2016-12-08 11:24:27 -05:00
Brian Coca
ca7defeee5 made note about slurp memory consumption 2016-12-08 11:24:27 -05:00
chouseknecht
9a021b4181 Fixed files/project_files naming. Correct name is files. 2016-12-08 11:24:27 -05:00
chouseknecht
5837f744e0 Flip version added back to 2.2 to make tests pass. 2016-12-08 11:24:27 -05:00
chouseknecht
018c2f8f73 Moving version added to 2.1 2016-12-08 11:24:27 -05:00
chouseknecht
e8d49261e3 Added actions to RETURN docs. Show actions when debug or check mode. 2016-12-08 11:24:27 -05:00
chouseknecht
2860f57551 Removed use of --diff. Replaced 'diff' in output with 'actions'. Only show 'actions' in output if debug true. 2016-12-08 11:24:27 -05:00
chouseknecht
be24f83a41 Removed fail method. Combined recreate and force_recreate params. 2016-12-08 11:24:27 -05:00