Commit graph

14549 commits

Author SHA1 Message Date
Ricardo Carrillo Cruz
ae630fff56 Refactor iosxr_template to network_cli plugin 2017-01-17 20:01:56 +01:00
Brian Coca
ba97a34bb3 minor doc fix 2017-01-17 10:16:32 -05:00
peay
222e1c97be Fixes #19883: Handle INI files without ending newline (#20016) 2017-01-17 10:16:25 -05:00
Brian Coca
d1ebd8f411 created subcat for openvswitch 2017-01-17 10:07:14 -05:00
Steve Pletcher
1a33fa0dd2 Don't escape angle brackets in the Slack module (#19980)
* (Fixes #19579) Don't escape angle brackets in the Slack module

* Remove ampersands from escaped characters, update docs

* typo
2017-01-17 09:51:38 -05:00
Will Thames
5ee5593cbf Improve ansible-galaxy handling of role versions (#12904)
* Improve ansible-galaxy handling of role versions

Ensure that role versions are considered when deciding
whether or not to (re-)install a role.

Issue a warning when the version of a dependency conflicts
with the version of an already installed role

Display what version of a role is being installed
Show the versions when upgrading/downgrading a role.

Implements #11266

* Improve force logic for galaxy version changes

Ensure that force is required to change role versions
2017-01-17 09:49:16 -05:00
Tim Rupp
8d5ee33e0f Adds fallback_persistence_profile and all_policies to BIG-IP virtual servers (#20261)
This patch adds the ability for users to specify a fallback persistence
profile for their virtual servers and a list of policies for the VS.
2017-01-17 07:47:39 +00:00
Rene Moser
b9a1400df5 doc: changelog: new module dimensiondata_network 2017-01-17 08:20:35 +01:00
David M. Lee
b8dd4dd52b amazon: added boto3_conn to GUIDELINES.md (#20305)
* amazon: added boto3_conn to GUIDELINES.md

* Update GUIDELINES.md

Light edits. Good to go.
2017-01-16 21:00:45 -08:00
sirkubax
12628ed7e5 fix https://github.com/ansible/ansible/issues/20183 (#20217)
* fix https://github.com/ansible/ansible/issues/20183

* make it nicer
2017-01-16 21:05:54 -05:00
Matt Davis
883f7ed197 ensure win_reboot warnings value is a list 2017-01-16 14:28:18 -08:00
Matt Davis
c8970fc4e6 Merge branch 'win_reboot-fix' of git://github.com/dagwieers/ansible into HEAD 2017-01-16 14:11:27 -08:00
Adam Friedman
4b6201ce0d New dimensiondata network (#19325)
* Add dimensiondata_network module

* Remove shebang

* Use Python-2.4-compatible exception handling.

* Ok, add shebang back in.

* Add 'mcp_user' and 'mcp_password' parameters'.

As suggested by @abadger, these values will now be used for CloudControl credentials, but will fall back to existing behaviour (environment variables and dotfile).

* Minor fixes based on feedback for ansible/ansible#19325.
2017-01-16 13:49:10 -08:00
Maarten Bezemer
1f1379ea61 Support forced SSL-verified connection with given CA certificate 2017-01-16 12:17:10 -08:00
Toshio Kuratomi
09ceaafd42 Removal wildcard import and unnecessary exception retrieval 2017-01-16 12:12:00 -08:00
Brian Coca
06e30485ea moved univention into cloud 2017-01-16 14:43:17 -05:00
Dag Wieers
7be39ca553 Windows modules: Add -type "path" to path parameters (#20282)
This PR is based on #20164 functionality to specify the parameter type
(e.g. as done for python modules).

In this case only -type "path" has a specific meaning, as it will expand
environment variables for paths. Which is typically done on Windows.

So you can do:

  - win_copy:
      src: files/some.doc
      dest: '%UserProfile%\My Documents'
2017-01-16 11:39:58 -08:00
Matt Davis
b773ae4291 Preserve exit code in winrm exec (#20166)
Raw winrm exec discards the exit code from external processes- this change preserves the exit code if present.
2017-01-16 11:21:48 -08:00
James Cammarata
af96cba7e1 Fix for bug in Conditional for older jinja2 versions
Fixes #20309
2017-01-16 13:06:09 -06:00
Dag Wieers
b369ea570a win_shortcut: Create, manage, remove Windows shortcuts (#20164)
* win_shortcut: Create, manage, remove Windows shortcuts

This modules manages Windows shortcuts and all its properties.

The module is idempotent and supports check-mode.

This relates to #19694

* Changes required after @nitzmahone review

* Added -type "path" to parameter definitions

* Small fixes

- Add conversion from window style name to window style id
- Fix error message output (Why didn't the original work ?)
2017-01-16 10:51:56 -08:00
Brian Coca
32b7f85f6c clarified docs on timezone module 2017-01-16 11:05:36 -05:00
Jasper Lievisse Adriaanse
b0e23049a0 Timezone: Support for FreeBSD/NetBSD and improve SmartOS handling (#20268)
* Tweaks for SmartOS:

- prevent attempting from changing timezone in the global zone (read-only)
- provide meaningful error message in the unlikely case smtools isn't present

* Add support for FreeBSD and NetBSD to timezone module
2017-01-16 10:54:39 -05:00
nerzhul
90d94bd6db vmware_guest: doc fix 2017-01-16 10:09:52 -05:00
Dag Wieers
439ef46898 vmware_guest: networks definition as a list (#19857)
* vmware_guest: networks definition as a list

Currently the networks definition is a dict, with the network range as
key. This is problematic if the network information is coming from other
sources.

This patch turns the networks definition into a list.

This fixes #19222.

* Remove the option to provide either netmask or network

It is more concise if there's only one way to configure it.
So provide both `ip` and `network`.

(I also re-indented a section due to a useless check)

* Fix bugs reported by @dav1x

Thanks !
2017-01-16 09:30:37 -05:00
Dag Wieers
20df62ab31 vmware_guest: Various fixes and changes
Changes missing from a poor merge probably, but also a few new things.
- Reordered the examples from important (often used) to less important
  (fewer used)
- Remove the new_name: option and replace it with the uuid/name
  combination for renaming + added example
- Added an example using the VM uuid instead of the VM name
- Also check whether the password is non-empty (rogue merge)
- Wait for all tasks to finish (to be sure the new facts reflect the
  state)
- Ensure that on failure we still set the change-bit
- Moved a set of functions that are unused (related to transfering
  files to guest, or running commands) to module_utils
2017-01-16 09:26:17 -05:00
Peter Sprygada
efda0323be fixes the timeout source in network_cli (#20302)
Timeout should be taken from the play context not the constants.  this change
updates network_cli to source timeout from the correct place
2017-01-16 09:15:46 -05:00
Dag Wieers
bd793b85bf Fix typo in my example (#20293)
I noticed I was missing the -f flag to make this work correctly.
2017-01-16 14:12:34 +00:00
jayme-github
f813a8474b Allow the use of paths like ~/.project.json (#16064)
* Allow the use of paths like ~/.project.json

This makes it easy to manage credentials files outside of the repo
(and/or user specific credentials).

* Fix format string to log credentials_file.
2017-01-16 09:10:16 -05:00
Peter Sprygada
2c197343f3 adds timeout check when network_cli run without persistence (#20299)
* checks if signal hander is set and sets it if not (will be set if coming
  from ansible-connection)
* will now timeout long running commands based on DEFAULT_TIMEOUT setting
2017-01-16 08:32:45 -05:00
Mohammed Naser
ca9387dc0b Pop password from os_user params
The password param conflicts with os-client-config's password grabbing.
The rest of the params really probably should also be popped - but
keeping this just to password for now. Will follow up with a change that
does an audit of all the os_ modules

This patch was previously contributed by @emonty to the former
ansible-modules-core repo however since the merge, it was closed
and not completed.  This patch includes the necessary changes cleaned
up to work with the latest release of Ansible.  This has been
tested to work internally
2017-01-14 08:32:27 -05:00
James Cammarata
b7cdc21aee Additional security fixes for CVE-2016-9587 2017-01-13 16:22:53 -06:00
Tobias Wolf
f1ae2eb4f1 systemd: Add boolean option to enable --no-block
In our environment we have custom services that need to be stopped and
restarted very gracefully to not interrupt active sessions.

A stop job, depending on the state, can take up to 20 minutes until the
process exits. It simply reacts to SIGTERM with a graceful shutdown.

By default, systemctl blocks until the job has completed, which leads to
Ansible hanging on this task for up to 20 minutes.

Thankfully systemctl supports the `--no-block` flag which lets the job
continue in the background.

This PR adds support for that flag as the `no_block` boolean option.

From the man page:

   --no-block
       Do not synchronously wait for the requested operation to
       finish. If this is not specified, the job will be
       verified, enqueued and systemctl will wait until the
       unit's start-up is completed. By passing this argument,
       it is only verified and enqueued. This option may not be
       combined with --wait.
2017-01-13 16:26:06 -05:00
Dag Wieers
1ad55ec9de Consistent path attribute for file-related modules
Not all file-related modules consistently use "path" as the attribute to specify a single filename, some use "dest", others use "name". Most do have aliases for either "name" or "destfile".

This change makes "path" the default attribute for (single) file-related modules, but also adds "dest" and "name" as aliases, so that people can use a consistent way of attributing paths, but also to ensure backward compatibility with existing playbooks.

NOTE: The reason for changing this, is that it makes Ansible needlessly harder to use if you have to remember that e.g. the xattr module requires the name attribute, the lineinfile module requires a dest attribute, and the stat module requires a path attribute.
2017-01-13 15:49:42 -05:00
Brian Coca
08ef0aee25 removed bad iteration from execute meta (#19958)
* removed bad iteration from execute meta

most of the tasks should not be iterated over, others needed to include unreachable hosts
fixes #19673

* corrected host var
2017-01-13 14:51:39 -05:00
Jasper Lievisse Adriaanse
e9038d8dc1 Add support for OpenBSD and SmartOS to timezone module 2017-01-13 14:45:54 -05:00
Jasper Lievisse Adriaanse
64692e7a89 Annotate boto3 dependency in the standard location. 2017-01-13 14:36:17 -05:00
Matt Martz
8928adf62e Updates uri to use six for isinstance comparison for py3 compatibility (#20239) 2017-01-13 13:16:21 -06:00
Matt Martz
d25a70846f Only add Content-Type if not specified in headers. Fixes #20046 (#20234)
* Only add Content-Type if not specified in headers. Fixes #20046

* Update documentation to indicate body_format will not override Content-Type if specified in headers
2017-01-13 13:19:38 -05:00
Jasper Lievisse Adriaanse
0988de8c4c Remove outdated requirements and add a note trying to reflect reality. 2017-01-13 12:16:23 -05:00
Brian Coca
1880027da1 better cleaning of module return, also warn
disallow any internal _ansible_ vars and also warn when those or any on the restricted list are attempted
harden and parameterize key cleaning
2017-01-13 12:12:56 -05:00
Mark Maglana
b598575213 module_utils/dimensiondata (#17604)
* Add dimensiondata.py in module_utils

This is required by the Dimension Data modules under
lib/ansible/modules/extras/cloud/dimensiondata

* Implement change requests from PR #17604

Requests are listed in:
 https://github.com/ansible/ansible/pull/17604#pullrequestreview-819380

* Changes requested for Ansible PR #16704.

As noted by @abadger:

- Use Py3-compatible import syntax for ConfigParser.
- Use comprehensions instead of filter function.
- Fix buggy comparison of False to 'False'.
- Change b_dict to block_dict.
- Fix invalid syntax for except block that handles multiple exception types.

* Additional changes requested for Ansible PR #16704.

As noted by @abadger:

- Missed a couple of places where we still had invalid exception-handling syntax.

* Remove shebang from dimensiondata.py (Ansible PR #16704).

* Switch to MCP_USER / MCP_PASSWORD.

This is consistent with other Dimension Data Tooling.

* Implement get_configured_credentials.

* Fix typo (missing comma).

* Unify get_credentials implementation (ansible/ansible#17604).

get_credentials will now look in environment, dotfile, and module configuration for credentials (in that order).

* Resolve user Id and password from module configuration before trying environment or dotfile (ansible/ansible#17604).
2017-01-12 20:50:43 -08:00
Ivan Bojer
c7638be525 new module to manipulate DAG table (#19885)
* new module to manipulate DAG table

* changes based on the review comments; remove unecessary if statements; change returned value docstring
2017-01-12 22:27:09 -05:00
Ivan Bojer
8b674cd903 Panos check module to test FW readiness to accept new configuration(s) (#19882)
* new module to check FW readines

* added missing parameter

* changes based on the review comments; remove unecessary if statements; change returned value docstring
2017-01-12 22:26:19 -05:00
Ivan Bojer
05adfd6d8c new panos module that allows for NAT policy creation (#20161)
* - panos module that allows NAT policy creation

* remove terciart operator

* minor doc changes
2017-01-12 22:24:29 -05:00
Peter Sprygada
6ef9a0af4b fixes up doc strings in ios modules (#20210) 2017-01-12 21:48:58 -05:00
Will Thames
4bfed06514 Make ModuleArgsParser more understandable (#13974)
* Make ModuleArgsParser more understandable

Both comments and method names for handling new/old
style parameters are switched around

Made comments and method names reflect actual code paths
taken.

* Further improve mod_args.py comments

Ensure output formats are correctly documented,
remove some of the 'opinion' about which formats are
valid, and try and clarify the situations under which
certain code paths are hit.

Stop talking about the YAML command-type form as 'extra
gross' when it's the documented example form for command
etc.!
2017-01-12 18:22:54 -08:00
defunct
92b26a28b8 Update ec2_ami_copy to boto3, fix encrypted support (#20009)
* Update ec2_ami_copy to boto3, fix encrypted support

* docs, backwards compat options, more verbose exception handling

* minor option changes, fix documentation

* update documentation
2017-01-12 19:39:32 -05:00
Peter Sprygada
fec773a2b4 better error handling and log messages in network_cli (#20204) 2017-01-12 19:31:35 -05:00
Matthew Dawson
0ffacedb3e Fixes #3539 "win_robocopy does not return changed properly" (#20158)
* Fixes #3539 "win_robocopy does not return changed properly"

Remove .win_robocopy from $result so that ansible can see the values properly. This also matches up with the existing documentation.

* Update documentation to match new return values
2017-01-12 15:04:14 -08:00
Jasper Lievisse Adriaanse
232cb764da Add RETURN section, fix identation and apply flake8 recommendations (#20148) 2017-01-12 14:58:07 -08:00