Commit graph

13480 commits

Author SHA1 Message Date
Ben Doherty
409f67584e Fix write mode for ZipFiles ('wb' is invalid!) 2016-12-08 11:34:36 -05:00
Ben Doherty
3465375e42 Drop extra double-quote from documentation 2016-12-08 11:34:36 -05:00
Ben Doherty
2e1ce01dff Initial commit of extras/archive module.
This manages compressed files or archives of many compressed files. You can maintain or update .gz, .bz2 compressed files, .zip archives, or tarballs compressed with gzip or bzip2.

Possible use cases:

* Back up user home directories
* Ensure large text files are always compressed
* Archive trees for distribution
2016-12-08 11:34:36 -05:00
Robin Schneider
f408a4db02 Use HTTPS instead of legacy HTTP for ansible.com (#2636)
Mechanical edit done by this "one-liner":

git ls-files -z "$(git rev-parse --show-toplevel)" | xargs --null -I '{}' find '{}' -type f -print0 | xargs --null sed --in-place --regexp-extended 's#http://www\.ansible\.com#https://www.ansible.com#g;'

Related to: https://github.com/ansible/ansible/issues/16869
2016-12-08 11:34:36 -05:00
James Tanner
3170180049 Consolidate to one module and use new arg spec 2016-12-08 11:34:36 -05:00
James Tanner
7b65afa83e add examples 2016-12-08 11:34:35 -05:00
James Tanner
222f9bc08a Remove print statements 2016-12-08 11:34:35 -05:00
James Tanner
d051701359 fix tabs 2016-12-08 11:34:35 -05:00
James Tanner
474b52ae47 Add the guest state module 2016-12-08 11:34:35 -05:00
James Tanner
855a408718 Rename module 2016-12-08 11:34:35 -05:00
James Tanner
4722144acf Add return data example 2016-12-08 11:34:35 -05:00
James Tanner
91e2c5e0ea Add template deployer 2016-12-08 11:34:35 -05:00
Matt Clay
d18720adde Enable FreeBSD tests on Shippable. (#2648) 2016-12-08 11:34:35 -05:00
Brian Coca
f6dc39a478 updated docs, version is 2.2 and explain changes 2016-12-08 11:34:35 -05:00
Jonathan Davila
94e95d8795 Updates to Sendgrid Module (#1275) 2016-12-08 11:34:35 -05:00
Ryan Brown
ea5cd3941b Improve module docs (#2638) 2016-12-08 11:34:35 -05:00
Matt Clay
210b6be359 Enable Windows tests on Shippable. (#2635) 2016-12-08 11:34:35 -05:00
Adrian Likins
c0e316209b Add RETURN docs for github_key (#2634) 2016-12-08 11:34:35 -05:00
Adrian Likins
66716d58a2 Use %s string formatting in system/timezone.py (#2632)
This module was using python 2.6 string .format().
To enable the module to run on python2.4, replace
the .format formatting with '%s' based string formatting.

There was also a use of a 'filename' variable in the
NosystemdTimezone.get() method that was never set.

An import of 'os' was also added for clarity.
2016-12-08 11:34:35 -05:00
Adrian Likins
fa1b0312eb Add a 'requirements:' field to homebrew doc (#2630)
homebrew.py and homebrew_cask.py make use of python
2.5 and 2.6 features like string .format() method.
2016-12-08 11:34:35 -05:00
Adrian Likins
292d788d09 Use py2.4 compat string formatting in github_key (#2633)
Replace the use of python 2.6+ string .format() method
use with the python 2.4 compatible '%s' formatting to
make the github_key module py2.4 compatible.
2016-12-08 11:34:34 -05:00
Brian Coca
fdb8d11958 send json string to api instead of dict 2016-12-08 11:34:34 -05:00
Brian Coca
1e5ca511d6 now using type=json which takes care of str/dict 2016-12-08 11:34:34 -05:00
Brian Coca
02ee352951 fixes and refactoring of s3_bucket
policy should now accept and handle correctly both data structures or JSON strings
removed unused tag_set var
refactored code to make conditions clearer
rebased to allow for ceph changes, left ceph update on todo list
2016-12-08 11:34:34 -05:00
Ryan S. Brown
1997c17c65 Correct version_added for github_key module - was 2.0, now 2.2 2016-12-08 11:34:34 -05:00
Robert Estelle
f7dc107822 New module - github_key (#692)
Create github_key module for managing GitHub keys.
This module creates, removes, or updates GitHub access keys.
2016-12-08 11:34:34 -05:00
William Albert
0d144532d4 Add modules to support Google Cloud DNS (#2252)
This commit adds modules that can manipulate Google Cloud DNS. The modules can create and delete zones, as well as records within zones.
2016-12-08 11:34:34 -05:00
Anton Ovchinnikov
c6ea196a8c Fix check mode for blockinfile when 'create: yes' is specified (#2413)
Make the module more semantically similar to lineinfile when
the destination does not exist. This fixes #2021.
2016-12-08 11:34:34 -05:00
Ruslan Kiianchuk
3537ce57f1 Add support for reiserfs (#2551)
* Add support for reiserfs

Create commands mapping for Reiserfs tools.
2016-12-08 11:34:34 -05:00
Aaron Brady
46f9706b9d Add active and inactive states to the lvol module (#1974)
* Add `active` and `inactive` states to the lvol module

* Honor the previous state of the changed variable

* Move active/inactive states to active boolean parameter

* Bump version_added to make Travis happy

* Avoid bailing early is size isn't specified

* Add invocation examples

* Move "no size" up for code clarity
2016-12-08 11:34:34 -05:00
Tim Rupp
9ca08e5596 Bugfixes and code style (#2627)
A number of coding conventions have been adopted for new F5 modules
that are in development. To ensure common usage across the modules,
this module needed to be updated to reflect those conventions.

Additionally, this patch fixes a couple bugs in the module that were
preventing it from being idempotent.
2016-12-08 11:34:34 -05:00
Toshio Kuratomi
ef184e93a4 Update imports 2016-12-08 11:34:34 -05:00
Toshio Kuratomi
30ed5f620a Update examples in the documentation to yaml syntax 2016-12-08 11:34:34 -05:00
pascalheraud
f3f40095f1 Fixed multiline string formatting issues 2016-12-08 11:34:34 -05:00
pascalheraud
eb5fcca80b Changed order of import and documentation to fix the build 2016-12-08 11:34:34 -05:00
pascalheraud
a68ef49ff6 Fixed RETURN documentation 2016-12-08 11:34:34 -05:00
pascalheraud
e3524fbf00 Update ovh_ip_loadbalancing_backend.py
Changed to ansible 2.1
2016-12-08 11:34:33 -05:00
pascalheraud
876fc4bc6d Changed licence and main() 2016-12-08 11:34:33 -05:00
pascalheraud
643cef988e Fixed bad location and import Fixed bad type of default value for timeout 2016-12-08 11:34:33 -05:00
pascalheraud
88c5d84d72 Fixed the module to be compliant with pep8 2016-12-08 11:34:33 -05:00
pascalheraud
40d3a66368 Removed unnecessary moduleChanged=False Added missing exceptions handling 2016-12-08 11:34:33 -05:00
pascalheraud
2a251a9e26 Added a timeout param to prevent infinite loop while waiting for completion of a task. 2016-12-08 11:34:33 -05:00
pascalheraud
f05f74d9f6 Fixed module from review inputs : - Caught the exception from import ovh to provide a proper message to the user - Removed unuseful brackets - Added a else to check the state instead of two if - Changed the module to be added to 2.0 - Added exceptions handling for all APIs calls with a clear message including the return from the API.
And :
- Fixed dependency of OVH api to 0.3.5
2016-12-08 11:34:33 -05:00
pascalheraud
926c80328d Added OVH Ip loadbalancing module for managing backends 2016-12-08 11:34:33 -05:00
Ricardo Carrillo Cruz
97f75a774a Add os_zone module (#2173)
This module allows to create OpenStack Designate zone objects
2016-12-08 11:34:33 -05:00
Ricardo Carrillo Cruz
3cb76ce047 Add os_recordset module (#2240)
This module allows to manage OpenStack Designate recordsets.
2016-12-08 11:34:33 -05:00
Loïc
0a968bbe35 Fix argument type to bool. By default shutdown_sessions is always true then it should'nt. (#2596) 2016-12-08 11:34:33 -05:00
Naoya Nakazawa
8b64309051 datadog_monitor add no_log secret key (#2525) 2016-12-08 11:34:33 -05:00
Alex Paul
195bedee56 Add datadog_monitor param for datadog tags (#2541)
* Add datadog_monitor param for datadog tags

* Rename tags, add version_added
2016-12-08 11:34:33 -05:00
Kaz Cheng
2886d3d9ec Fix a number of issues around detecting nat gateways, how (#1511)
routes_to_delete is detected, propagating_vgw_ids and checking if
gateway_id exists.
2016-12-08 11:34:33 -05:00
Sander Dijkhuis
140157d86a Fix reference in known_hosts doc (#2563)
The format is described in sshd(1), not ssh(1).
2016-12-08 11:34:33 -05:00
Alvaro Aleman
54d40fe557 Ensure os_project checks the right domain (#2519) 2016-12-08 11:34:32 -05:00
David Edmonds
ec0fff49ea Pass through YAML parsed object instead of string. (#2347) 2016-12-08 11:34:32 -05:00
Matt Clay
41d68b5498 Remove duplicate requirements. 2016-12-08 11:34:32 -05:00
Alvaro Aleman
0a9cdf647a Make os_user_role respect domain when querying for projects (#2520) 2016-12-08 11:34:32 -05:00
gyurco
bc8e8173ad mongodb_user: properly guard user adding with try...except (#2582)
The user adding part is not properly guarded by a try...except
block, so pymongo exceptions can escape from it.
Also there's a double-guarding where roles are given.

Fixes: #2575
2016-12-08 11:34:32 -05:00
lorijoan
d0c2db9c5b Update cs_volume module to fix typo on force attribute (#2592)
fixes #2590
2016-12-08 11:34:32 -05:00
Donovan Jones
d8311b95e8 Update comment for ttl parameter to indicate 2-119 seconds is invalid (#2546) 2016-12-08 11:34:32 -05:00
gyurco
5c35d55b3c mongodb_user: fix ssl_cert_reqs exception (#2573)
If ssl is not enabled, but ssl_cert_reqs is passed to pymongo, an
exception occures.

Fixes: #2571
2016-12-08 11:34:32 -05:00
Colin Hutchinson
51eb68b4d7 consul.py doc fix (#2589)
Small fix to the examples section of consul.py
2016-12-08 11:34:32 -05:00
Kaz Cheng
ef23cf31b0 Add ability to create event and query acl rules for a given acl token (#2076) 2016-12-08 11:34:32 -05:00
Tim Rupp
03006d89c4 Adds style conventions to bigip_monitor_http (#2564)
A number of coding conventions have been adopted for new F5 modules
that are in development. To ensure common usage across the modules,
this module needed to be updated to reflect those conventions.

No functional code changes were made.
2016-12-08 11:34:32 -05:00
Robin Roth
3307769ba0 zypper cleanup checks for failure/diff (#2569)
* zypper cleanup checks for failure/diff

* move check for changed/failed from functions back to main
* handle all cases identially
* generate diff together

* fix module name
2016-12-08 11:34:32 -05:00
Ryan S. Brown
4b2563ff4e iam_server_certificate_facts: Correct call to get_server_certs 2016-12-08 11:34:32 -05:00
Allen Sanabria
885bdf3a4e iam_server_certificate_facts: list all certs
If a server name isn't passed, retrieve all server certificates by
default. Change return value to a dict with the server_cert_name being
the key.
2016-12-08 11:34:32 -05:00
Allen Sanabria
f5fd2a418f iam_server_certificate_facts: change except to python 2.6 syntax 2016-12-08 11:34:32 -05:00
Allen Sanabria
0445e22383 iam_server_certificate_facts: Retrieve attributes from server certificate
This module will allow you to retrieve all the attributes
related to a server certificate.
2016-12-08 11:34:32 -05:00
Bulat Gaifullin
99c24a535f Add ipmi modules for power and boot management (#2550)
* Add ipmi modules for power and boot management

* ipmi_power - module for power management
  Parameters:
    - name
    - port
    - user
    - password
    - state
    - timeout

* ipmi_boot - module for boot order management
  Parameters:
    - name
    - port
    - user
    - password
    - bootdev
    - state
    - persist
    - uefi

* Fixed copyright

* Supported check mode

Also added description for RETURN

* Added ipmi to list of excludes of tests for python2.4

* added no_log=True for secrets

* added type for port and mark bootdev as required field
2016-12-08 11:34:31 -05:00
Dag Wieers
17faa8f2c4 wakeonlan: New module to send out magic WOL packets (#2271)
* New module wakeonlan to send out magic WOL packets

For a local project managing desktop Windows systems at an elementary school, we want to send out wake-on-lan packets to all systems before continuing using Ansible.

That is the purpose of this module.

PS We can make this module idempotent by implementing arping support using scapy. At some point I may add this, at this time I simply plan on using wait_for to check if the system is online.

* Improved documentation and notes

* Improve the documentation a bit

* Fix Travis warnings and review remarks

* Fix exception handling to support both python2 and python3

* Documentation changes
2016-12-08 11:34:31 -05:00
Sudheer Satyanarayana
fa18bbbdb0 which not who (#2557)
minor text fix
2016-12-08 11:34:31 -05:00
Andrii Radyk
26d34c1d61 Add zypper refresh support in zypper module (#2411)
* added zypper refresh support

* removed trailing symbols
* added forced zypper refresh support similar to update_cache for apt module

* removed unnecessary blocks and cleaned up the logic for refresh

* added update_cache as alias for refresh to be similar to apt/yum module

* update zypper module according to comments
2016-12-08 11:34:31 -05:00
Robin Roth
54ceee9da2 Check for zypper version before using options (#2549)
* priority needs zypper version >= 1.12.25
* gpgcheck needs zypper version >= 1.6.2
* output warnings if version not sufficient for option
* fixes #2548
2016-12-08 11:34:31 -05:00
mathieu bultel
579b2a8f2e Add os_stack module for create, update and delete stack (#2002)
* Add os_stack module for create and delete stack

* Add ansible module for creating and deleting heat stack
* Parameters:
  - stack name
  - template
  - environment_files (list)
  - parameters (dict)
  - timeout
  - rollback
  - state: In a near futur I would like to improve
    this module by providing a way updating the stack
    if already exist. Shade doesn't offer this functionality
    AFAIK

* Add update stack feature

* Update added_version and return doc

* Add copyright for os_stack module

* Add wait user choice and minor fixes

* Remove Todo for Shade 1.8.0 and bad line example

* Add documentation for the return values

* Fix type on return value

* Fix yaml syntax

* Cast message to string instead

* add missing check mode
2016-12-08 11:34:31 -05:00
Patrick Ogenstad
826459c5f2 New module asa_command (#2306) 2016-12-08 11:34:31 -05:00
Patrick Ogenstad
b3b6aec0b2 New module asa_config (#2307) 2016-12-08 11:34:31 -05:00
Patrick Ogenstad
606c70ff7c New module asa_template (#2308) 2016-12-08 11:34:31 -05:00
Patrick Ogenstad
71eb181da4 New module asa_acl (#2309) 2016-12-08 11:34:31 -05:00
René Moser
b7d80b1f3b consul_acl: fix docs, arg_spec not matching docs (#2544) 2016-12-08 11:34:31 -05:00
Peter Oliver
9b96585085 Handle empty IPS publishers (#2047)
It turns out it's possible to set up a publisher with no URIs.  Handle
this gracefully.
2016-12-08 11:34:31 -05:00
Rene Moser
83f263d132 Revert "travis: workaround false negative test failure (#2362)"
This reverts commit d056879088.
2016-12-08 11:34:31 -05:00
Kevin Borgolte
026dc4f957 Fix Kubernetes API auth regression from 393e43b8 (#2503)
* Fix Kubernetes API auth regression from 393e43b8

Commit 393e43b8 renames url_username and url_password to username and
password, which breaks authentication to a Kubernetes API endpoint as
fetch_url() in ansible.module_utils.urls relies on url_username and
url_password being set.

* Add aliases for clustering/kubernetes.py

- username as alias for url_username
- password as alias for url_password
2016-12-08 11:34:31 -05:00
Nate Prewitt
842394b1ab removing | from description so docs render properly in RTD (#2533) 2016-12-08 11:34:31 -05:00
Robin Roth
6fdad49309 allow overwrite_multiple with more than 2 repos (#2481)
2.1 introduces overwrite_multiple, which can overwrite more than one
exisiting repo (with matching alias or URL). Allow more than 2 repos to
be overwritten, since openSuSE allow more than one repo with the same
URL if the alias is different.
2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
04d049cee9 Fix lxd_container and lxd_profile document to be rendered properly 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
a06179e08b Change command to check python is installed 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
382f9b0999 Fix initializing err in _get_err_from_resp_json 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
e3c402ada3 Remove debug parameter and add logs in return object when invoked with -vvvv 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
25ed6a7564 Fix sending request 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
364ad3b8e5 Remove support for type=profile from lxd_container module 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
be391b4d1f Add lxd_profile module 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
9d13552999 Create LXDClient and LXDClientException 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
4630540ca9 Unify unix_socket_path and url to the url parameter 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
008dd0236d Use metadata.err for error msg and return logs only when debug is true 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
c671ff5fda Add debug parameetr and put logs in result when debug is true or module failed 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
42401ea2c3 Use timeout only for chaging state and getting IPv4 addresses 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
22957e79f6 Check argument choices according to type value 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
bb69e7030c Add support for connecting via https with a client certificate 2016-12-08 11:34:30 -05:00
jpic
684291d461 s/_needs_to_change_config/_needs_to_change_container_config/ 2016-12-08 11:34:30 -05:00
Hiroaki Nakamura
1079de804c Support for creating, modifying, renaming and deleting a profile 2016-12-08 11:34:29 -05:00
Hiroaki Nakamura
d26c84d620 Fix invalid YAML in document 2016-12-08 11:34:29 -05:00