Commit graph

11273 commits

Author SHA1 Message Date
Peter Sprygada
2127459794 fixes bug introduced in 3670215 in junos_config (#5251)
The previous fix created a new bug that this PR resolves
2016-12-08 11:25:20 -05:00
John R Barker
25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Tom Melendez
a4077537e0 Added libcloud guard for Managed Instance Groups. (#4911) 2016-12-08 11:25:20 -05:00
Tom Melendez
72635db94d GCE module examples update. Correct syntax, demonstrate other options and creation of multiple instances. (#5192) 2016-12-08 11:25:20 -05:00
Peter Sprygada
810040be05 fixes issue with collecting all filesystems in ios (#5248)
earlier versions of ios do not provide the all-filesystems argument.  This
fix will now only report on the flash filesystem for ios_facts

fixes #4712
2016-12-08 11:25:19 -05:00
Peter Sprygada
f106ff9e77 ios_config will now explicitly disconnect from remote host (#5247)
The ios_config module will now explicitly send a disconnect to the
remote host at the conclusion of the module run

ref #5181
2016-12-08 11:25:19 -05:00
amitsi
522ed054f7 Update pn_vlan (#5223)
removed name from an older file which got left out
2016-12-08 11:25:19 -05:00
Peter Sprygada
43e6206559 removes automated backup of ios to flash due to errors (#5245)
The feature is extremely unstable right now and decision to pull
it out for 2.2.  Workaround is to do the same in the playbook
2016-12-08 11:25:19 -05:00
Peter Sprygada
25d00838a9 fixes issue with pushing config to versions that do not support sessions (#5236)
earlier versions of eos do not support configuration sessions.  this change
will now check if sessions are supported and if not will fallback to
not using config sessions

fixes #4909
2016-12-08 11:25:19 -05:00
John Barker
bca8bbe7c2 Correct functional typos 2016-12-08 11:25:19 -05:00
Peter Sprygada
4dc09e19ea fixes bug with junos_config module not properly loading config (#5213)
This fixes two issues.  First, it fixes an issue with the junos_config
module not properly recognizing a file with set commands.  The second
bug would cause the diff_config() function to raise an exception due
to a blank line when splitting the config
2016-12-08 11:25:19 -05:00
Nathaniel Case
5a8ebf5953 nxos module cleanup (#5065)
* Fix imports on nxos_bgp* modules

* Fix imports on nxos_evpn* modules

* Cleanup issues for nxos_facts

* Shuffle imports for nxos_template

* Fix imports on nxos_ospf* modules

* Fix nxos_hsrp

As get_hsrp_groups_in_devices is not actually called anywhere, I presume this
change is reasonable.

* Fix imports on nxos_interface* modules

* Update nxos_static_route imports

* update nxos_vrf

* Update nxos_config imports
2016-12-08 11:25:19 -05:00
jjshoe
706bdbf284 Catch the rare condition where ami creation failed, this is critical when you have a 10-15 minute wait on ami creation. This rarely happens, and is tough to reproduce, but it does happen. (#5106) 2016-12-08 11:25:19 -05:00
Peter Sprygada
3fbae6f10f updates docstring for sros modules (#5197) 2016-12-08 11:25:19 -05:00
adejongh
a89992f70f Fixed incorrect usage of user_data variable (#5194) 2016-12-08 11:25:19 -05:00
Bill Nottingham
765269e547 Fix deprecation notices. (#5180) 2016-12-08 11:25:19 -05:00
Elena Washington
91e433594a Make is so that the params param truly isn't required (fix for #3860) 2016-12-08 11:25:19 -05:00
Toshio Kuratomi
0fe99f20d9 Emit an error message if six is not installed.
dopy 0.3.7 makes use of six but doesn't list it as a requirement.  This
means that people installing with pip won't get six installed, leading
to errors.  Upstream released dopy-0.3.7a to address that but pip thinks
that is an alpha release.  pip does not install alpha releases by
default so users aren't helped by that.

This change makes ansible emit a good error message in this case.

Fixes #4613
2016-12-08 11:25:19 -05:00
Toshio Kuratomi
064c381608 Fix exception hierarchy for digital ocean and some cleanups of pep8 style
Fixes #4613
2016-12-08 11:25:19 -05:00
Chris Houseknecht
8e9befa5ba Surface Compose stdout on failure
Signed-off-by: Chris Houseknecht <chouseknecht@ansible.com>
2016-12-08 11:25:18 -05:00
Chris Houseknecht
63b6672ea5 Improved enumeration of actions 2016-12-08 11:25:18 -05:00
Chris Houseknecht
1e4b8c13a3 Improved build and pull error handling 2016-12-08 11:25:18 -05:00
Gabriele
f8d2be407d Fixing docstring (#5130) 2016-12-08 11:25:18 -05:00
Peter Sprygada
56120433c9 checks commit comment to make sure it doesn't exceed 60 characters (#5155)
The comment argument can be at most 60 characters per the IOS XR command
line.  If a comment is > 60 characters, the module will now gracefully error
and return a well formed message.

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

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

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

* Default termination_protection to None instead of False

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

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

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

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

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

* Adding port-secutiry mapping

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

* Fixing docstring

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

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

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

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

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

fixes #1497

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

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

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

* Python 3 compatibility in eos_command

* Python 3 compatibility for ios_command

* Clean up issues with ios_facts

* Python 3 compatibility for ios_facts

* Import shuffle in ios_template

* Python 3 compatibility for iosxr_command

* Clean up iosxr_facts.py

* Python 3 compatibility for iosxr_facts

* Python 3 compatibility for junos_command

* Python 3 compatibility for ops_command

* Cleanup issues with ops_facts

* Python 3 compatibility for ops_facts

* Cleanup issues with ops_template

* Python 3 compatibility for vyos_command

* Cleanup issues with vyos_facts

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

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

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

Now just dict.items
six.iteritems handles the change

* Addresses point 1

Unsure if this is a good idea or not.

* Addresses point 2

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

* Remove unused import

Addresses point 3

* Clarify invalid subset error message

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

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

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

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

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

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

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

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

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

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

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

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

* Un-break with python3

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

* Pip: use 'pip list' when available

* Pip: explicitly check which command is used

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

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

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

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

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

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

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

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

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

* Added the missing quotes

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

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

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

* added no_log for password

* incorporated additional review comments

* remove type for options block

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added Py2.4 and YAML Documentation fixes

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

* added no_log for password

* incorporated additional review comments

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

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

* Addressed @gundalow review comments

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

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

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

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

* Corrected the documention failure

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

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

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

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

* speed up git by reducing remote commands

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fixes 4707
2016-12-08 11:25:01 -05:00
GGabriele
87b839e1f8 Adding missing fullstop 2016-12-08 11:25:01 -05:00
GGabriele
d2d1b18ef4 Fixed param value format in docstring 2016-12-08 11:25:01 -05:00