Commit graph

16480 commits

Author SHA1 Message Date
René Moser
64a9794997 ovirt_storage_connections: fix RETURN, fixes build (#25517)
* ovirt_storage_connections: fix RETURN, fixes build, pep8
2017-06-08 17:57:01 -04:00
Ondra Machacek
f762c61816 cloud: ovirt: Add support to specify multiple LUNs (#22866) 2017-06-08 23:24:12 +02:00
Adrian Likins
dde3dac9f8 Support NetBSD 7.1+ style ifconfig -a output (#25442)
* Support NetBSD 7.1+ style ifconfig -a output

network facts on NetBSD after 7.1 cvs would fail
because of format changes in 'ifconfig -a' output.

update code to support new and old format.

add unit tests for both based on
examples from Bruce V Chiarelli.

* wrap use of interfaces.keys() in list() for py3 compat
* sort interface ids for stability
2017-06-08 17:09:22 -04:00
Ondra Machacek
d7b3ace0b0 cloud: ovirt: Fix upgraded state of the ovirt_hosts module (#25169) 2017-06-08 16:58:54 -04:00
Ondra Machacek
c17efa4aaa cloud: ovirt: Add possibility to specify opentack volume type (#22361)
This PR fixes: https://github.com/ansible/ansible/issues/21580
2017-06-08 16:53:26 -04:00
Ondra Machacek
c17e206b0e cloud: ovirt: add module to manage storage connections (#22239) 2017-06-08 16:52:20 -04:00
Tareq Alayan
013f759775 ovirt_vms: add ability to specify storage domain (#24012)
When creatinf a new VM from template, you can specify the storage domain
name and disk format where to copy all the template disks

For example if you want to create a VM from template into specific
storage domain you can do the following:

  ovirt_vms:
    name: vm_on_my_storage_domain
    cluster: my_cluster
    template: my_template
    operating_system: other_linux
    type: server
    cpu_cores: 1
    cpu_sockets: 1
    state: stopped
    clone: True
    storage_domain: my_nfs_storage
    format: COW
2017-06-08 16:52:07 -04:00
Tareq Alayan
a401f6a8e9 ovirt_nics.py: support adding nic to template (#24020)
before this change adding nic was allowed only to a vm. Now it is
possible to add it to template.

example:
- name: test add nic to template
  ovirt_nics:
    auth: "{{ ovirt_auth }}"
    state: present
    template: mytemplate
    name: nic1
    interface: virtio
    profile: ovirtmgmt
    network: ovirtmgmt
2017-06-08 16:44:44 -04:00
Katerina Koukiou
b8c4ca75cf cloud: ovirt: Add option to register template (#24830) 2017-06-08 16:44:15 -04:00
Ondra Machacek
a1a246e85d cloud: ovirt: add ovirt_scheduling_policies_facts module (#25055) 2017-06-08 16:43:54 -04:00
Ondra Machacek
436b8c9791 cloud: ovirt: add localfs option to storage_domains module (#25439) 2017-06-08 16:43:40 -04:00
Adrian Likins
f4128746d3 Cmdline fact uefi 23647 (#25446)
* Fix ansible_cmdline initrd fact for UEFI

UEFI cmdline paths use \ path sep which would
get munged by cmdline fact collection.

* Make CmdLineFactCollector easier to test

extract the parsing of the /proc/cmdline content to
_parse_proc_cmdline()

add a wrapper method for get_file_content _get_proc_cmdline()

Add unit tests of _parse_proc_cmdline based on examples
from issue #23647

Fixes #23647
2017-06-08 16:03:29 -04:00
James Cammarata
781bb44b02 Include the original YAML error in syntax error messages 2017-06-08 12:51:37 -05:00
Brian Coca
db15528de3 added example for those with ansible_connection set 2017-06-08 13:40:48 -04:00
Brian Coca
d325fa00cc corrected docs 2017-06-08 13:18:03 -04:00
Brian Coca
a2cff554ee allow more 'backwards compatible' vars_plugins (#25451)
* allow more 'backwards compatible' vars_plugins

* better version relying on exceptions
2017-06-08 12:47:40 -04:00
Jordan Borean
89caef8fb6 win_environment: Added tests and return info in document (#25064)
* win_environment: Added tests and return info in document

* fixing up some yaml issues

* some more things I should have detected

* fixing up test tag name
2017-06-08 17:39:10 +01:00
Branko Majic
6ce7448ca4 New module: Add module for manipulating the dconf database (system/dconf) (#23015)
* Implemented dconf module for manipulating and reading the dconf database.

* Fixed remote execution for the dconf module when state=present by wrapping the invocation with dbus-launch (dconf requires a running DBus user session). Updated documentation to mention external module dependencies.

* Fixed remote execution for the dconf module when state=absent by wrapping the invocation with dbus-launch (dconf requires a running DBus user session).

* Updated dconf module implementation to make it more robust:

- Detect running D-Bus session, and reuse that one if possible.
- If detection fails, try launching process via dbus-run-session to avoid
  left-over D-Bus processes.
- As last resort run dbus-launch, and clean-up after the changes have been
  made.
- Updated documentation to mention new dependencies and to be more explicit
  about module limitations.

* Fixed PEP8 errors reported by ansibot in dconf module.

* Updated dconf module implementation:

- Fail early if psutil library is not available on the system.
- Go through all of user's processes to locate a running D-Bus daemon.
- Test potential D-Bus session bus address before deciding to (re)use it.
- Added a couple of debug statements.
- Updated documentation to include dbus-send as requirement.

* Updated dconf module implementation:

- Simplified module, removing all code for handling dbus-daemon, as discussed in
  a community meeting.
- Module user must ensure that D-Bus user session is available and specified
  either via module parameter or environment variable.
- Updated documentation for the change.

* Updated dconf module implementation:

- Add back ability to detect running D-Bus user session.
- Fail-back to using dbus-run-session if running session could not be detected.

* PEP8 fix for dconf module.

* Updated dconf module implementation:

- Introduce correct examples for Gnome DE.
- Rename existing examples to mark them as Cinnamon-specific.
- Use self.module.get_bin_path instead of custom check for dbus-run-session.
- Fixed typo in method documentation for DconfPreference.reset().
2017-06-08 09:12:34 -07:00
Brian Coca
8badfcd7fe make sure ini handles children no matter the order
fixed 'pending declarations' assumption that children only have 1 parent
fixes #25488
2017-06-08 10:37:19 -04:00
George Nikolopoulos
a00089c341 New module: manage Citrix Netscaler service configuration (network/netscaler/netscaler_service) (#25129)
* netscaler_service initial implementation

* Changes as requested by reviewers

* Skip some tests if under python2.6 and importing requests library

* Change option "operation" to "state"

* Remove print statements from netscaler module utils

* Catch all exceptions during login

* Fix fail message

* Add common option save_config
2017-06-08 08:33:32 -06:00
Eric D Helms
2220362a5f fixes(#25299) Don't fail when creating a Foreman organization (#25396) 2017-06-08 12:49:40 +01:00
marlier
6bd1681203 RabbitMQ 3.6.7 changed a couple of response codes (#22715) 2017-06-08 12:33:30 +01:00
Dag Wieers
6e98dbbfd7 wait_for: PEP8, imports, cosmetics (#24634)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)

This fixes #19781
2017-06-08 11:06:11 +02:00
Chris Houseknecht
20bddde669 docker_service: Forward stderr-based output from docker-compose (#25456)
PR #5165 at https://github.com/ansible/ansible-modules-core/pull/5165
adds redirection and capture of stdout during execution of
docker-compose.

This doesn't necessarily catch all errors, since some are printed to
stderr and lost.

This extends the redirection to include stderr, and does minor string
processing to attempt to find a 'useful' message to present as the
final Ansible error.
2017-06-07 23:30:26 -04:00
Matt Martz
13c070948b Fix pep8 issues in profile_roles (#25458)
* Fix pep8 issues in profile_roles

* Fix reduce import
2017-06-07 21:20:59 -05:00
Brian Coca
2e920d724d fixed import, had moved 2017-06-07 19:11:45 -04:00
Tennis Smith
1d15ca739f feat: add role profiler (#20092)
* feat: add role profiler

* fix: use 2.0 api version
2017-06-07 18:38:32 -04:00
Ricardo Carrillo Cruz
b3e8c48d4b New module: Add support for Arista EOS vlan (network/eos/eos_vlan) (#25355)
* WIP Add eos_vlan module

* Fix docstrings

* Fix pep8 issues

* Add active/suspend states logic

* Add integration tests for eos_vlan

* Fix map_config_to_obj on EAPI

* Sixify iteritems

* Add platform agnostic net_vlan integration tests
2017-06-07 23:47:28 +02:00
Brian Coca
88f0e0b882 removed spurious warning (traling ,)
also removed unused improt
2017-06-07 15:16:47 -04:00
Matt Martz
004e99316c Allow template files to be vaulted (#22951)
* Allow template files to be vaulted

* Make sure to import exceptions we need

* get_real_file can't take bytes, since it looks specifically for string_types

* Now that we aren't using open() we don't need b_source

* Expand playbooks_vault docs to include modules that support vaulted src files

* Add vaulted template test
2017-06-07 14:16:03 -04:00
Adrian Likins
24f2a616dd Fix manual reference for dmidecode (#25444)
dmidecode(1) does not exist, dmidecode(8) does exists.

(rebased from https://github.com/ansible/ansible/pull/24106)
2017-06-07 13:56:15 -04:00
Dag Wieers
656db3707c win_defrag: New module to defragment local volumes (#23140)
This module performs defragmentation on local Windows volumes.

This module requires PR #23131 for list parameter support.
2017-06-07 10:52:28 -07:00
Jay LaCroix
449cf43926 Add Antergos to OS_FAMILY_MAP as fork of Arch Linux. (#25363)
Support 'Antergos' as a target for distribution facts.
2017-06-07 13:46:29 -04:00
Matt Kunkel
3d21965e73 Fix HPUX cpu facts on HP Integrity VM's (#25369)
Skips cpu facts not returned by machinfo on HP Integrity VM's.

Fixes #25368
2017-06-07 13:43:54 -04:00
Daniele Lazzari
eda6a6baee New module: Add module to add/remove a network static route on windows (windows/win_route) (#23405)
* adds win_route windows module

* fix documentation indent

* fix documentation pep8 issues

* fix documentation issues

* genaral code review

* changed 'supported_by' in doc, supports_check_mode removed

* use of powershell cmdlet instead of route command, destnation in CIDR format, adds check mode support

* adds win_psmodule module

* documentation review

* documentation review

* removed files accidentatlly pushed

* add integration tests, add return in documentation

* add conditional statement in test, add os requirementes in documentation

* fix documentation

* fix os check in tests
2017-06-07 10:25:50 -07:00
Mike Wiebe
b76acc8ce8 Fix nxos_vpc idempotence issues (#25219)
* Fix nxos_vpc idempotence issues

* Remove legacy-file pep8 now passing
2017-06-07 10:35:08 -04:00
Toshio Kuratomi
80c1765653 When cleaning up the AnsiBallZ tempdir we need to not fail if the tempdir wasn't created
If the temp directory creation failed in mkdtemp then temp_path is never
given a value.  This would lead to a NameError exception which would
obfuscate the original error (out of disk space being a common one).  By
catching NameError, python will raise the original exception as we want.

Fixes #17215
2017-06-07 06:38:42 -07:00
Evan Kaufman
3d1701b959 Fixed subsection replacement with before/after patterns
* using a _named_ capture in our assembled pattern, since before/after could potentially contain their own parenthesized captures
* ensuring we only replace against the named capture in question
* removing some duplication in the regexp replacement, that was introduced in ansible/ansible#22535
* fixed edge case of before/after not matching file content to replace

Fixes ansible/ansible#24840
2017-06-07 01:45:34 -07:00
Abhijeet Kasurde
5bd4e01533 Update documentation of pamd module (#24712)
Updated explanation and documentation of new_module*
in pamd documentation

Fixes #24516

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 08:48:42 +01:00
Abhijeet Kasurde
577d01baa3 fortios: module_utils: Fix typo in close call (#24853)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 08:26:25 +02:00
Abhijeet Kasurde
8a4a04b016 logicmonitor: remove closed statement, used for py2.4 compat (#25240)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 08:23:29 +02:00
Abhijeet Kasurde
26349033c1 Add FreeIPA module for managing DNS records (#25203)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 08:06:31 +02:00
Abhijeet Kasurde
5b03e55440 Misc typos in azure_rm_deployment (#25372)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 07:57:24 +02:00
Abhijeet Kasurde
5cf66ceda0 Misc typo in azure_rm_virtualmachine (#25376)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 07:56:28 +02:00
Abhijeet Kasurde
65bd5c4d56 Refactor github_hook module (#24391)
* PEP8 fixes
* Refactoring for fetch_url call
* Removed un-used code

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 07:52:03 +02:00
Abhijeet Kasurde
677a6c2982 Pep8 fixes for ejabberd_user and jboss (#24586)
* PEP* Fixes
* Refactor code

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-07 07:35:22 +02:00
René Moser
894b86a467 cloudstack: cs_zone_facts: add tests and fix pep8 (#25407) 2017-06-07 00:35:24 +02:00
Ondra Machacek
bcc5bffd8e cloud: ovirt: Fix searching of network in datacenter (#25248) 2017-06-07 00:25:10 +02:00
KATO Tomoyuki
cbe87d0af7 doc: fix missing period for hostname.py (#25392) 2017-06-07 00:21:27 +02:00
James Cammarata
483df9c5f8 Imports and includes (#25399)
Initial commit to split includes into static imports/dynamic includes

This implements the new include/import syntax for Ansible 2.4:
* include_{tasks,role,variables} = dynamic
* import_{playbook,tasks,role} = static

The old bare `include` will be considered deprecated, as will any use of the `static: {yes|no}` option.

This also adds docs for import/include and reorganizing the "Playbook Reuse" section of the documentation.
2017-06-06 16:39:48 -05:00
Will Thames
3549391673 New facts module for AWS VPC Peering (#19910)
* New facts module for AWS VPC Peering

* Update documentation and region catch for boto3

* Update ec2_vpc_peering_facts for python3 and flake8

Update version to 2.3
Update for python3 exception handling
Use ansible_dict_to_boto3_filter_list rather than duplicating
implementation
Use camel_dict_to_snake_dict on results for ansible standard results
Tidy up flake8 compliance

* Support check_mode for ec2_vpc_peering_facts

Add supports_check_mode to the module declaration

* Fix latest Ansible standards

Update version to 2.4
Add ANSIBLE_METADATA
Move imports
2017-06-06 14:42:58 -04:00
Tim Rupp
6f2c543a33 Updates and refactors the bigip pool module to use REST (#25234)
This patch updates the bigip_pool module to use F5's REST API
as well as includes unit tests.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_pool.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_pool/tasks
2017-06-06 18:54:02 +01:00
Tim Rupp
855fd98be6 Adds the bigip_config module to Ansible (#25191)
This patch adds the bigip_config module to Ansible to support
merging SCF files, saving running configs, resetting config
and validating SCF configs
2017-06-06 18:52:33 +01:00
Sloane Hertel
7bebc83dcf module_utils/ec2: fix boto3 tags to remove (#25277)
* Fix boto3 tags to remove; unable to remove a list of strings, need list of {'Key': key}

* pep8 fix

* cannot bugfix due to differences in AWS APIs - just document

* add more info to guidelines for using compare_aws_tags
2017-06-06 11:02:15 -04:00
Matt Kunkel
b2b0938aff Check / Skip cores for AIX5 Series (#25364) 2017-06-06 10:43:13 -04:00
Trishna Guha
f6a4803669 New module: platform agnostic way to manage local users on network devices (network/net_user.) (#25259)
* Add net_user platform agnostic module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Integration test for net_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* modify eos_user module to support name param as alias to username

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Test collection of users

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-06 20:05:08 +05:30
Toshio Kuratomi
15104acc00 Fix json.dumps to do something sensible with sets. 2017-06-06 07:15:39 -07:00
Toshio Kuratomi
be4e7a05fa remove_values could hit the recursion limit
When operating on arbitrary return data from modules, it is possible to
hit the recursion limit when cleaning out no_log values from the data.
To fix this, we have to switch from recursion to iteration.

Unittest for remove_values recursion limit

Fixes #24560
2017-06-06 07:15:39 -07:00
Tim Rupp
0133a5a763 Adds the bigip_gtm_pool module (#25275)
This module is used to manage GTM(DNS) pools in a BIG-IP.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_gtm_pool.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_gtm_pool/tasks
2017-06-06 11:25:55 +01:00
Ricardo Carrillo Cruz
1476e30c26 Add net_vlan platform agnostic module (#25252)
* Add net_vlan platform agnostic module

* Add vlan_id param

* Fix documentation and examples

* Remove whitespace
2017-06-06 11:45:02 +02:00
Ganesh Nalawade
6215922889 Add support for cliconf and netconf plugin (#25093)
* ansible-connection refactor and action plugin changes
* Add cliconf plugin for eos, ios, iosxr, junos, nxos, vyos
* Add netconf plugin for junos
* Add jsonrpc support
* Modify network_cli and netconf connection plugin
* Fix py3 unit test failure
* Fix review comment
* Minor fixes
* Fix ansible-connection review comments
* Fix CI issue
* platform_agnostic related changes
2017-06-06 13:56:25 +05:30
Toshio Kuratomi
6e473a432b Document the encoding parameter for the replace module
Add encoding parameter for replace to changelog
2017-06-05 19:39:56 -07:00
Evan Kaufman
49fe53266f Replace - workaround for non-utf8 text (#24861)
* Workaround for non-utf8 text exceptions
* Added encoding param, using to convert from bytes to text and back

Fixes ansible/ansible#24521
2017-06-05 19:35:18 -07:00
Ramon
bc4a8dbaa4 fix proposal for issue #25151: [python3] pip failed to create virtual env when using custom command (pyvenv) (#25241)
* Fix proposal for bug 25151

* Fix proposal for bug 25151 - pip module, pyvenv validation

* Graceful fail when virtualenv_python is defined and virtualenv_command uses the venv module

* Making sure that venv is being used as a modue "-m venv"

* Updating syntax in validations

* Updating syntax in validations - fixing stupid typo "[)"

* Raising an error if virtualenv_command is pyvenv or venv and virtualenv_python is used

* trailing whitespace gone, pyvenv, venv validation and docs update

* cleaning whitespaces from blank lines
2017-06-05 17:03:15 -07:00
Brian Coca
cf59f9765e fix script inventory plugin
fixes #25371

there is still better ways to do this, but this will 'unbreak' devel for now
2017-06-05 18:26:11 -04:00
Brian Coca
9831e1597f minor protection against bad config 2017-06-05 16:46:51 -04:00
Matthieu Simonin
8432ba80c1 Add the email confirmation option to gitlab_users (#25134)
`confirm` is an optional parameter ìn gitlab API[1].
It indicates whether the email of the user has to be confirmed.

[1]: https://docs.gitlab.com/ce/api/users.html#user-creation
2017-06-05 21:47:52 +02:00
Esteban Echeverry
e8e73e0edd Use to_text helper function to handle bytes and unicode 2017-06-05 11:58:19 -07:00
Esteban Echeverry
66040e0c9d Fix unicode errors in json.load method
HTTPConnection returns bytes in Python 2. An explicit
decoding is needed in Python 3 to ensure compatibility.
2017-06-05 11:58:19 -07:00
Abhijeet Kasurde
01eb70bdee Remove unwanted params from function call (#25348)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-05 11:04:39 -04:00
Karthik Suresh
448f6de6bd Minor change in comment sentence of shell (#25336)
Removing actually as "actual" mentioned two times in the sentence does not look good.
2017-06-05 10:52:57 -04:00
Abhijeet Kasurde
38775c5363 Fix a minor typo in network_common (#25328)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-05 10:50:27 -04:00
Michael De La Rue
e28845018d [cloud] New module: AWS API Gageway module (#20230)
* Ultra basic api-gateway module based of lambda.py

* Ultra basic deployment added to api-gateway module

* ApiGateway module Allow creation of APIs, more documentation and better return value

* ApiGateway module incorporate review feedback

* ApiGateway module flake8 cleanup

* APIGateway module - more review fixes.

* slightly better messages in api_gateway module

* AWS api_gateway module - try to improve messages in case of exceptions

* rename api_gateway module to aws_api_gateway as discussed in PR 20230

* aws_api_gateway - Allow delivery of swagger either as text or dictionary.

* aws_api_gateway module - introduce 'unit' tests, improve imports using them and small fixes

* aws_api_gateway module - move path expand_user to avoid early typecheck

* aws_api_gateway - version means version of metadata not module - fix to 1.0

* aws_api_gateway module - Rely on module_utils.ec2 for imports & path type for expanduser / cleanups

* aws_api_gateway module - heavy cleanup and refactor of code + cloud retry functionality.

* api_gateway_module - failing test case for handling more than one deployment in succession and API deletion

* add TooManyRequestsException to AWSRetry exception list - makes API deployment work.

* api_gateway_module - Fixes for various review comments + errors from various linters

* api_gateway_module - Fixes for more review comments + linter error

* api_gateway_module - Major refactor into sensible functions - create_response becomes configure_response

* api_gateway_module - should be working under python3; remove test exclusion

* api_gateway_module - finish off remaining review fixes - use ansible defaults and fix mutually exclusive

* api_gateway_module - attempt to improve handling of botocore errors in python3

* api_gateway_module - implement state=absent / API deletion
2017-06-05 10:25:56 -04:00
Adrian Likins
087b5277f1 Make ServiceMgrFactCollector.is_systemd_managed() a static method (#25316)
Fix 'hostname' module Facts is not defined by updating
'hostname' module to use it.

is_systemd_managed() was previously on the module_utils.facts.Facts
class that no longer exists.

Fixes #25289
2017-06-05 09:39:05 -04:00
René Moser
53c46df323 cloudstack: new module cs_network_acl_rule (#25325)
* cloudstack: new module cs_network_acl_rule
* fix doc errors
2017-06-03 14:34:09 +02:00
Rene Moser
fd3c92504a ansible-doc: fix exception for required field 2017-06-03 14:32:05 +02:00
jhawkesworth
de8c7c22d2 Add 'exists' to win_stat return docs (#25146)
* Add 'exists' to win_stat return docs

Fix 25107 by adding documentation for 'exists' return value in win_stat module

* Added missing filename attribute to RETURN

Also made the path and filename sample values consistent.
2017-06-03 09:11:09 +01:00
René Moser
3e02b19b98 cloudstack: fix pep8 cs_project (#25322) 2017-06-03 01:42:03 +02:00
Brian Coca
4aeca601f4 corrected default inventory plugin order
default inventory plugin order now follows the hardcoded one in previous versions
yaml plugin shoudl run before ini to avoid ini being able to parse some yaml files succesfully.

fixes #25321
2017-06-02 18:47:07 -04:00
Sebastian Kornehl
5d0340a9e3 datadog_monitor: Idempotence fix (#19217)
* Added matching_downtimes to list of ignores values. Fixes: #19216

* Added overall_state_modified to list of ignores values. Fixes: #19216
2017-06-02 23:36:32 +02:00
Sloane Hertel
6ba040591c {cloud} module_utils/ec2.py: get AWS access and secret keys from boto config (#24783)
* Get AWS access and secret keys from boto config

* matching the elif pattern

* avoid setting credentials as empty strings by checking os.environ.get('cred')

put comments back

* remove None from os.environ.get()
2017-06-02 17:05:15 -04:00
Sloane Hertel
77008707f5 ensure port is an int (#25310) 2017-06-02 15:15:47 -04:00
Matt Martz
99a30f8fdb Python3 fix for hashing in inventory plugins 2017-06-02 13:45:50 -04:00
Will Thames
84eea2a7e3 Support check_mode in ec2_vpc_nacl (#23112)
* Support check_mode in ec2_vpc_nacl

Ensure that all API calls that make changes are guarded by
`if not module.check_mode`.

* Update ec2_vpc_nacl_facts to latest pep8 standards
2017-06-02 13:15:38 -04:00
Kassian Sun
42d57782c0 Try to fix travis 2017-06-02 10:10:34 -07:00
Kassian Sun
981249daa1 use single line for-loop 2017-06-02 10:10:34 -07:00
Kassian Sun
b3a37da671 Add --sysctl support for cloud/docker_container 2017-06-02 10:10:34 -07:00
Trishna Guha
e90f1d6449 net_command platform agnostic module (#25249)
* net_command platform agnostic implementation

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add net_command platform agnostic module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add integration test for net_command module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix yaml issue
2017-06-02 22:03:27 +05:30
Dag Wieers
8cbed3c534 unarchive: PEP8, imports, cosmetics (#24654)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-06-02 16:22:52 +01:00
Ricardo Carrillo Cruz
955dc6e250 Add net_banner platform agnostic module (#25245)
* Add net_banner platform agnostic module

* Add integration tests for net_banner

* Remove default from required param

* Remove skip/python3 from net_banner aliases
2017-06-02 17:01:08 +02:00
Bill Nottingham
d0cc980223 Fix handling of extra_vars_path parameter. (#25272)
tower-cli process_extra_vars takes a list.
2017-06-02 09:29:53 -04:00
Ricardo Carrillo Cruz
64add28657 Platform agnostic net_system module (#24953)
* Platform agnostic net_system module

Also refactor the action network plugins for better code re-use

Still more refactoring to do once the connection plugin work is complete

* Replace importlib for imp

importlib is not available on 2.6, so we need to stick to imp

* Load action plugin via module metadata

* Better error message if no implementation is found

Now the plugin will show the module name and the network OS in the
error message

* Fix typo on documentation author line

* Fix pep8 issues

* Add missing options key on doc string and stringify version

* Return None in case module has no metadata

* Read module metadata only if it's a python module

Check for module suffix, if it's .py then read metadata.
Otherwise this fails on non-python modules, like Windows PS for example.

* Read metadata variable only if it's a python module

Fix referencing a variable before assignment

* Add action_handler to validate_modules metadata schema

* Pull metadata with plugin_docs get_docstring

Using load_source from PluginLoader is troublesome, it is not guaranteed
a module may be importable at the controller, e.g. if a module depends
on module_utils functions it won't work, because module_utils is not
in the sys path.
Rather than putting that module dependencies introspection, just
use plain parsing like plugin_docs get_docstring does as we only care
about reading ANSIBLE_METADATA.

* Add platform agnostic group of groups for integration tests

This will be the target for platform agnostic integration tests.

* Add integration tests for net_system

* Switch to action plugin inheritance from metadata driven action handler

As the metadata action driven action handler work is being worked on
on its standalone proposal+PR, let's just go back to have one
action handler per platform agnostic module.
Those action plugins will inherit from net_base.

* Add blank line to fix pep8

* Add aliases file to net_system integration test

This will avoid CI failure

* Fix integration tests for net_system

* Give more precedence to task network_os over inventory network_os
2017-06-02 14:06:38 +02:00
Silvio Tomatis
2ee2c8c1ab [cloud] ec2_elb_lb module Python 3 fix for string types (#24925)
* Python 3 compatibility for ec2_elb_lb module

* Use string_types from ansible.module_utils.six for python2/3 compatibility
2017-06-02 07:40:56 -04:00
Brandon Davidson
0e0c5328fa amazon/ec2_vpc_igw: Allow internet gateways to be tagged (#23782) 2017-06-02 07:38:50 -04:00
Dag Wieers
5553b20828 Collated PEP8 fixes (#25293)
- Make PEP8 compliant
2017-06-02 12:14:11 +01:00
Dag Wieers
2f33c1a1a1 find: PEP8, imports, cosmetics (#24646)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-06-02 08:43:40 +01:00
Dag Wieers
91ee93ce13 patch: PEP8, imports, cosmetics (#24649)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-06-02 08:42:40 +01:00
Ganesh Nalawade
85219dfdf3 Add support to fetch old style junos facts (#25250)
* Add support to fetch old style junos facts

Fixes #25050

Add support to fetch old style facts supported in Ansible <= 2.2
To fetch old style facts value `gather_subset` value shoule be `all`
and `junos-eznc` is required to be installed on control node as a
prerequisite.

* Remove unwanted import
2017-06-02 09:04:57 +05:30
Dag Wieers
4847613725 win_timezone: Add RETURN information (#24571)
And cosmetic cleanup.

This fixes ansible/ansible-modules-extras#1767
2017-06-01 16:43:08 -07:00
Peter Oliver
d0d33262cb pkg5 with latest shouldn't ignore absent packages (#23006)
When the state is set to `latest` we should install absent packages, not just upgrade already-instaled packages.

This should fix #22823.
2017-06-02 01:10:24 +02:00