Commit graph

18166 commits

Author SHA1 Message Date
Dag Wieers
04b5c17578 ini_file: PEP8 compliancy, pylint and docs (#30851)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 11:39:46 -04:00
Dag Wieers
5646d9960f xml: pylint fixes and docs
This PR includes;
- pylint fixes
- Documentation updates
2017-09-25 17:13:26 +02:00
jctanner
ada404d0ac vmware_guest: refactor spec serialization (#30819)
* Refactor spec serialization so that native types are evaluated last.
* Remove redundant type checks

Fixes #30818
2017-09-25 09:24:57 -04:00
Jose A. Rivera
e4c9ffa7e6 Set default value for Do-Until loop retries.
Fixes #17695
2017-09-25 09:57:25 +10:00
Beni Cherniavsky-Paskin
60d32f26d7 Followup tweaks to module EXAMPLES, per comments in #29039 (#30248)
* Drop hosts: tasks: boilerplate from EXAMPLES string

Should be just individual tasks
https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#examples-block

* Demonstrate url with port in one of the EXAMPLES
2017-09-24 04:55:19 -04:00
Brian Coca
b233f3f296 updated plugin docs (#30490)
* updated  docs

- for devs:
  - added inventory/vars section
  - made some updates to general section and other plugin types
- for users:
 - added 'user' plugin section to start describing the plugins
 - docs on types, what they are and how to use

- removed ref to deleted AUTHORS file
- corrected several typos/headers
- added descriptions to config.rst template
- ignore generated files for cli/plugins and config
- remove new generated files on `make clean`
- moved details from devguid and intro doc to plugin specific pages
- pretied up lookup notes
- changed precedence ref to not conflict config
- removed duplicate config data, as config is autogenerated and up to date
- put new plugins under playbooks
- added `pass` cause rst/python dislikes fractions
- removed dupe in .gitignore, alpha sorted to avoid moar dupes
- added try cause rst/python freaks out

* generate plugins into their own dir

only do plugins that support docs
use toctree from main plugins page
2017-09-22 23:19:50 -04:00
Brian Coca
7a312b6cf7 add ability to set default tags in config 2017-09-22 19:21:13 -04:00
Brian Coca
3f9a885b83 use set to quicken group host membership 2017-09-22 19:07:37 -04:00
Brian Coca
a819cfcad7 dont validate group names in yaml plugin 2017-09-22 19:05:32 -04:00
Toshio Kuratomi
86d8a4ff50 Fix encoding error with path to ssh
As reported on the mailing list, if ssh_executable (from a config
setting) contains nonascii characters then we could get a UnicodeError
here.  Transform into bytes before passing to subprocess so that
subprocess doesn't transform to bytes for us.
2017-09-22 15:31:21 -07:00
Anatoly Pugachev
e93ecac0da facts: fix SPARC cpu count on linux (#30261)
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor',
as a result "ansible_processor_vcpus" is always 1.
Add check element "ncpus active" to fix the issue.
2017-09-22 14:48:00 -04:00
Abhijeet Kasurde
e1dcfda172 Add processor_vcpu fact for Darwin (#30708)
Fix adds fact related to vcpu in Darwin's setup.

Fixes: #30688

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-22 14:32:59 -04:00
Adrian Likins
12404f470a Fix pkg_mgr fact on OpenBSD (#30725)
* Fix pkg_mgr fact on OpenBSD

Add a OpenBSDPkgMgrFactCollector that hardcodes pkg_mgr
to 'openbsd_pkg'. The ansible collector will choose the
OpenBSD collector if the system is OpenBSD and the 'Generic'
one otherwise.

This removes PkgMgrFactCollectors depenency on the
'system' fact being in collected_facts, which also
avoids ordering issues (if the pkg mgr fact is collected
before the system fact...)

Fixes #30623
2017-09-22 14:22:05 -04:00
jagmeetsingh91
d122a693d1 Feature to Specify AZURE blob storage type (#30660)
* Feature to Specify AZURE blob storage type

* Feature to Specify AZURE blob storage type

* Feature to Specify AZURE blob storage type

* Revert "Feature to Specify AZURE blob storage type"

This reverts commit 1d33997769ef3763a2eb434404c918134761635f.

	modified:   lib/ansible/module_utils/azure_rm_common.py

* Feature to Specify AZURE blob storage type
2017-09-22 10:17:00 -07:00
Hervé Beraud
cddff32792 [fix] pylint errors on modules packaging language (#30748)
* cleaning pylint errors for module packaging/language/*
2017-09-22 10:11:11 -07:00
Martin Krizek
8b416abb49 Allow for creating yum repo based on metalink only (#30736) 2017-09-22 13:44:26 +02:00
Abhijeet Kasurde
320e915a27 Add update_dns option for ipa_host module (#30646)
Fix adds update_dns option for ipa_host module.This option will
update DNS records of the host which is managed by FreeIPA DNS server.

Fixes: #30627

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-22 06:42:39 -04:00
Ganesh Nalawade
c86b945a7c Remove check_args for vyos modules (#30739)
*  With addition of provider sub option validation check_args()
   is no longer required.
2017-09-22 15:56:23 +05:30
Ganesh Nalawade
6d3307e472 Fix command argument typo in telnet module docs (#30731) 2017-09-22 12:13:58 +05:30
Ganesh Nalawade
d72eb08902 Fix nxos provider transport warning issue (#30610)
* Fix nxos provider transport warning issue

*  Add default value of transport arg in provider spec
*  Remove default value if transport arg in top level spec
   This ensure deprecation warning is seen only in case transport
   is given as a top level arg in task
*  Refactor nxos modules to reference transport value from provider
   spec

* Fix unit test

* Remove transport arg assignment in nxos action plugin

* As assigning transport value is handled in provider spec
  top level task arg assignment is no longer required
2017-09-22 10:32:25 +05:30
Sebastien Boyron
901bc2cffe Clean code, fd.close not required since open as fd if used; remove get_redirected_output from cleanup_redirection_tempfiles since output is not used
(cherry picked from commit ef51f00bbc9f24485915040b863c9d034d3c272c)
2017-09-21 20:01:13 -07:00
Toshio Kuratomi
f66c74915c Fix docker_service python3 incompatibility
Looks like this is supposed to operate on native strings so there's no
need to encode or decode at all here

Fixes #30354
2017-09-21 19:50:54 -07:00
Serge Nikalaichyk
dc8aedb274 Fix OS version check in win_power_plan (#30538)
* Fixed win_power_plan OS version check

* Original error message case
2017-09-22 06:23:02 +10:00
Jordan Borean
fb628acb6e win_domain_membership: added better error handling and basic tests (#30674) 2017-09-22 05:59:42 +10:00
Jordan Borean
59187358ee win_scheduled_task_stat: add new module to get stat on scheduled tasks (#30602)
* win_scheduled_task_stat: add new module to get stat on scheduled tasks

* fixed up linting errors and aliases file

* I should learn how to spell

* removing URI from test

* added state information for the task

* removed argument so task stays running
2017-09-22 05:59:06 +10:00
Dag Wieers
13bc5314ce win_shortcut: Add hotkeys examples to documentation (#30694)
This fixes #29110
2017-09-22 05:37:15 +10:00
Martin Krizek
cca4f94736 Mention all yum list options in docs (#30706) 2017-09-21 19:11:53 +02:00
Jiri Tyr
962528f511 Make clear the file must not contain .repo (fixes #30644) (#30656) 2017-09-21 19:11:07 +02:00
Reid Wahl
a22d7513a7 Remove invalid e.response from BotoCoreErrors in ec2_asg.py (#30121) (#30495) 2017-09-21 13:10:05 -04:00
Toshio Kuratomi
46e5c48f03 Split ec2_elb_* modules in service of rename/interface changes (#30532)
* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb
2017-09-21 13:06:14 -04:00
Brian Coca
236d13ac3a become flags are primary
with new configuration the sudo flags are always set and become cannot override,
switching to simle 'or' will result in become_flags working.

also sudo_flags are deprecated.
also changed from YAML null causing a 'None' str

fixes #30629
2017-09-21 10:00:52 -04:00
Tim Rupp
0eb0d96286 Adds module which allows users to manage partitions on a BIG-IP (#30577) 2017-09-21 14:48:51 +01:00
David Mahler
05ec0c9b8d Minor typo on deprecation warning (#30615) 2017-09-21 15:33:23 +05:30
Dag Wieers
2392934f48 More PEP8 fixes
Not sure why it missed those.
2017-09-21 05:16:49 +02:00
Dag Wieers
63c6afeaee Fix PEP8 issue 2017-09-21 05:07:49 +02:00
Dag Wieers
57b85198fe Add support for loop-tasks and improved output
This PR includes:
- Support for loop-tasks with proper subject/error content
- Improved output (and proper indentation)
- Complex data structures are now pretty printed
- Better selection of mail subject
2017-09-21 04:54:26 +02:00
Toshio Kuratomi
72bdf7aa7e Fix python3 and nonascii handling in inventory plugins
Fixes #30663
2017-09-20 19:39:15 -07:00
Brian Coca
f12c6e0946 moved from eval to templating + literal_eval 2017-09-20 21:35:02 -04:00
Dag Wieers
31e7d735a3 win_environment: Make this the Windows reference module
As discussed before we selected win_environment to the documentation,
and point to win_uri for a more advanced module.

If we want to make this the reference module, we have to get this one
absolutely right in every possible way.

This PR cleans up both win_environment and win_uri, and makes the
required changes to the windows module development section.
2017-09-21 03:20:17 +02:00
Brian Coca
9f4d73b699 fixed credstash docs 2017-09-20 20:52:52 -04:00
Hervé Beraud
b8e21bca46 [fix] sanity check errors on pylint 2017-09-20 17:38:55 -07:00
Reid Wahl
5f90169d73 modules/system/user.py: Change createhome to create_home (#30179) 2017-09-20 17:34:49 -07:00
Dag Wieers
f5dded59c2 mail: Fix charset encoding issue
This PR includes:
- An important fix to charset encoding of from address
- Documentation and examples cleanup
- PEP8 fixes
- Warning on insecure access
- Strict parameter typing
- More modern interface (using lists rather than comma, space or pipe-delimited strings)
- Warn on failure to send mail to some recipients
  ```
   [WARNING]: Failed to send mail to 'foobar': 550 5.1.1 <foobar>:
Recipient address rejected: User unknown in local recipient table
  ```
- Warn on failure to parse some headers
  ```
  [WARNING]: Skipping header 'Foobar', unable to parse
  ```
- Return failed recipients as return value
- Changed default encoding to utf-8
2017-09-21 01:07:53 +02:00
Brian Coca
c3ba579f6b constants as tuples instead of lists/sets 2017-09-20 16:57:45 -04:00
Will Thames
685267df73 Improve error handling for IdempotentParamaterMismatch (#30324)
Ensure all the return variables are correctly populated
and return more info in the error message
2017-09-20 16:42:13 -04:00
Brian Coca
d3e85bd045 dont override previous ini entries with defaults
corrected setting example, quotes mess up the regex
fixes #30633
2017-09-20 16:38:11 -04:00
Brian Coca
131d417c7a made callbacks backwards compatible (#30625)
* made callbacks backwards compatible

This fixes #30597 for those that were not inheriting from base.

Added deprecation notice so those callbacks get updated.

Callback must either inherit from base (directly or indirectly),
which already implements this or implement set_options themselves.

* added note about porting guide
2017-09-20 15:20:19 -04:00
Vladimir Utenkov
875153d503 [cloud][py3] Fix AttributeError in iam_policy on python3 (#30551) 2017-09-20 15:14:09 -04:00
Will Thames
d871964aca Ensure region is set in ec2_vpc_subnet_facts (#30399)
Make requested change in #30370
2017-09-20 11:23:48 -04:00
Adrian Likins
174cb1f33c Check number of vault secrets after setup. (#30520)
This is to catch vault secrets from config and
cli. Previously vault_password_file in config was
missed since it was added by setup_vault_secrets,
so check after setup_vault_secrets.
2017-09-20 10:31:36 -04:00