Commit graph

15521 commits

Author SHA1 Message Date
Sloane Hertel
5e67f86586 [cloud] fix ec2_vpc_route_table module documentation - Fixes #19344 (#22367)
* improve ec2_vpc_route_table documentation

* make pep8
2017-03-15 13:14:13 -04:00
Sloane Hertel
3aef028d42 [cloud] make ec2 module pep8 (#22421)
* making ec2 pep8

* remove ec2 from pep8 legacy files

* missed a couple

* fix imports and remove iteritems

* making group_id and group_name mutually exclusive and fixing whitespace
2017-03-15 13:13:25 -04:00
John R Barker
9857ce8ddb Fix render issue (#22650) 2017-03-15 16:31:37 +00:00
John R Barker
f82239e1f7 [WIP] Network module docs 2.3 (#22454)
* Tidy up docs for network 2.3 modules

* Use suboptions

* Correct indentation

* more tidyup

* bulk updates

* more tidyup

* Bulk changes

* nxos_mtu is dead

* revert

* NXOS_mtu is dead, also better layout

* rebase

* rebase
2017-03-15 16:00:43 +00:00
James Cammarata
76f28fd2fc Bumping devel version to 2.4.0 2017-03-15 09:42:01 -05:00
Dag Wieers
72e7927dd5 win_scheduled_task: Added frequency: once and check_mode support (#22611)
* win_scheduled_task: Added frequency: once and check_mode support

This patch includes:
- Renamed `execute:` parameter to `executable:`
- Renamed `argument:` parameter to `arguments:`
- Implemented `frequency: once` support
- Implemented check_mode support
- Fix idempotency issue related to empty description
- Added integration tests

* Improve the integration test structure

I think this is a great way to test normal mode and check-mode from the same playbook.

* Small fixes after review
2017-03-15 07:11:24 -07:00
Ondra Machacek
699df5824d cloud: ovirt: fix update_params for ovirt module_utils (#22637) 2017-03-15 08:04:06 -04:00
Ondra Machacek
bb7e7be71f cloud: ovirt: Fix disk image upload (#22557) 2017-03-15 08:03:18 -04:00
Dag Wieers
9755d2dbbc win_feature: Clean up and check-mode support (#21351)
* Clean up parameter handling and added check-mode support

Changes include:
- Remove trailing semi-colons
- Replaced PSObjects into normal hashes
- Make use of Get-AnsibleParam and types
- Added check-mode support

* Implemented -WhatIf:$check_mode support

* powershell.ps1: Ensure Fail-Json() works with Hashtables

Without this change a dictionary $result object would be emptied if it
is anything but a PSCustomObject. Now we also support Hashtables.

* Revert to original formatting
2017-03-14 19:01:03 -07:00
Dag Wieers
589c483cfc win_chocolatey: Add check-mode support (#22501)
This patch implements:
- check-mode support
- add state "reinstalled"
- cleanup of timeout parameter
2017-03-14 18:57:29 -07:00
Jordan Borean
6ce338d29c win_service Added -Force option and minor cleanup (#22598)
* win_service Added -Force option and minor cleanup

* Changed parameter and fixed typos
2017-03-14 18:53:31 -07:00
René Moser
0ee108bda0 cloudstack: cs_instance: revert VPC support (#22629)
Partly reverts 5374c7cd09
2017-03-15 02:02:38 +01:00
René Moser
a2b6844858 cloudstack: cs_network: fix VPC support (#22627)
* cloudstack: cs_network: fix vpc support

* cloudstack: cs_network: fix pep8
2017-03-15 02:00:40 +01:00
René Moser
38b9f055d7 cloudstack: cs_staticnat: fix VPC support (#22626)
- Fix the VPC support by adding network to create and update methods
- Fix pep8
2017-03-15 01:59:20 +01:00
René Moser
a227a4ebb4 cloudstack: cs_ip_address: fix vpc support (#22625)
* cloudstack: cs_ip_address: fix vpc support

* cloudstack: cs_ip_address: fix pep8
2017-03-15 01:58:46 +01:00
Matt Davis
ce56da69b2 make windows async ... async (#22624)
Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
2017-03-14 16:37:55 -07:00
Sumit Kumar
994840447f Fix root volume security style options 2017-03-14 16:05:06 -04:00
Ricardo Carrillo Cruz
604a38cac1 Implement eos_banner for EAPI (#22609)
On EAPI, the multi-line commands are expected to be a dict,
with key/value pairs 'cmd'/'input' .
This change implements that behaviour and fixes the idempotency
on EAPI as well.

Fixes #22494
2017-03-14 21:00:17 +01:00
Ondra Machacek
38eb388154 ovirt: cloud: make the datacenter input compatible (#22483)
This patch makes sure that all inputs of datacenter are compatible. So
it's 'data_center' everywhere.
2017-03-14 13:37:01 -04:00
Toshio Kuratomi
eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
René Moser
2be3418a81 cloudstack: fix wrong vpc found by name (#22603)
Fail fast if more than one VPC found with given identifier.
2017-03-14 16:18:32 +01:00
Marc Mercer
c5c0d9086e [cloud][docs] update ec2_tag documentation example (#22586)
Currently the documentation utilizes with_subelements, but it does not parse the results correctly.  By changing to with_items: and specifying the proper list, we are able to tag the instances as expected.
2017-03-14 11:12:28 -04:00
Peter Sprygada
eed240797a adds connection established message to ansible-connection (#22492)
This will now print a log message that displays how long the ssh
connection took to establish to the remote device.  If the connection
established time is exceed it will also print a message to the log file
that the connection attempts have exceed.

Updates default connection retries to 30

fixes #22319
2017-03-14 10:31:02 -04:00
Matt Davis
07674a8446 prevent winrm Add-Type debug noise from polluting stderr (#22583) 2017-03-13 14:47:06 -07:00
Brian Coca
0897ec9938 warn when name is overloaded as both host and group
added small optimization to base group comparisson
fixes #6545
2017-03-13 17:41:25 -04:00
Ryan Brown
19511971ee Format ELBInfo call (#22383)
Move declaration of AWSRetry of get_all_load_balancers so it isn't redeclared for every page of data.
2017-03-13 16:00:34 -04:00
Robin Miller
6d8edfc35f Handle throttling and move BotoServerError handling to main. (#22383)
Unclear how useful it is to still be catching BotoServerError exceptions
generally, especially when we are now hopefully handling most instances
of throttling, but kept it as it was already in the code. Moved to main
as catching BotoServerErrors inside individual functions will bypass any
AWSRetry.backoff decorator.

Move additional imports to top.

Use python2.6 formatting

A bit of cleanup on imports

Make one more string interpolation Python 2.6 compatible.
2017-03-13 16:00:06 -04:00
Ricardo Carrillo Cruz
2553a37da5 Add no_log to all network module_utils provider argument (#22566)
The provider argument on the network modules argspec can contain
credentials.
Make sure we don't log it.

Fixes #21892
2017-03-13 13:21:46 -06:00
Chris Houseknecht
b15ceee6bd Changes command and entrypoint to type list 2017-03-13 14:39:23 -04:00
Will Thames
4cc872669c [cloud] fix connection_draining idempotency in ec2_elb_lb (#21323)
* Fix connection_draining idempotency in ec2_elb_lb

Ensure connection_draining types are equivalent when comparing
whether or not connection_draining is being changed.

This means that running `ec2_elb_lb` with connection_draining
set a second time will now report `changed=False`

* ec2_elb_lb: fixed latest Ansible standards compliance

Update to current pep8 standards, fix module imports
and remove module from exclusion file
2017-03-13 14:06:49 -04:00
夏恺(Kai Xia)
5e40af0732 [cloud] change returned type of tag in ec2_snapshot_facts, fix #22431. (#22432)
Signed-off-by: Xia Kai(夏恺) <xiaket@gmail.com>
2017-03-13 14:00:16 -04:00
Ondra Machacek
f5abcd9264 cloud: ovirt: Fix ovirt_tags documentation (#22569) 2017-03-13 13:33:33 -04:00
Will Thames
459724da6b [cloud] Convert nat gateway facts to ansible format (#20962)
Use camel_dict_to_snake_dict
2017-03-13 13:15:45 -04:00
Adrian Likins
3af6ad1687 Fix iptables TypeError if state/match/ctstate missing
Completely untested...

Fixes #22465
2017-03-13 13:07:10 -04:00
Alexander Gubin
06bcff8d92 Mark keystore_pass as 'no_log', to avoid leaking it 2017-03-13 12:51:23 -04:00
Joshua C. Randall
444b67ca0c s3_bucket: fixes #22464 without fully implementing support for ceph bucket update (#22538) 2017-03-13 10:29:14 -04:00
Ganesh Nalawade
8b6d786cff Fix junos prompt issue (#22536)
Need to handle junos shell prompt
that end's with '%'
2017-03-13 08:11:38 -04:00
Peter Sprygada
39c38bf30d fixes candidate var type in junos shared lib (#22551)
* candidate var can now be string, list or element
* fixes minor bug in junos_template for backup argument
* disabled invalid integration test for junos_template
2017-03-13 07:27:45 -04:00
Peter Sprygada
b3004e19a5 Junos facts (#22550)
* Update metadata & docs

* basic facts add

* Start building facts

* Retrofit more junos_facts

* Reimplement facts again

* Hardware

* Hook up config

* Hook up interfaces

* updates junos_facts to use netconf

* updates default facts
* adds config facts
* updates hardware facts
* updates interface facts
2017-03-12 20:17:58 -05:00
Johannes Kohnen
cc2eecc247 Enable path expansion in GCE modules
This is basically a replay of #16064 from `gce.py` to other pertinent
`gce_*.py` files. It enables expansions of paths in `gce.ini` like
`~/.project.json`
2017-03-12 16:55:43 -04:00
John R Barker
0d0c38400f eos_template is deprecated (#22549) 2017-03-12 19:59:56 +00:00
John R Barker
d21c16d455 Remove invalid type: (#22548) 2017-03-12 19:58:20 +00:00
Peter Sprygada
2b2072a8c9 roll up of fixes and updates for junos modules (#22543)
* removes cli functions
* adds comment and confirm to arguments
* implements zeroize argument
* fixes get_diff function in junos shared lib to return diff
* lots of minor bug fixes in junos_config
* minor syntax fixes in junos_netconf
* updates netconf integration tests
2017-03-12 11:45:00 -05:00
Peter Sprygada
09c08e1939 minor clean up of junos_command (#22545)
* removes unneeded check_transport function
* removes unneeded global vars
* verifies all integration tests are passing
2017-03-12 10:06:53 -05:00
Peter Sprygada
995497129e updates junos_command to send commands over netconf (#22540)
* junos_command should send all cli commands over netconf
* task based credentials are now optional
* commands and rpcs are not mutually exclusive anymore
2017-03-12 08:45:49 -05:00
Peter Sprygada
3f0f7c4f4e updates junos shared lib and action handler (#22541)
* removes cli functions from shared lib
* adds cli functions to junos_netconf module
* statically pins junos_netconf to cli transport
* all other modules use netconf transport
* adds command rpc function to junos shared
2017-03-12 08:37:45 -05:00
Peter Sprygada
1825406e1e Junos fixes (#22423)
* Fixes for junos_config errors

* Check transport settings for core Junos

* Don't pop from the same list you iterate over

* use of persistent connections are now explicitly enabled in junos

* modules must now explicitly enable persistent connections
* adds rpc support to junos_command

fixes #22166
2017-03-11 10:26:42 -06:00
Peter Sprygada
17fc6832ca fixes mapping nxapi arguments for nxos action plugin (#22491)
The nxos action plugin does not properly map task arguments when using
provider.  This patch will fix the problem and properly map the
arguments
2017-03-11 09:46:15 -06:00
Peter Sprygada
027f5955cc correctly maps task arguments for eapi transport (#22490)
The provider arguments where not correctly being mapped in the action
plugin for eapi transport.  This will now correctly map existing
arguments as well as set the correct defaults for values.

fixes #22442
2017-03-11 09:45:55 -06:00
Pierre Templier
ea0bae6bca Typo + rephrase (#22526) 2017-03-11 09:51:59 +00:00
THEBAULT Julien
374d491ba5 Check if file is not a directory with get_bin_path function (#13985) 2017-03-10 12:21:15 -05:00
Ricardo Carrillo Cruz
9173a7727c Fix issue on nxos modules when transport is passed via provider (#22488)
The nxos modules read the task level transport variable, thus if
the user pass it via provider the all fail with an UnboundLocalError.

Fixes #22355
2017-03-10 07:32:24 -07:00
Brian Coca
7ad6ce7ea1 moved network module magic from hardcoded to conf 2017-03-09 21:49:02 -05:00
Brian Coca
2d9bf88897 deal with other 'ungrouped' corner cases 2017-03-09 20:11:37 -05:00
Adrian Likins
ae31634c23 Make vault encrypt/create/etc confirm pass again.
Make the 'write' modes of vault confirm a new password
before using, again.

This was unintentionally disabled in
309f54b709 previously.

Fixes #22438
2017-03-09 14:32:21 -05:00
Adam Hamsik
6cf8318468 Add simple module to import/delete ssl certificate from/to java keystore (#20274)
* Add simple module to import/delete ssl certificate from/to java keystore.

* add diff/check mode support, fix reported issues and simplify decision logic

* Fix build by adding new line at the end of file.

* Some updates to module requested PR review

* Add simple executable parameter

* Fix build error
2017-03-09 14:14:43 -05:00
John R Barker
e5b990a55a Fix invalid fields in module DOCUMENATION (#22297)
* fix module doc fields

* More module docs corrections

* More module docs corrections

* More module docs corrections

* More module docs corrections

* correct aliases

* Review comments

* Must quote ':'

* More authors

* Use suboptions:

* restore type: bool

* type should be in the same place

* More tidyups

* authors

* Use suboptions

* revert

* remove duplicate author

* More issues post rebase
2017-03-09 16:20:25 +00:00
Dag Wieers
654e95ea49 wait_for_connection: Update the docs to implementation (#22400)
* Update the docs to conform to implementation

Somehow the docs were still mentioning a default timeout of 300 seconds.
Whereas the implementation defaults to 600 seconds.

* Improve examples even more
2017-03-09 14:00:36 +00:00
Ricardo Carrillo Cruz
c57729944b Fix the eos_banner idempotency (#22413)
The map_config_to_obj calls the run_commands  helper function,
which returns a list of results.
However, the map_params_to_obj return a single string.
Therefore, the comparison between the two datasets could never be equal,
breaking idempotency.
Also, the 'no banner' command should be run on absent only if there's a banner
text set.

Fixes #22194
2017-03-09 12:43:54 +00:00
Tim Rupp
32146acf4e Actual attributes were being created and messing with the modules (#22424) 2017-03-08 21:10:02 +00:00
Brian Coca
78e116077a readd all.add_host as for loop uses diff data 2017-03-08 15:56:10 -05:00
Nicolas Braud-Santoni
f689cca0b8 vault: Uniformize construction of cipher objects 2017-03-08 15:14:20 -05:00
Nicolas Braud-Santoni
680d61c609 vault: call is_encrypted directly in is_encrypted_file
Doing the conversion and checking for exceptions there is pointless
since is_encrypted already does it.
2017-03-08 15:14:20 -05:00
Brian Coca
385f1d82dc ensure all hosts in all
fixes #20252
2017-03-08 14:56:08 -05:00
Matt Clay
0b250016b0 Fix PEP 8 issue. 2017-03-08 10:05:19 -08:00
René Moser
6f426b9d06 cloudstack: cs_vpc: fix vpc in projects not found (#22416) 2017-03-08 18:52:29 +01:00
Dave Kasberg
8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
2017-03-08 17:09:17 +00:00
Hao
96a19a4521 iptables module: match=conntrack with ctstate not working (#21976) 2017-03-08 11:01:47 -05:00
Brian Coca
406505bfe5 fixes cache file modules with bad path permissions
now module will fail to load and report an error (turned into warning as this should not be fatal)
fixes #13093
2017-03-08 10:58:53 -05:00
Dag Wieers
770ab76ed0 win_region: Small changes to Add-AnsibleParam and docs (#22310) 2017-03-08 15:58:14 +00:00
Alex Chvatal
f1d8d7ba13 include upgraded packages in pacman upgrade action (#20713)
* include upgraded packages in pacman upgrade action

* display upgraded packages as diff output for pacman upgrade

* document the packages return key

* add --diff support for installing, removing and checking packages

* include package versions in pacman diff output
2017-03-08 10:32:02 -05:00
René Moser
7f35220744 cloudstack: cs_firewall: fix pep8 and typo s/endpoint/endport/ (#22406) 2017-03-08 15:12:48 +01:00
Drew Russell
94f9bb962f Add a new module for Cisco Spark notifications (#19348)
* Add a new module for Cisco Spark notifications

* Added authentication validation to check mode

* Re-added description and removed Pylint references

* Moved the authentication test to the spark_message function

* removed duplicate fetch_url statements

* documentation formatting updates and if __name__ update

* recipient typo fix and added correct Formatting options to documentation options

* updated version added to 2.3
2017-03-08 12:49:38 +00:00
Dag Wieers
c45f6905fc wakeonlan: Bugfix and small improvements (#22389)
- Close the socket after use
- Use proper parameter types
- Remove redundant parameter options
- Clean up docs
- Move module from network/ to remote_management/
- Add check-mode support
2017-03-08 12:42:55 +00:00
Tim Rupp
a8910e78ca Using the wrong variable (#22386) 2017-03-08 08:43:36 +00:00
Tim Rupp
3c69cf6d7d Moved exception handler in a little bit (#22376)
It wasn't being caught in the previous indentation
2017-03-07 21:05:01 +00:00
Adrian Likins
edcbef27ec Retain vault password as bytes in 2.2 (#22378)
* Retain vault password as bytes in 2.2

Prior to 2.2.1, the vault password was read in as byes and then remained
bytes all the way through the code.  A bug existed where bytes and text
were mixed, leading to a traceback with non-ascii passwords.  In devel,
this was fixed by changing the read in password to text type to match
with our overall strategy of converting at the borders.  This was
backported to stable-2.2 for the 2.2.1 release.

On reflection, this should not have been backported as it causes
passwords which were originally non-utf-8 to become utf-8.  People will
then have their working 2.2.x vault files become in-accessible.

this commit pipes bytes all the way through the system for vault
password.  That way if a password is read in as a non-utf-8 character
sequence, it will continue to work in 2.2.2+.  This change is only for
the 2.2 branch, not for 2.3 and beyond.

Why not everywhere?  The reason is that non-utf-8 passwords will cause
problems when vault files are shared between systems or users.  If the
password is read from the prompt and one user/machine has a latin1
encoded locale while a second one has utf-8, the non-ascii password
typed in won't match between machines.  Deal with this by making sure
that when we encrypt the data, we always use valid utf-8.

Fixes #20398

(cherry picked from commit 5dcce0666a)
2017-03-07 15:30:09 -05:00
Alex Lo
8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
2017-03-07 20:55:17 +01:00
René Moser
e0d38fb137 composer: fix escape working_dir (#22363)
* composer: fix escaping of path working_dir

* composer: fix pep8
2017-03-07 20:51:04 +01:00
Brian Coca
c71b15a696 Bad extra early (#22322)
* catch bad extra vars data earlier

* incoporated @alkins feedback
2017-03-07 13:44:36 -05:00
Toshio Kuratomi
1ea3313c90 Document synchronize limitations around become and connections (#22373)
* Document synchronize limitations around become and connections
2017-03-07 10:22:24 -08:00
Brian Coca
c4cff44e77 fix 'ungrouped' issue with some inventory formats 2017-03-07 12:49:24 -05:00
Brian Coca
20bf02f6b9 rename return var to avoid conflicts
fixes #22323
2017-03-07 12:08:31 -05:00
Ricardo Carrillo Cruz
fd6429fbd1 Idempotency fix for iosxr_config (#22365)
Multiple fixes to address idempotency issues, along with refactor of
module_utils iosxr to look like ios, for code consistency.

Fixes #22315
2017-03-07 15:57:19 +00:00
Kamil Cholewiński
ec9582fd83 Fix invocations of module.fail_json with no msg=
Bonus: add missing % in cs_nic.py
2017-03-07 10:17:14 -05:00
Michael Scherer
91860b2423 Verify that the role specification is using a comma before warning
One way to trigger this is having this snippet in meta/main.yml:

dependencies:
  - role: foo
    when: "use_foo == True"

It shouldn't show a warning but since we assume that 'foo' is the old
style format, it always show one. So we should verify the
style before calling role_spec_parse.
2017-03-07 09:35:42 -05:00
Chris Alfonso
25827c85d2 Fixing issue #22193 - authorize argument is not deprecated for 2.3 for ios and eos (#22326) 2017-03-07 13:03:44 +01:00
Loïc Blot
792efbe3b6 virt.py: autostart VM attribute (#22208)
* virt.py: autostart VM attribute
autostart is now an idempotent VM attribute instead of a non idempotent forced autostart attribute set to True

* Make shippable happy

* Missing version added

* Fix some points

* Autostart default is now None

* Ident fix
2017-03-07 11:07:19 +00:00
Andrea Giardini
863c1ff38b Ec2_tag support for check mode (#21779) 2017-03-07 10:44:32 +00:00
John R Barker
8531547ec2 Correct module:, it should match filename (#22296)
* Validate module: matches filename

* remove testcase

* Revert module validation, move to different PR
2017-03-07 09:49:03 +00:00
Tim Rupp
c2180888f7 I think for now I'll just not use dunder setter (#22336) 2017-03-07 09:36:13 +00:00
Ricardo Carrillo Cruz
5357a67607 Remove 'update' param from documentation examples (#22350)
The 'update' param is no longer supported, thus removing from docs.
2017-03-07 10:32:36 +01:00
Ryan Brown
f0491b4261 [cloud] Fix ZeroDivisionError in ec2_elb_facts module (#22332) 2017-03-06 17:26:02 -05:00
Tim Rupp
6ff9bd0a33 Fixes baseclass for new f5 modules (#22333) 2017-03-06 22:04:49 +00:00
Lujeni
d942196666 Use a dedicated directory for the mongodb modules (#22187)
* Use a dedicated directory for the mongodb modules
* Missing the RETURN documentation in mongodb_user
2017-03-06 13:14:14 -08:00
JimFicarra
2206b5e900 Fix Issue #20553 #15737 - merge with reg functionality #19443 (#20555) 2017-03-06 12:56:17 -08:00
Robin Miller
9c20182bdf [cloud] Avoid failures in RDS modyue due to throttling while waiting (#22271)
1. Check less aggressively for resources that take a long time to return
(some resources can take an hour or more).
2. Handle throttling when checking for resources, and back off quickly
when it occurs.
2017-03-06 15:19:59 -05:00
Ricardo Carrillo Cruz
43aef4e868 Do not pass filters to os_group get_group call (#22321)
As default is set to None, the get_group call doesn't find groups
on domain 'None'.
Only pass filters in case we pass domain_id value.
2017-03-06 19:15:00 +01:00
Dan Vaida
433829769e [cloud] Fix data types in ec2_elb_lb causing resource to be spuriously updated (#21906)
fixes broken idempotence caused by the idle_timeout and cross_az_load_balancing params. (#21906)
2017-03-06 12:27:30 -05:00
Brian Coca
516d61f1ae simplified if 2017-03-06 12:13:05 -05:00