Commit Graph

207 Commits (c97e5088061a8b4c7420da1b9b5e30ad2ef82467)

Author SHA1 Message Date
Abhijeet Kasurde 806506c032 Pep8 fixes for taiga_issue module (#24143)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 09:58:59 -05:00
Rene Moser e9dfbdf7a2 rundeck_project: set ansible_metadata status to preview 2017-05-01 09:04:25 -04:00
nerzhul e09cd58a17 New module: rundeck_project
This module permits to manage rundeck project creation or removal through rundeck API
2017-04-28 10:39:17 -07:00
John R Barker 1d12f13612 dict, not dictionary (#24123) 2017-04-28 18:16:25 +01:00
nerzhul 96d2dbb11e Add rundeck_acl_policy module 2017-04-28 07:50:54 -07:00
Andrea Tartaglia d1517f997a fixed RETURN docs for modules (#24011)
* fixed RETURN docs for remaining modules

* updated proxymysql_mysql_users 'sample' to yaml dict

* fixed whitespace errors
2017-04-26 15:56:13 +01:00
Varadharajan 4540853a50 Pass CSRF token along with Jenkins POST requests (#23250) 2017-04-06 10:03:57 +01:00
Robin Roth 6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
2017-04-04 14:12:06 -04:00
Matt Clay 64458bc9a1 Fix deploy_helper join exception on no release. 2017-04-03 16:35:31 -07:00
Matt Martz 3164e8b561 E501 fixes (#22879) 2017-03-22 20:50:28 -05: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
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
Wayne Witzel III 703d6cb02f Ansible Tower job_wait module (#22160)
* Ansible Tower job_wait module

* clean up documentation and update code comment
2017-03-02 14:34:23 +00:00
Wayne Witzel III 7a5173486d Ansible Tower job cancel module (#22161)
* Ansible Tower job cancel module

* fix interpreter line
2017-03-02 14:33:56 +00:00
Wayne Witzel III 7d584f3090 Ansible Tower job list module (#22164) 2017-03-02 14:33:39 +00:00
Wayne Witzel III b2d4eeb293 Ansible Tower job_launch module (#22148)
* Ansible Tower job_launch module

* Added RETURN documentation and fixed import locations

* remove superfluos required attributes, make tags a list, and fix some typos

* only join tags if they are actually a list

* use isinstance instead of type, cleanup imports
2017-03-01 19:57:35 +00:00
Slezhuk Evgeniy e12daee5eb jira: comply with current pep8 rule set 2017-02-27 11:13:23 -05:00
Slezhuk Yevgeniy ea2b27f931 jira: (#21701)
- Add timeout param.
 - Some improvement on params description.
2017-02-27 11:56:58 +00:00
René Moser 06acf8ac2e nginx_status_facts: fix pep8 (#21963)
* nginx_status_facts: fix pep8

* remove from legacy files
2017-02-26 11:25:09 +01:00
Matt Martz 305c88700d PEP8 E712 fixes (#21916) 2017-02-24 16:49:43 -06:00
Matt Clay 4554e8d769 Remove unnecessary shebangs and execute bits. 2017-02-22 18:13:46 -08:00
Wayne Witzel III 4632b65086 add Ansible Tower role module (#21592)
* add Ansible Tower role module

* remove owner as choice from role paramenter
2017-02-20 15:18:43 -05:00
Wayne Witzel III 96772719ba add Tower JobTemplate module (#21681)
* add Tower JobTemplate module

* add host_config_key and remove defaults from required parameters
2017-02-20 15:18:04 -05:00
Wayne Witzel III a59c4d558d add Ansible Tower team module (#21593) 2017-02-20 15:16:32 -05:00
John R Barker 482f882798 Correct example 2017-02-17 17:31:05 +00:00
Wayne Witzel III 743d48af5c Add Tower Project module (#21479) 2017-02-17 16:19:33 +00:00
Wayne Witzel III 17f0dc3f4d Add Tower Group module (#21480) 2017-02-17 16:19:06 +00:00
Wayne Witzel III 17a2e5ead2 Add Tower Host module (#21482) 2017-02-17 16:18:40 +00:00
Wayne Witzel III ff3023e82b Add Tower Inventory module (#21483) 2017-02-17 16:18:11 +00:00
Wayne Witzel III 2b6c13f883 Add Tower Label module (#21485) 2017-02-17 16:17:41 +00:00
Matt Martz 7c00346714 Validate EXAMPLES as YAML 2017-02-15 13:01:43 -08:00
Wayne Witzel III f98d41c121 Ansible Tower user and credential module (#21020)
* rename tower config module parameters to avoid conflicts

* add Ansible Tower user module

* add Ansible Tower credential module

* remove errant hash from interpreter line

* friendlier error messages

* Update tower_verify_ssl defaults and module examples

* Update tower_verify_ssl default documentation

* Tower expects satellite6 not foreman
2017-02-15 16:59:03 +00:00
Dag Wieers f824b2ce8d Avoid having module documentation links to itself (#21329)
* Avoid having module documentation links to itself

A lot of modules use M(own_module) in their documentation causing a link
in the documentation to itself.

* Make note more clear now
2017-02-13 14:02:34 +00:00
Brian Coca 74e8aa22af no log passwords (#21229)
* no log passwords

* removed unneeded no_log
2017-02-10 15:13:59 -05:00
Matt Martz 829c0b8f62 Update validate-modules (#20932)
* Update validate-modules

* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup

* Clean up some left over unneeded code

* Update modules for new module guidelines and validate-modules checks

* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
2017-02-02 11:45:22 -08:00
Brian Coca 53cf229fb7 updated friendlier description 2017-01-30 13:42:58 -05:00
Wayne Witzel III 0e72f3bd71 Ansible Tower organization module (#20355)
* add Ansible Tower organization module

* skip Python 2.4 check for ansible_tower module

* make spec and doc match, extract tower auth helper method

* added auth params at module level

* support check mode

* extract check mode check to ansible_tower utils, add utils to 2.4 skip

* update interpreter shebang

* remove colon from docs

* no log for password, verify_ssl default to true
2017-01-30 13:42:32 -05:00
Matt Clay 10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
2017-01-29 07:28:53 +00:00
Matt Clay e2c0b375d3 PEP 8 cleanup. (#20790)
* PEP 8 E115 cleanup.
* PEP 8 E131 cleanup.
2017-01-28 01:39:40 -08:00
Matt Clay d0d1158c5e PEP 8 cleanup. (#20789)
* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
2017-01-28 00:12:11 -08:00
Matt Clay d913f69ba1 PEP 8 W291 whitespace cleanup. 2017-01-27 17:08:02 -08:00
Matt Clay 95789f3949 PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup.
* PEP 8 W293 whitespace cleanup.
* Fix whitespace issue from recent PR.
2017-01-27 15:45:23 -08:00
Matt Clay 63b1e0c277 Fix infrequent PEP 8 issues. 2017-01-27 14:06:21 -08:00
n0trax 42e63d429c Add workaround for shib2 and php modules 2017-01-26 12:26:59 -05:00
Jasper Lievisse Adriaanse cc5080bc8a Fix argument name to fail_json(), detail -> details
Also use to_native(e) instead of str(e) while here as str() itself
might throw an exception when handling non-ASCII chars as pointed
out by @abadger
2017-01-18 12:23:36 -08:00
Jiri Tyr 28050c1356 Update option desc of yum_repository module 2017-01-09 09:55:47 -05:00
James Hogarth 513466d309 add jenkins_script module for running arbitrary jenkins console scripts against a jenkins instance (#19640) 2017-01-06 15:12:24 +00:00
Andy Freeland 778a189a59 Fix letsencrypt remaining_days docs 2017-01-04 16:53:23 -08:00
Sergio Millan 08b671990d Fixing Issue#18995 2017-01-04 15:24:32 -08:00
Serhiy Martynenko c7637992fe Fix #19189 django_manage bug with python3 filter() returning iterator insted of list 2017-01-03 22:41:43 -08:00
Nehal J Wani e907622121 jenkins_plugin: doc: Specify version as string (#18858)
If the plugin version expected is, say '1.20', then specifying it
as...
    version: 1.20
... will make the YAML parser interpret it as a float, and the
value obtained by the module will be 1.2 instead of 1.20, which
will cause downloading of wrong version of the module.

This patch updates the docs so that users don't face this issue.
2016-12-21 07:32:23 +01:00
Michael Gugino 250f862573 Fix bug #5328 apache module loading (#19355)
* Fix bug #5328 apache module loading

Currently, the apache2_module module parses apache configs
for correctness when enabling or disabling apache2 modules.

This behavior introduced a conflict condition when transitioning
between mpm modules, such as mpm_worker and mpm_event.

This change accounts for the specific error condition raised
by ``apachectl -M``:
``AH00534: apache2: Configuration error: No MPM loaded.``
When loading or unloading a module with a name that contains 'mpm_',
apache2_module will ignore the error raised by apachectl if stderr
contains 'AH00534'.

Fixes #5328

* Add AH00534 warning

* Added changes from PR #5629

* Modified ignore_configcheck behavior
2016-12-14 13:18:19 -08:00
Carlos E. Garcia 0b8011436d minor spelling changes 2016-12-13 13:51:13 -05:00
Michael Scherer f9460f3c80 Use type='path' instead of 'str' for deploy_helper 2016-12-13 13:25:45 -05:00
Nehal J Wani ead0022255 Open temp file only once
mkstemp() returns a tuple containing an OS-level handle to an open file
(as would be returned by os.open()) and the absolute pathname of that
file, in that order.

This patch makes sure that the fd opened by tempfile.mkstemp() is
re-used and closed properly.
2016-12-12 10:11:46 -08:00
Irina Muchnik 9f58e69d63 Fix secure temp file creation (#19096)
* For realz this time

* Fix tempfile.mkstemp (#2)

* back to square one, removing temp file from the mix

* Adding temp back

* Adding tuple  back

* Adding another tuple back

* Trying to get around weird Jenkins behavior of blowing up when both .hpi and jpi file found

* Incorporating PR feedback

* Delete .hpi file instead of backing it up, some basic clean up

* Moving file deletion to the right location

* Blank lines. They always get me.
2016-12-10 09:33:34 -05:00
Fabio Alessandro Locati c3887138c5 Remove unused quotes (#19150) 2016-12-10 09:28:38 -05:00
Fabio Alessandro Locati 372352f35d Remove unused quotes - web_infrastructure/deploy_helper.py (#19157) 2016-12-10 09:24:36 -05:00
Fabio Alessandro Locati b811350f00 Native YAML - web_infrastructure/jira.py (#18832) 2016-12-09 08:48:59 -05:00
James Cammarata 011ea55a8f Relocating extras into lib/ansible/modules/ after merge 2016-12-08 11:35:18 -05:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati 4d2a3229d3 Call main in conditional way - web_infrastructure 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati 013be6fa1c Unquote urls in YAML - web_infrastructure (#5794) 2016-12-08 11:25:34 -05:00
Sam Doran 38c0769abb Examples syntax batch5 (#5622)
* Change example syntax on supervisorctl module

* Change example syntax or _ec2_ami_search module

* Change example syntax on cloudformation module

* Change example syntax on ec2 module

* Change example syntax on ec2_facts module

* Change example syntax on ec2_eip module

* Change example syntax on rds module

* Change example syntax on route53 module

* Change example syntax on s3 module

* Change example syntax on digital_ocean module

* Change example syntax on docker_service module

* Change example syntax on cloudformation module

* Change example syntax on gc_storage module

* Change example syntax on gce module

* Change example syntax on gce_mig module

* Change example syntax on _glance_image module

* Change example syntax on _keystone_user module

* Change example syntax on _nova_keypair module

* Change example syntax on _quantum_floating module

* Change example syntax on _quantum_floating_ip_associate module

* Change example syntax on _quantum_network module

* Change example syntax on _quantum_router module

* Change example syntax on _quantum_router_gateway module

* Change example syntax on _quantum_router_interface module

* Change example syntax on _quantum_subnet module

* SQUASH _quantum_subnet

* Add missing quotes
2016-12-08 11:25:31 -05:00
Sam Doran b56a9852ee Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module

* Change example syntax on cron module

* Change example syntax on group module

* Change example syntax on hostname module

* Change example syntax on seboolean module

* Change example syntax on selinux module

* Change example syntax on service module

* Change example syntax on sysctl module

* Change example syntax on systemd module

* Change example syntax on user module

* Change example syntax on debug module

* Change example syntax on fail module

* Change example syntax on include module

* Change example syntax on include_role module

* Change example syntax on include_vars module

* Change example syntax on pause module

* Change example syntax on wait_for module

* Change example syntax on apache2_module module

* > Change example syntax on django_manage module

* Change example syntax on htpasswd module
2016-12-08 11:25:31 -05:00
Michael Scherer 6806965bda Add no_log on password argument
Also do not use a wildcard import, for later refactoring
2016-12-08 11:25:26 -05:00
Rowan Wookey 914e205eb3 Added work around for Ubuntu Xenial calling php7_module php7.0 2016-12-08 11:25:23 -05:00
Michael Scherer e6b3c0d88a cleanup import for htpassword module
In order to ease future refactoring, we should avoid importing
'*' from ansible.module_utils.basic.
2016-12-08 11:25:22 -05:00
Vytis Banaitis 3149fdf158 Fix change status on django_manage collectstatic. (#4239)
Ignore blank lines in collectstatic output.
2016-12-08 11:24:55 -05:00
Jan Malte Gerth 9549883e78 reuse already split output for filtering (#4310)
there is no need to call out.split('\n') multiple times (line 275 and 277)
2016-12-08 11:24:49 -05:00
Brian Coca 992b999bde made password no_log in htpasswd 2016-12-08 11:24:40 -05:00
Michael Scherer 31126034b0 Port htpasswd to python3 compatible syntax (#3672) 2016-12-08 11:24:28 -05:00
n0trax 2c3caa33f7 Add checkmode and reduce code duplication (#2417)
- httpd removed from control_binaries
- check for enabled module after running a2enmod/a2dismod
- fail, if user has no permissions to run control_binary
- reduce code duplication
2016-12-08 11:24:26 -05:00
Brian Coca 6a309ee6ab added missing version_added 2016-12-08 11:24:19 -05:00
Pål Nilsen 7e18da79c3 Add optional force parameter for apache2_module (#3251)
* Add optional force parameter for apache2_module

Fixes #2499

* Add documentation for the force parameter

* Clarify in description that -f(orce) is a Debian parameter
2016-12-08 11:24:19 -05:00
Michael Scherer 2ae3dbcc6a Set the locales to avoid issue with screenscrapping
See https://github.com/ansible/ansible-modules-core/pull/2462 for

details on why this could happen
2016-12-08 11:24:16 -05:00
Toshio Kuratomi ecafdeeaa5 Set some module parameters to type=path 2016-12-08 11:24:08 -05:00
Graham Ullrich 61ac748bad Update django_manage documentation
As of Ansible 2.x, invocation of Django's ```manage.py``` requires a valid "shebang". Additionally, ```manage.py``` must be executable.
The old invocation was hardcoded as ```python manage.py ...``` while the new invocation is ```./manage.py ...```. See [this PR](https://github.com/ansible/ansible-modules-core/pull/1165).
This change allows more flexibility for which Python interpreter is invoked, but breaks existing deployment when ```manage.py``` is not properly configured. This documentation update adds a note explaining the new requirements for ```manage.py```.
2016-12-08 11:24:01 -05:00
Aaron Kurtz e3782689bc Remove 'cache_table' from required params
Starting in Django 1.7, the createcachetable command looks for cache
table names in the CACHES settings dictionary, so cache_table is no
longer required, but is still allowed.
2016-12-08 11:23:59 -05:00
Toshio Kuratomi 94d163f3ed When the password file does not exist and we're making sure the user isn't in the password file, change error into a warning
Warning catches typos in the filename.  Since the playbook is saying
"make sure this user doesn't have an entry" it makes more sense to warn
than to error.

Fixes #2619
2016-12-08 11:23:50 -05:00
Greg DeKoenigsberg 742b452dc1 @lorin stepping down as maintainer 2016-12-08 11:23:45 -05:00
Brian Coca 721f587e43 made output match multiline, as per posted code from @n0trax fixes #2081 2016-12-08 11:23:41 -05:00
Toshio Kuratomi e7a48cfb40 Use is_executable from its new location 2016-12-08 11:23:37 -05:00
Adam Ever-Hadani 8fb52e0a8b added support for 'collectstatic clear' in django_manage.py 2016-12-08 11:23:31 -05:00
Igor Khomyakov 9a599e35c1 fixed 'present' 2016-12-08 11:23:25 -05:00
Petros Moisiadis 68ef885e71 make migrate command idempotent with django built-in migrations
Django since version 1.7 has built-in migrations, so no need to have south installed with recent django versions. The 'migrate' command works with built-in migrations without any change, but the output is different than the output produced by south, which breaks idempotence. This commit fixes this.
2016-12-08 11:23:23 -05:00
James Cammarata 5efeeb156b Correctly default crypt_scheme in htpasswd 2016-12-08 11:23:20 -05:00
Chris Faulkner 18b157fbac Report change status on django_manage collectstatic. 2016-12-08 11:23:20 -05:00
Roetman, Victor fa612a14b1 apache2_module documetation update
requires a2enmod and a2dismod
2016-12-08 11:23:14 -05:00
Lucas David Traverso 20aa4c0cea django_manage: Use shebang in manage.py instead of hardcode python 2016-12-08 11:23:13 -05:00
Tagir Bakirov 8bd367eac7 added 'absent' option to supervisorctl 2016-12-08 11:23:13 -05:00
Igor Khomyakov 03483d2ea5 Check if a service exists 2016-12-08 11:23:13 -05:00
Chris Church 3048626d6e Update docs, add example of using django_manage to run other commands. 2016-12-08 11:23:13 -05:00
Alex King c8ae53b308 Extend hashes that can be specified by crypt_scheme beyond those understood by Apache/Nginx. 2016-12-08 11:23:12 -05:00
Lorin Hochstein abf314c258 django_manage: expand ~ in app_path parameter
Allow users to specify app_path parameters that contain ~, for example:

app_path=~/myproject
2016-12-08 11:23:11 -05:00
Toshio Kuratomi cb776e6190 Fix for when the password file did not exist previously 2016-12-08 11:23:11 -05:00
Jonathan Mainguy c9d1cc0ce3 remove blank lines from htpasswd file
used standard mktemp()
2016-12-08 11:23:10 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Kamil Madac 1ae799f361 Better error handling in supervisorctl module.
If execution of supervisorctl was not successful (exit code > 0),
module silently supress this error and returns changed = false,
which turns to OK task state.
This is very confusing, when supervisorctl needs authentication,
and credentials are not specified in module or are incorrect,
services are not restarted/started/stopped without raising an error.
2016-12-08 11:23:07 -05:00
Florian Apolloner a925a075a6 Added os.path.expanduser to app_path in django_manage 2016-12-08 11:22:51 -05:00
Brendan Jurd fdc52b8277 Add word boundary in apache2_module regexp
Add a word boundary \b to the regexp for checking the output of a2{en,dis}mod,
to avoid a false positive for a module that ends with the same text as the
module we're working on.

For example, the previous regexp r'.*spam already enabled' would also match
against 'eggs_spam already enabled'.

Also, get rid of the redundant '.*' from the end of the regexp.
2016-12-08 11:22:42 -05:00
Toshio Kuratomi 44354e31e4 Better error messages if a2enmod/a2dismod are not found 2016-12-08 11:22:38 -05:00
Peter Bwire 20eb900065 Update django_manage to add database option for migrate
Allow passing the database option to the django_manage module for migrations. This is usefull in situations where multiple databases are used by a django application.
2016-12-08 11:22:31 -05:00
Tomasz Kontusz 103b5954c7 supervisorctl: Don't try to start a starting program
Starting a "STARTING" program throws ERROR (already started),
so don't do that.
2016-12-08 11:22:31 -05:00
Michael DeHaan ef2a2b9093 package files 2016-12-08 11:22:22 -05:00
Michael DeHaan 213e518165 file extensions! 2016-12-08 11:22:22 -05:00
Michael DeHaan c7eec45b73 Restructuring. 2016-12-08 11:22:22 -05:00