Commit graph

15564 commits

Author SHA1 Message Date
Brian Coca
3f4b87f0c0 allow systemd to 'just' reload 2017-03-21 13:49:44 -04:00
Peter Sprygada
d6787632c9 fixes return data structure (#22830)
The return was being re-written instead of updated so warnings were
lost.  This patch now updates the result instead of replacing it.
2017-03-21 14:41:59 +01:00
Joshua C. Randall
e7fd38af78 Fix get_s3_connection (fixes #22317) (#22318)
* Fix get_s3_connection (fixes #22317)

Override aws_connect_kwargs rather than prepending to them. Should fix an issue in which `calling_format` is set twice in the kwargs passed to `boto.connect_s3` or `S3Connection` if a bucket name contains a `.`

* Revert "Fix get_s3_connection (fixes #22317)"

This reverts commit 7f61b8bebd.

* implements alternative way of fixing issue with aws_connect_kwargs for rgw and fakes3 (fixes 22317)

* add comment to explain why the keys are being removed from aws_connect_kwargs

* remove trailing whitespace on comment line
2017-03-21 08:15:53 -04:00
René Moser
e3525d8df9 cloudstack: fix pep8 for loadbalancer modules (#22822) 2017-03-21 11:00:46 +01:00
Peter Sprygada
e20ed8bc0c replaces logging with display for network connection plugins (#22819)
* updates network_cli and netconf connection plugins
* updates ansible-connection
2017-03-20 20:08:02 -07:00
Peter Sprygada
ed7cace425 implements python logging for network connection plugin (#22817)
* enables logging for network_cli and paramiko
* enables logging for ansible-connection
* enabled logging for netconf connection
2017-03-20 19:26:18 -07:00
Joseph Price
ed15ba1b3c CLI: unfrack --private-key path
Relative paths can break the synchronize plugin when the playbook
is not in the current working directory.

Fixes: ansible/ansible#22695
2017-03-20 11:40:17 -07:00
Brian Coca
07d9366ed8 added 'existing' back
fixes #22785
2017-03-20 12:28:35 -04:00
Tom Melendez
1c38cba7ca [GCE] Invalid zone reported through fail_json
* added new helper function for zones and regions.
* modified GCE module to use it

Fixes: ansible/ansible#20616
2017-03-20 10:15:39 -04:00
Peter Sprygada
cdb4d350b4 removes unneeded exception 2017-03-20 09:56:56 -04:00
Ondra Machacek
a46c55b2dd cloud: ovirt: Add sparsify option to ovirt_disks (#22560)
This patch fixes: https://github.com/ansible/ansible/issues/22348
2017-03-20 09:39:16 -04:00
René Moser
24c617766c cloudstack: fix load balancer idempotency if no zone given (#22768)
get_zone() is special, as it always returns a zone (default zone) even
if no zone param is given. This makes sense for many use cases.
2017-03-19 10:07:46 +01:00
David Baumann
634d6894e3 Add Missing default param for caching_mode (#22753)
Add Missing default param for caching_mode and Usage of new Ansible-Param Commant with default Value
2017-03-17 14:44:42 -07:00
Sloane Hertel
4749b75090 [cloud] ec2_eni: don't modify a network interface without eni_id - fixes #22401 (#22689)
* don't modify an eni without eni_id

fix pep8

remove ec2_eni from pep8 legacy files

remove a couple unused variables in main()

fix the documentation

* fix yaml
2017-03-17 16:26:49 -04:00
Sloane Hertel
8ccde6fbb0 [cloud] make docs for ec2_group rules more clear (#22701)
make ec2_group pep8

removed ec2_group from pep8 legacy files
2017-03-17 16:14:20 -04:00
Sloane Hertel
a4552c11b3 allow groups parameter to be noticed as an empty list (#22707)
make iam.py pep8

remove iam.py from pep8 legacy files
2017-03-17 16:11:48 -04:00
Andrea Scarpino
c80d696cec win_file: fix error when creating an existing dir (#19070)
If something else created the dir New-Item will throw an exception and
the task will fail. Check the existing file and as long as it's a dir,
we don't need to error out.
2017-03-17 09:33:57 -07:00
René Moser
b90517caf9 cloudstack: implement config overloading and ENV vars for API auth (#22724)
* cloudstack: fix connection by ENV vars and configs overloading

* cloudstack: pep8 cloudstack module_utils

* cloudstack: allow api_url to be set in ini config

* docsite: explain ENV vars support as written in python-cs for ansible
2017-03-17 11:01:43 +01:00
Tom Melendez
f5f6cf467e [GCE] Support default credentials (#22723)
Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.
2017-03-16 17:10:07 -07:00
Matt Davis
ffa4f0c427 Suppress Windows Add-Type debug noise (#22722) 2017-03-16 15:44:42 -07:00
Andreas Mosti
1fa7a3db27 Added example of removing the standard website and port 80 binding (#22457) 2017-03-16 14:52:28 -07:00
Brian Coca
c6dedea1a6 corrected docs 2017-03-16 17:36:03 -04:00
Jens Carl
cd39ff9996 Add parameters to limit replace to certain section of the file
Add parameters 'after' and 'before' to limit the replacement/remove of
lines to a certain section of the file.
2017-03-16 17:34:56 -04:00
Brian Coca
4319ddd5de allow users to control group var merge order (#22580)
* allow users to control group var merge order

With ansible_group_priority var at each group will determine merge order with siblings,
falling back to sorted names when priority is equal as it did before.

Parent/children relationships still work as they did and have higher precedence than priority

* move priority setting to groups, sourc indep

* now both inventory and play group follow priority

* removed double exception handling
2017-03-16 14:02:43 -04:00
jralbert
5334814396 Cast syslogport value from getenv as int (#22664)
SysLogHandler requires an int for port, but getenv produces a string.
Cast return from getenv as int to overcome this mismatch.
2017-03-16 10:38:55 -07:00
Ilya Simonenko
dba8edf735 cloud: docker: Fixes #22638 load image to memory when archive_path provided (#22642) 2017-03-16 10:06:19 -07:00
Brian Coca
4fb8b03f05 added docstring to get_hosts_left 2017-03-16 12:15:17 -04:00
Brian Coca
6a4039e169 readded !vault-encrypted for backwards compat
even though this was never documented someone might be using it
2017-03-16 12:13:15 -04:00
Brian Coca
6b46cc5c73 added new 'order' directive to sort hosts in play
fixes #10964
2017-03-16 12:13:29 -04:00
Ricardo Carrillo Cruz
6e56a61535 Add ios_banner module (#22687)
With unit and integration tests.
2017-03-16 16:35:44 +01:00
Dag Wieers
895664f539 vmware_guest: Fix "KeyError: 'changed'" (#22564)
Due to how the result-dictionary is being used, in some codepaths it would have an empty dictionary.
This then is problematic if the code expects the 'changed' key later on.

I also improved the docs a bit, by clearly marking the parameter names and URL in the documentation.
2017-03-16 10:55:07 -04:00
Ondra Machacek
7a3b6ca37c cloud: ovirt: fix ovirt_nics profile search (#22684) 2017-03-16 08:27:30 -04:00
Brian Coca
dd8d699981 namespace facts (#18445)
* namespace facts

always namespace facts, make the polluting of 'main' conditional on config

* updated to 2.4

* Update intro_configuration.rst
2017-03-15 17:12:16 -07:00
Brian Coca
0c44959800 added new tests any and all (#22665)
* added new tests any and all

* updated code names
2017-03-15 18:09:25 -04:00
Brian Coca
eb0b1e149d warn when failed to match host pattern
fixes #11934
2017-03-15 18:06:21 -04:00
Dylan Silva
9ffad27319 Changed supported_by from curated to community (#22654) 2017-03-15 14:28:33 -07:00
Dylan Silva
4c8da5ad49 changed supported_by from curated to community (#22656) 2017-03-15 14:28:15 -07:00
Dylan Silva
049946b26f Dropped openwrt module from curated to community (#22657) 2017-03-15 14:28:02 -07:00
Brian Coca
517cdbe22a better 'role detection' for dwim (#22513)
* better 'role detection' for dwim

possible fix for #21735

* fixed unmatched paren

* pep does not like the denting
2017-03-15 16:01:04 -04:00
Brian Coca
39ba55e5ac corrected host group ancestor management 2017-03-15 15:46:58 -04:00
Brian Coca
7b0f765a57 made error slightly more neutral in case of 'local' 2017-03-15 15:32:30 -04:00
Brian Coca
273786d0bd simplified pattern matching, fixed ungrouped (#22523)
* simplified pattern matching, fixed ungrouped

ungrouped was ignored for patterns, now it is usable again

* even simpler
2017-03-15 14:25:46 -04:00
John R Barker
08d9a5932f metadata_version 2017-03-15 17:28:52 +00:00
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