Commit graph

14891 commits

Author SHA1 Message Date
Brian Coca
82337cf52a remove warning/deprecation keys after usage 2017-02-08 09:47:10 -05:00
Gaurav Rastogi
798972c72a Avi Networks Ansible modules. (#20415)
* Avi Networks Ansible modules.
Avi Version: 16.3.4

* Fixed Review comments
1. Changed description to be full sentences
2. Fixed Pep8 warnings.
3. Fixed comments and descriptions.

* 1. Fixed descriptions and messages as per review comments.
2. Added descriptions for the missing parameters.

* Fixed the shippable break due to the incorrect description format

* Removed the extra modules so that there is a single module for the first commit

* Updated license to BSD based on review comments

* updated comments based on review feedback

* Refactored code to handle POST and PUT scenarios where playbook does not need to check whether object is present.
Moved ansible helper utilities to module_utils as now roles can be patched with module_utils as well.

* fixed pep8 warnings
2017-02-08 09:47:18 -05:00
Thomas Krahn
9f3870ddcd IPA: Remove duplicated code and fix a bug that occurs if empty lists were passed and IPA didn't know the value before (#19210)
* ipa: Add method get_diff and modify_if_diff to class IPAClient

* ipa_*: Use method get_diff and modify_if_diff from class IPAClient
2017-02-08 14:16:44 +00:00
Kevin Kuhls
534dbb094b adding support for no candidate config (#20821)
commit fails for devices with no candidate config, such as when configuraion is written to running-config store.  Commit is set to True in main's call of netconf_edit_config.  The simple edit is to add the additional logic around sending the commit.  Otherwise you could change commit could be set to (if ":candidate" in m.server_capabilities) in the call of netconf_edit_config.  Either way would work.  I'll defer for the decision of which.
2017-02-08 08:58:23 -05:00
Robert Simmons
b7e78656ac [cloud] gce_net fix for unsetting firewall rule properties in the project. (#20483) 2017-02-08 08:49:04 -05:00
Ricardo Carrillo Cruz
64ed9bcfd7 Add unit tests for ios_facts module (#21114) 2017-02-08 12:24:25 +01:00
René Moser
a6f887ce6e cloudstack: cs_portforward: implement vpc support (#19044)
* cloudstack: cs_portforward: implement vpc support

* cloudstack: cs_portforward: add vpc and network to returns

* cloudstack: cs_portforward: networkid must not be used for rule listing

* cloudstack: fail for get_network when vpc but no network name

This seem to be a global pattern for get_network, we want to enforce a
network name to be set if a vpn param is given.

This is used for cs_portforward.

* cloudstack: cs_portforward: doc: fix defaults for vpc, network
2017-02-08 07:57:36 +01:00
Marius Gedminas
577d0e43ba apt_repository: check for enabled repositories correctly
Fixes #20754.

Details: UbuntuSourcesList.add_source() had a quick check for PPAs being
already present in the source lists.  The check was looking for the PPAs
URL to be present in self.repo_urls, which should contain all valid and
enabled repositories.

The enabled check in repo_urls was incorrect.  It was checking the tuple's
2nd item (which means "valid") and ignoring the 3rd item (which means
"enabled").

self.files contains tuples (line_number, valid, enabled, source_line,
comment_text).  Ideally it would be using named tuples instead of
indexing, to avoid bugs like that, but Python 2.4 didn't have named
tuples, so we can't do that (yet).
2017-02-07 18:42:57 -08:00
Dag Wieers
4f96ee5e27 Add missing iteritems definition (#21106)
Also moved most imports out of try-except block.
2017-02-07 18:31:40 -05:00
Ryan S. Brown
d12e9f5748 Convert error to the native text type before writing to stderr
Fixes #20588
2017-02-07 18:01:58 -05:00
René Moser
c00604210c cs_instance: fix ssh keys not found in projects (#21104)
Follow up of 5475f3ee64
2017-02-07 22:14:43 +01:00
Adrian Likins
7278308ca2 Redhat subscription (#20729)
* Make unused redhat_subscriptions do something

rhsm_baseurl/server_insecure were module params that were
never used previously. Hook them up for register options.

* pep8/style cleanups
* Set a module scope SUBMAN_CMD before we ref it as a global
* move ansible imports to top, remove '*' imports
* remove redhat_subscriptions from pep8 legacy
2017-02-07 12:07:01 -05:00
Nathaniel Case
530701b398 Vyos system module (#21060)
* vyos_system tests

* Merge vyos_system fixture with vyos_config fixture
2017-02-07 12:04:14 -05:00
Abdul Anshad A
b30942787b Add guest shutdown/reboot (#20564) 2017-02-07 10:33:13 -05:00
Craig Francis
3e003b10fa Reminder that lookup(‘file’) can be used (#20649)
* Reminder that lookup(‘file’) can be used

Sometimes the block of text does not easily fit into a playbook, so this acts as a reminder (or a prompt for anyone who hasn't used this before) that the content could be stored in an separate file.

I've also included `backup: yes` as I think this is a good example of where a backup might be needed.

* Correct the not so "smart quotes"

* Update blockinfile.py

Replace – with an an ASCII -
2017-02-07 13:57:49 +00:00
Peter Sprygada
d8e57cc60a starts cli if root user login is used for junos terminal (#20761)
fixes #20131
2017-02-07 10:57:44 +00:00
Brian Coca
c86a17b7a0 refactoring async
- centralized skipping
- also fixed module name broken by previous refactor
- let action modules handle async processing
- moved async into base action class's module exec
- action plugins can now run final action as async
- actually skip copy if base skips
- fixed normal for new paths
- ensure internal stat is never async
- default poll to 10 as per docs
- added hint for callback fix on poll
- restructured late tmp, now a pipeline query
- moving action handler to connection as networking does
- fixed network assumption invocation is always passed
- centralized key cleanup, normalized internal var
- _supress_tmpdir_delete now in _ansible_xxx and gets removed from results
- delay internal key removal till after we use em
- nicer tmp removing, using existing methods
- moved cleanup tmp flag to mking tmp func
2017-02-06 19:32:00 -05:00
Daniel Brachmann
b9334f9f47 improve error message on conflicting actions. Fixes #21057 (#21059)
* this fixes #21057

outputs the conflicting action statements.

* reverting to old  % syntax for python 2.6 compatibility
2017-02-06 22:48:06 +00:00
Mike Rostermund
c6a5d9c8bf Fix indentation to match other examples (#21080) 2017-02-06 17:19:35 -05:00
Vincent Bernat
d94f9bdd8d cloudstack: ensure we select a template compatible with disksize (#21058)
When the user specify a root disk size, the template image must be
smaller than the specified root disk size.
2017-02-06 23:14:31 +01:00
Ricardo Carrillo Cruz
375846d764 Refactor iosxr_facts to use network_cli plugin (#20857) 2017-02-06 22:23:17 +01:00
Toshio Kuratomi
bfffd1952f Make sure that we're comparing text all the way through.
On Darwin, sys.platform returns byte strings on both python2 and
python3.  Turn it into a text string everywhere in order to remedy that.

Fixes #19845
2017-02-06 13:07:49 -08:00
Toshio Kuratomi
5c56e79a8f Cleanup imports 2017-02-06 13:04:54 -08:00
Eugene Krokhalev
d67cbaa274 fix urlparse usage in cloud.amazon module to be compatible with python3 (#20917)
* fix urlparse usage in cloud.amazon module to be compatible with python3

* make imports style compatible with six documentation
2017-02-06 12:55:11 -08:00
Brian Coca
8d17055831 error out if systemctl isn't present 2017-02-06 14:52:24 -05:00
Davis Phillips
65e55d47b1 fixes 20904 (#21068) 2017-02-06 14:37:42 -05:00
Evgeni Golov
827723db90 use require_if to check for username or AK instead of custom code (#20937)
the logical or parameter to require_if was introduced in #20220
2017-02-06 13:53:12 -05:00
Brian Coca
770fb03157 minor fixes to template docs 2017-02-06 13:05:18 -05:00
Imran Hussain
d7bf3749b7 Add Check Mode capability to kernel_blacklist module (#21007)
* Add Check Mode capability to kernel_blacklist module
* Add suggested changes from @tmshn
* Pass a bool into `Blacklist` that'll just be `module.check_mode`
* Move detection and creation of a file to a separate function within `Blacklist`
* If there's no file on the system and we are running under `Check Mode`, set `self.filename` to `os.devnull` AND mark a change, as the module would have created an empty file.
* Whenever a `self.filename` is being opened in a mode where changes can be made, replace with an if statement that checks `self.checkmode` and if true then open up `os.devnull` instead
2017-02-06 13:00:31 -05:00
Loïc Blot
b55d039f67 New modules: vmware_guest_facts & vmware_guest_snapshot (#20971)
* Move gather_facts action outside of vmware_guest module
* Move facts gathering method to vmware.py library
* vmware_guest use some vmware.py library methods
* vmware.py lib: fix some PEP 8 issues
* Move snapshot actions to vmware_guest_snapshot
* Move common snapshot facts to vmware.py library
2017-02-06 11:52:17 -05:00
Toshio Kuratomi
6227c6006b Fix typo when choosing KqueueSelector 2017-02-06 08:46:58 -08:00
Daniel Andrei Mincă
62434d9955 update vague description of only_upgrade (#21050)
* the `only_update` param description was kinda vague:
  * either install if not installed
  * or upgrade if installed
  * or both!?
    * as a result, remove the "install" statement from this sentence

Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2017-02-06 09:50:43 +00:00
Peter Sprygada
39426a2207 fixes minor issues with shell (#21039)
* adds sendonly to command dict
* fixes setting timeout param
2017-02-04 09:40:40 -05:00
Peter Sprygada
3eb40d1272 adds netconf shared module (#20743)
New netconf shared lib added to module_utils for sending netconf
messages to remote devices over netconf connection plugin
2017-02-04 09:40:27 -05:00
Ganesh Nalawade
95a75e7c3a Fixes #20412 junos_config delete command fix (#20450)
If same config hierarchy is set and deleted in one playbook
for delete statement add support to check if the config is present
on device or in the playbook. If it is present add delete statement in
updated config list.
2017-02-04 09:16:16 -05:00
JimFicarra
46503c6d1f win_msi:Fixing Issue #20315 - shows changed even when msi not found (#20358)
* win_msi #20315 - shows changed even when msi not found

* make brace placement consistent
2017-02-04 09:32:06 +01:00
Scott Peshak
467fde5644 Correct typo in net_command docs (#20976) 2017-02-04 08:53:11 +01:00
Toshio Kuratomi
f75ffe46db Make configparser imports python3 ready
the ConfigParser module was renamed to configparser in Python3.  Use
six.moves to import it so that the modules will function on Python3.
2017-02-03 21:15:34 -08:00
Ryan S. Brown
bb9ee0cf6f [cloud][aws] Make s3_object_version truly optional in lambda module 2017-02-03 16:22:54 -05:00
Brian Coca
a2c38c47aa added docs for vault and made trigger shorter: !vault (#20985)
* added docs for vault and made trigger shorter: !vault

* added single var valuting

* Update playbooks_vault.rst

Edit pass for spelling and grammar. Ship it!

* Update playbooks_vault.rst

Typo fixes.
2017-02-03 15:28:50 -05:00
Davis Phillips
00fdec1d60 closes #21011 (#21015) 2017-02-03 13:57:19 -05:00
Toshio Kuratomi
d1a6b07fe1 Move ssh and local connection plugins from using raw select to selectors
At the moment, this change will use EPoll on Linux, KQueue on *BSDs,
etc, so it should alleviate problems with too many open file
descriptors.

* Bundle a copy of selectors2 so that we have the selectors API everywhere.
* Add licensing information to selectors2 file so it's clear what the
  licensing terms and conditions are.
* Exclude the bundled copy of selectors2 from our boilerplate code-smell test
* Rewrite ssh_run tests to attempt to work around problem with mocking
  select on shippable

Fixes #14143
2017-02-03 08:23:50 -08:00
jhawkesworth
2c70450e23 Fix 'touch' mode so it creates zero size files. (#20876) 2017-02-03 13:36:47 +01:00
Peter Sprygada
289fb8e895 remove unneeded eos_cli shared module (#20999) 2017-02-02 22:36:52 -05:00
Peter Sprygada
d226f31a0f fixes ios and eos command modules (#20989)
* returns support for prompt/response over cli
* now sends native dict instead of str command
* fixes issue with run_commands() in ios to jsonify request
* updates unit test cases
2017-02-02 22:10:14 -05:00
René Moser
62c97cdd3e ios_cli: fix load_config exec_command (#20994)
fixes AttributeError: 'AnsibleModule' object has no attribute 'exec_command'
2017-02-02 21:13:03 -05:00
Toshio Kuratomi
1df7d95cec Module utils default path (#20913)
* Make the module_utils path configurable
* Add a config value to define the path site module_utils files
* Handle module_utils that do not have source as an error
* Make an integration test for module_utils envvar working
* Add documentation for the ANSIBLE_MODULE_UTILS config option/envvar
* Add it to the sample ansible.cfg
* Add it to intro_configuration.
* Also modify intro_configuration to place envvars on equal footing with
  the config options (will need to document the envvar names in the
  future)
* Also add the ANSIBLE_LIBRARY use case from
  https://github.com/ansible/ansible/issues/15432 so we can close out
  that bug.
2017-02-02 17:48:53 -08:00
Peter Sprygada
bce0bd401e bug fixes for shell exec command (#20988)
* fixes up eos_local to call appropriate method
* fixes up ios_cli to call appropriate method
* moves json conversion to eos
2017-02-02 18:32:36 -05:00
Toshio Kuratomi
fee6e2953b Split on newlines when checking for prompt matches (#20945)
* Check for the prompt as a substring of the output

sudo sometimes spits out warnings to stdout before getting to the
password prompt.  Account for that when trying to match a password
prompt.

Fixes #20858
2017-02-02 14:31:11 -08:00
Toshio Kuratomi
62ba084003 Do not substitute ssh_exeuctable until we need to
We need to use ssh_executable instead of hardcoding ssh in the command
we run but we need to use "ssh" when we lookup the value of the
{command}_extra_args variable.  Do this by leaving binary as "ssh" and
only expanding when we place it into b_command.

Fixes #20862
2017-02-02 13:43:39 -08:00
Ondra Machacek
de2b6469e9 [cloud][ovirt] new module ovirt_snapshots & ovirt_snapshots_facts (#20936)
* cloud: ovirt: add snapshots module

* Move imports in ovirt_snapshots module to match style & pass CI

* Move ovirt_snapshot_facts imports to comply w/ CI
2017-02-02 16:34:54 -05:00
Ondra Machacek
684c766e20 cloud: ovirt: add host engine options to ovirt_hosts (#20967) 2017-02-02 16:24:24 -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
Nathaniel Case
1718719d77 vyos_facts 2.3 (#20939)
* Update vyos_facts documentation

* Replace runner for run_commands

* vyos_facts tests

* Update documentation

* vyos_facts is supported by core
2017-02-02 14:45:06 -05:00
Peter Sprygada
76ccfe4627 fixes handle_prompt in shell module (#20982)
* transforms command objects to dict
* transforms string commands to dict
2017-02-02 14:27:55 -05:00
Tobias Rüetschi
4f117df6ec univention udm_user: add parameter to control password update (#20699)
* univention udm_user: added support to set the password always

* module udm_user: added version 2.3 to update_password
2017-02-02 14:10:32 -05:00
Ondra Machacek
4269b12c9d Ovirt vms improve (#20882)
* cloud: ovirt: add function to get id by name

* cloud: ovirt: add instance type parameter

* cloud: ovirt: use param method instead of module.params

* cloud: ovirt: use 'and' at begging of next line

* cloud: ovirt: add description parameter to vms module

* cloud: ovirt: add comment parameter to vms module

* cloud: ovirt: add timezone parameter to vms module

* cloud: ovirt: add serial_policy parameter to vms module
2017-02-02 13:51:26 -05:00
Ondra Machacek
ee7f1cde0e ovirt: Add support to diff (#20698)
* cloud: ovirt: Add diff support to

* cloud: ovirt: Add ability to print nested list of objects

* cloud: ovirt: Fix waiting while reinstalling host

* cloud: ovirt: fix ovirt_vms 404 error

* cloud: ovirt: add check_mode support to ovirt_auth module
2017-02-02 13:50:52 -05:00
Brian Coca
6ca5fb49c3 allow debug to be 'changed' (#20957)
* allow debug to be 'changed'

fixes #14430

* removed test that checked against this
2017-02-02 13:46:16 -05:00
Nathaniel Case
d87fc9605f vyos_config 2.3 (#20577)
* Rename vyos2 over vyos

* Update vyos_config to LocalAnsibleModule

Change result key 'updates' -> 'commands'

vyos_config is supported by core

* vyos_config tests

* Enable bracket config use

* Sanitize config before use
2017-02-02 13:12:26 -05:00
Peter Sprygada
1e2afd57ae fix up eos doc frags (#20981)
* fix modules with invalid doc frags
* remove unneeded doc frags
2017-02-02 12:15:23 -05:00
s-hertel
0ed1e6a1f3 [cloud] rds module: handle parameters that are False, but also not the default value. Fixes #20370 (#20646)
Boolean options that default as `None` but are set to `False` by the user were ignored on update. This change checks to distinguish None & False so that options like multi_az can be turned off during an update. 

* Modifying how optional parameters are handled in rds.py. Fixes #20370

Allowing options to be set to false/no. Previously ignored unless set to true/yes.

Added a conditional for invalid parameters since the default is false instead of null for some options (e.g. force_failover, apply_immediately, upgrade).

* Making requested revision.
2017-02-02 09:49:19 -05:00
Stephane Maarek
c33812450e fixed type mapper and added tests (#20963) 2017-02-02 09:46:17 -05:00
Dag Wieers
3dbce15ccb win_shortcut: Add missing $check_mode definition + bugfix + tests (#20911)
* win_shortcut: Add missing $check_mode definition

For some reason this entry was missing, possible a merge-conflict gone
wrong :-(

* Added integration tests and bugfix

Add missing changes.
2017-02-02 10:29:56 +01:00
Will Thames
afe29977cb Revert "clean up unused doc fragments"
Those "unused" doc fragments are still referenced

lib/ansible/modules/network/eos/eos_config.py:extends_documentation_fragment: eapi
lib/ansible/modules/network/eos/eos_facts.py:extends_documentation_fragment: eos

This reverts commit 246cd041d8.
2017-02-01 23:40:35 -08:00
Peter Sprygada
e19c2f6a6d adds the cli transport back to the ios modules (#20949)
the cli transport was initially removed to aid in the transition to
network_cli.  This adds the function back to the provider can be
specified.
2017-02-01 23:06:42 -05:00
Peter Sprygada
246cd041d8 clean up unused doc fragments 2017-02-01 22:43:24 -05:00
Peter Sprygada
d8d0b007e3 adds support for eos_local connections to eos modules (#20961)
* updates modules to use eos_local
2017-02-01 22:37:57 -05:00
Peter Sprygada
1d7c71ce50 adds eos_local shared module to handle local connections (#20960)
* adds support for eapi
* adds support for cli
* adds doc fragement
2017-02-01 22:21:18 -05:00
Pau Rodriguez
cc240e3f2d fixed multi_ok(multi) usage in vpc_exists function 2017-02-02 00:28:38 +01:00
Peter Sprygada
67646a0771 fixes exec_command in shell (#20948)
transforms command to dict for processing by instance of Shell
2017-02-01 18:14:53 -05:00
Brian Coca
d4a8816f48 added back return false for when not debian 2017-02-01 15:58:32 -05:00
Will Thames
da1c13705d Disassociate EC2 VPC subnets from route tables before deletion (#20114)
* Disassociate subnets from route tables before deletion

If a route table still has subnets associated with it, it will fail
to delete:

```
"msg": "The routeTable 'rtb-abcd1234' has dependencies and cannot be deleted."
```

Avoid this by disassociating subnets before route table deletion

* Fix ec2_vpc_route_table flake8 complaints
2017-02-01 15:36:51 -05:00
Will Thames
950ff3f24a Fix EIP release in ec2_vpc_nat_gateway (#20167)
* Check if EIP exists before deleting it

After deleting the NAT gateway, the EIP sometimes seems to
cease to exist afterwards. Check if it exists before deleting it.

Otherwise you get:
```
Failed to release EIP eipalloc-abdc1234: An error occurred (InvalidAllocationID.NotFound) \
when calling the ReleaseAddress operation: The allocation ID 'eipalloc-abcd1234' does not \
exist", "success": false}
```

* Fix flake8 errors with ec2_vpc_nat_gateway
2017-02-01 15:32:03 -05:00
Maxime Deravet
0d2d25b515 Fix for #20473 - If there is no instance in the ASG, we initialize an empty array for properties['instances'] (#20475) 2017-02-01 15:29:18 -05:00
Brian Coca
86db15b105 last ditch debian release data (#20571)
fixes #10445
2017-02-01 13:15:02 -05:00
Brian Coca
91b363ea9e allow device to be list for multidev fs (#20655)
* allow device to be list for multidev fs

fixes #20551

* reverted command to string
2017-02-01 13:13:12 -05:00
René Moser
541a51ddf7 module_utils: implement deprecation warning for params (#20884)
* module_utils: implement deprecation warning for params

* rename deprecated_version to removed_in_version

* fix pep8 E121
2017-02-01 13:00:22 -05:00
Ganesh Nalawade
511f2b7907 Fix update check issue (#20915)
Add one of condition in required_if
to ensure configuration statements are
present if update value in provided in
playbook.
2017-02-01 10:48:17 -05:00
jctanner
ac78347f2b Use a -short- custom hash for controlpersist path by default (#20843)
* A method to validate and alter the ssh control path automatically.
* First tries %C to use the shortened hash
* On further failure, it removes section by section from the original path
* Fix hostname
* Implement bcoca's suggested changes
* Remove unused option
* Remove unused class var
* Use to_string to avoid unicode error
* Switch from to_text to to_bytes
* Update the example config for the new controlpath feature
2017-02-01 10:39:40 -05:00
Tom Melendez
237b39556c [GCE] External IP Address Module. (#20779)
* [GCE] External IP Address Module.

This module allows users to create and delete External IP Addresses. Both Regional and Global Addresses are supported.

* Removed whitespace causing pep8 issue
2017-02-01 10:08:02 -05:00
naslanidis
c29f52897b [cloud] New module ec2_vpc_igw_facts (#19787)
* added ec2_vpc_igw_facts module

* added cr at end of file

* corrected import json in wrong location

* corrected version added

* added snake_case conversion

* updated documentation and fixed for python 3'

* ec2_vpc_igw_facts: simplify logic

Make module arguments more 'Ansiblish'
Remove unnecessary intermediate variables in results generation
Use `ansible_dict_to_boto3_filter_list` rather than duplicating logic
Use `check_mode` rather than pass a `dryrun` argument
Update for flake8 improvements

* updated documentation
2017-02-01 09:47:47 -05:00
Peter Sprygada
406c9e01a2 moves the module utils network cli transport into a separate module (#20921)
This move will allow for the cli transport to go through a deprecation
process as we transition to network_cli plugin
2017-02-01 08:19:55 -05:00
Peter Sprygada
9ab0a49ef2 removes assert and uses to_list common function (#20866)
non impacting change to refactor assert statement out of ios shared
module
2017-02-01 08:19:15 -05:00
Ivan Bojer
327ad42ff2 new panos module to import software or configuration file into firewall (#19901)
* # This is a combination of 6 commits.
# The first commit's message is:
new module to import software or configuration file onto firewall

# This is the 2nd commit message:

changes based on the review comments; remove unecessary if statements; change returned value docstring

# This is the 3rd commit message:

empty checkin to trigger ANSIBLEbot

# This is the 4th commit message:

added additional exception handling

# This is the 5th commit message:

- added new module info to the changelog as requested

# This is the 6th commit message:

removed blank space as tox checks were failing

* new module to import software or configuration file onto firewall
2017-02-01 12:41:52 +00:00
Ganesh Nalawade
01f4d4a666 module_utils/basic.py: Support logical or condition in required_if (#20220)
* Support logical or condition in required_if

Add logical 'or' condition support in 'required_if'
for requirements.
* If requirements is a list all parameters within it should
  be present.
* If requirements is a set atleast one parameter should
  be present

* Fix review comment
2017-01-31 20:01:29 -08:00
Matt Clay
cdc56afe01 PEP 8 fixes. 2017-01-31 15:18:24 -08:00
Brian Coca
16615811b4 clean up empty warnings/deprecations from modules 2017-01-31 18:13:26 -05:00
Samuel Boucher
488acc750f Feature/lookup keyring (#18379)
* Add keyring lookup

* Better error control

* Update keyring.py

* Update keyring.py

typo
2017-01-31 17:26:19 -05:00
Matt Clay
2adc71fabc PEP 8 fix. 2017-01-31 13:38:05 -08:00
Brian Coca
f4b6b72c5b Warn reserved (#20567)
* removed unused vars

* added warning when using reserved vars

fixes #4816

* cleanup
2017-01-31 15:35:28 -05:00
Adrian Likins
b3b598c835 Rhn register misc fixes (#20724)
* Remove monkeypatching of rhn config in rhn_register

rhn_register.Rhn() was doing some complicated monkeypatching of
the up2date_client.config.Config() class to add a default config
value. Since that was only used in one place, remove the monkeypatch
and handle the single default case.

That case was 'server_url' option, so replace it with a Rhn.server_url
property. Also handle the error case when no server url is provided.

* refactoring
* flatten some indention levels
* add 'enable_eus' to module doc
* set enable_eus var and use it directly
* style/pep8/etc cleanups
* some import cleanups

types was unused, os/re were from module_utils * import

* remove * import from module_utils.redhat
* remove * imports from module_utils.base
* remove unused Rhn._subscribe method
* cleanup pep8 style stuff
* remove a unused default mutable arg from Rhn.subscribe

Rhn.subscribe() only gets called in one place, and thats
with channels from module_params which default to [] and
are typed as a list.
2017-01-31 15:23:27 -05:00
Will Thames
38ff9b735e Fix python3, fix flake8, use common code
Update exception handling, remove use of iteritems
Update for better flake8 compliance

Use ansible_dict_to_boto3_filter_list rather than
duplicating its implementation
2017-01-31 14:49:50 -05:00
Etherdaemon
2e35d5716b Remove camel_dict_to_snake_dict as this was breaking the module itself - the result is a list 2017-01-31 14:49:50 -05:00
Etherdaemon
b0c49c7141 Update typo for connection to the get_nat_gateways function 2017-01-31 14:49:50 -05:00
Etherdaemon
e6821b3472 New facts module for ec2 nat gateway facts module 2017-01-31 14:49:50 -05:00
Brian Coca
e6f92bc3a9 reworded conditional skipping to not imply error
fixes #19068
2017-01-31 13:33:29 -05:00
Vlad Glagolev
039d207d24 Add Source Mage GNU/Linux facts (#19671)
* Add Source Mage GNU/Linux facts

* Add unit test for OS-detection
2017-01-31 13:25:36 -05:00
Matt Clay
524e5d2c39 PEP 8 cleanup. 2017-01-31 10:16:59 -08:00
Toshio Kuratomi
5c38f3cea2 Combine jimi-c and bcoca's ideas and work on hooking module-utils into PluginLoader.
This version just gets the relevant paths from PluginLoader and then
uses the existing imp.find_plugin() calls in the AnsiballZ code to load
the proper module_utils.

Modify PluginLoader to optionally omit subdirectories (module_utils
needs to operate on top level dirs, not on subdirs because it has
a hierarchical namespace whereas all other plugins use a flat
namespace).

Rename snippet* variables to module_utils*

Add a small number of unittests for recursive_finder

Add a larger number of integration tests to demonstrate that
module_utils is working.

Whitelist module-style shebang in test target library dirs

Prefix module_data variable with b_ to be clear that it holds bytes data
2017-01-31 09:41:24 -08:00