Commit graph

19823 commits

Author SHA1 Message Date
Gaurav Rastogi
0d06d7caa0 New module to setup cluster cloud details settings for clouds like Az… (#34366)
* New module to setup cluster cloud details settings for clouds like Azure.

* Update copyright notice.
2018-01-23 17:09:46 +00:00
Dustin Spicuzza
b2dcc9c587 Better error message when file lookup fails (#30894)
* Alert user which debug level will show them useful details
2018-01-23 10:48:35 -06:00
René Moser
a8b9d7f8be iam_role: fix docs, managed_policy not required (#35229) 2018-01-23 11:28:39 -05:00
tomo
ef6b478d2a add rstrip and lstrip bool flags to file lookup plugin (#31738) 2018-01-23 10:14:19 -06:00
Jason Vanderhoof
7c8e365dff Conjur Lookup Plugin (#34280)
* Imported lookup plugin from Role

* Plugin cleanup, including:
* Use existing Python YAML parsing
* Remove environment variables as connection options
* Added initial debugging information

* Reworked the lookup plugin using the Python Request library.  As it's available through Ansible, it makes communication with Conjur much more straight forward.

* Removed un-used libraries

* Fixed linting issues

* Standardized output on `format` and insure it works for 2.6, 2.7, and 3.x.

* Use quote_plus from the six library for improved python 2/3 behavior.

* Refactored identity & configuration to prefer user's file. This also includes a refactor to remove an un-needed dictionary merge method.

* Removed `requests` in favor of `ansible.module_utils.urls`.

* Refactored netrc loading to warn if host is not present.

* Tests and a refactor to support easier testing.

* Added reference to website

* Fixed two linting errors

* Fixed an extra line found by linting

* Updated file write to use binary to insure config files are written correctly

* Resolved linting issues

* Refactored config & identity loading to take advantage of plugin options

* Cleanup a bunch of small items caught by linting

* Removed extra line caught by linting

* Swapped in pytest and added some tests with mocked network responses

* Pushing to see if this approach works better...

* Refactored be open_url mocking based on feedback

* Fixed a couple linting issues & refactored mocking into each method to attempt to resolve a failing test

* Use a generic MagicMock for python 2.6

* Fixes doc typo

require -> required

* Use `type: path` in identity_file and config_file

Also removes `expanduser` calls below (which will now be called automatically on
paths.)

* Defines maintainers for conjur_variable plugin

* BOTMETA.yml:
** defines $team_cyberark_conjur as maintainers of Conjur Variable plugin
** adds myself and @jvanderhoof to that team

* Adds URLs to relevant documentation for Conjur Variable lookup plugin

* Clarifies "the server," "the machine" -> "controlling host"

The machine identity used is that of the Ansible controlling host, not any
server being provisioned or instructed. This documentation change aims to make
that relationship clear.

* Adds response code to exception message on authentication failure

* Enhances exception messages to specify the controlling host

These error messages are less likely to confuse a user as to which machine is
associated with the files, identities, and configurations being described.

* Adds ANSIBLE_METADATA for Conjur variable lookup plugin
2018-01-23 10:04:57 -06:00
David Soper
9c9e692165 Ucs vlans and integration tests (#35071)
* UCS VLANs module and integration tests

* UCS VLANs and integration tests
2018-01-23 16:32:32 +01:00
Abhijeet Kasurde
013190c27b VMware: Add support for datastore cluster (#35230)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 10:25:38 -05:00
Abhijeet Kasurde
ca31e59b79 VMware: Add teaming policy for DVS Portgroup. (#35215)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 09:51:50 -05:00
Michael
75130b4a4d Support domainname in docker_containers (#32292) 2018-01-23 08:24:37 -06:00
Charl van Niekerk
30ed29ed46 Implement the reduce_on_network method to filter a list of IP addresses on a given range. (#34929) (#34930) 2018-01-23 08:14:56 -06:00
Dhivyap
19ff2f4e8c Ansible 2.5 feature support for dellos9 (#34880)
* Add ansible-2.5 support for dellos9

* Fix ansible-test issues and update copyright

* fix ansible-test errors in dellos9_config

* fix izip attribute error in python3

* fix python3 dict.keys() issue

* Remove waitfor aliases in dellos9_command
2018-01-23 13:59:27 +00:00
Ondra Machacek
9f84a12adf ovirt_vms: Add cpu_threads parameters (#35221) 2018-01-23 08:46:37 -05:00
David Soper
7aa0c929bf Ucs lan connectivity and integration tests (#35137)
* UCS LAN Connectivity Policies and integration tests

* Docs updated

* UCS LAN Connectivity Policy and integration tests

* Fix use of description in docs and argument_spec so validate-modules passes
2018-01-23 14:45:44 +01:00
David Soper
9945d9a720 Ucs vnic template and integration tests (#35136)
* UCS vNIC templates and integration tests

* docs updated

* UCS vNIC template and integration test

* Update docs and argument_spec for description, mtu, and target.
2018-01-23 14:45:31 +01:00
Jordan Borean
9e48cf875f Azure: added auth_source to override the source of the credentials (#35213)
* Azure: added auth_source to override the source of the credentials

* removed broken cli auth and fix some review changes

* missed some more cli auth stuff that isn't required

* Added cli auth back in

* Added docs around cli auth

* fix azure CLI auth issues

* tweak error messages
* fix auto fallback to cli
* fix import issues when azure-cli not installed
2018-01-22 23:38:05 -08:00
Toshio Kuratomi
32eef49062 Make AnsibleActionDone a private exception
We're going to remove this in the future so mark it private so people
are less likely to use it.
2018-01-22 23:36:34 -08:00
Toshio Kuratomi
ca8e4c806a Pass tempdir via module args instead of the environment 2018-01-22 23:36:34 -08:00
Matt Davis
06dc840b51
implement gather_subset on Windows setup (#35212) 2018-01-22 21:10:25 -08:00
Trishna Guha
4083c8e048
Fix nxos terminal plugin regex to support certain commands (#35186)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-23 09:04:13 +05:30
Abhijeet Kasurde
c0df05c028
github_release: Fix state returned from module (#33735)
This fix corrects the module state returned by github_module.
Now,
* When the release already exists, state is "ok"
* When the release is created, state is "changed"

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 08:37:41 +05:30
Toshio Kuratomi
b151f5d942 Move module_set_locale and module_lang back to global
These config settings are being deprecated so we don't want people to
think they need to implement them for their new shell plugin.
2018-01-22 18:38:15 -08:00
Toshio Kuratomi
62bc714dae Move setting for world-readable-tempfiles back to global config.
The code that depends on this is all in the action plugins so we should
leave it there until we either move that action plugin code over
(fixup_perms2) or we give action plugins the ability to register new
config.
2018-01-22 18:38:15 -08:00
Dag Wieers
64df1a7566
aci_aaa_user_certificate: Rename user parameter to aaa_user (#35207) 2018-01-23 02:23:06 +01:00
Toshio Kuratomi
f94fe61b6b Documentation and changelog for the plugin_filtering config option 2018-01-22 17:13:41 -08:00
Toshio Kuratomi
340a7be7c3 Implement plugin filtering 2018-01-22 16:54:53 -08:00
Toshio Kuratomi
14c3b4d8e5 Move yaml loading functions from DataLoader into a utility module. 2018-01-22 16:54:53 -08:00
Dag Wieers
2a4b3ef0c1 win_product_facts: New module to get Windows product information (#35206)
* win_setup: Add Product ID and Product Key in facts

So this is actually a very nice way to get product key information from
systems collected centrally.

Especially with systems that have been upgraded from Windows 7 or
Windows 8 to Windows 10 may not have a valid Windows 10 product
license key printed anywhere, it was a digital license.

If you ever have to reinstall the system, you may recover the system
from the recovery partition, or the original media, but cannot upgrade
to Windows 10 for free. By collecting the product key, one can always
reinstall your free Windows upgrade.

My only question is, do we want this to be part of the default facts, as
it may be considered important information. Or should we make a special
**win_product_key_facts** ?

* Add ACPI product key support

* Add integration test

* Remove Get-ProductKey function, move inline
2018-01-23 10:44:55 +10:00
Sloane Hertel
4a1cc661c4 add inventory caching & use in virtualbox inventory plugin (#34510)
* Inventory caching

* Add inventory caching for virtualbox

* Don't populate cache for virtualbox with stdout, use a dict of inventory instead

* Fix error creating the cache dir if it doesn't exist

* Keep cache default False and set to True in VariableManager __init__

* Check all groups before determining if a host is ungrouped.
2018-01-22 19:33:14 -05:00
Ben
9fdaa86c9f Fixes issue #34956 (#35149) 2018-01-23 10:25:08 +10:00
René Moser
390f65bd6a [cloud] iam_role: fix docs & default state to present (#35184)
* iam_role: default state to present

* fix yaml
2018-01-22 18:51:11 -05:00
Sloane Hertel
b94198f9de [cloud] New inventory plugin: aws_ec2 (#34416)
aws_ec2 is an inventory plugin intended to replace uses of the `contrib/inventory/ec2.py`
inventory script. 

For advanced grouping, please use the `constructed` inventory plugin.
2018-01-22 18:49:57 -05:00
Adrian Likins
6e585bdf24
Fact collector ordering deps (#31362)
Add deps/requires for fact collectors

Fact collectors can now set a required_facts
class attribute that will be a set of the names
of fact collectors they require to be run first.

ie, if a collector needs to know the ansible_distribution,
it should set it's required_facts to include 'distribution'

        required_facts = set(['distribution'])

If a collector requires another collector, it gets added
to the selected collector names.

We then topological sort the ordering of the collectors
so that deps work out (ie, 'distribution' will run before
'service_mgr')

required_facts were added to the collectors for:

        - network (requires 'distribution', 'platform')
        - hardware (requires 'platform')
        - service_mgr (requires 'distribution', 'platform')

Fix name references for facts (need 'ansible_' prefix)
is service_mgr

Fixes #30753
2018-01-22 18:23:40 -05:00
Marek
5fa29201a7 Port sts_assume_role to boto3 (#32569)
* Ported sts_assume_role to boto3

* Added integration tests
2018-01-22 17:46:08 -05:00
Adrian Likins
ffe0ddea96
add a vault --encrypt-vault-to specify vault id to use for encrypt (#31067)
Enforce that there can be only one --new-vault-id or
--new-vault-password-file and use this instead of
--encrypt-vault-id

* Add a config option for default vault encrypt id
2018-01-22 17:12:10 -05:00
Rob
866239e01a [cloud] Add support for using IP addresses in target groups (#34266)
* Add support for IP based ELB target groups. Fixes #30962

* Add support for using IP addresses in target groups
2018-01-22 16:47:41 -05:00
Aidan Feldman
de60328d94 add documentation around commonly-used Facts for Conditionals (#34263)
* add documentation around commonly-used Facts for Conditionals

There are a few Facts that are often used for Conditionals, so
documenting them on the Conditionals page with their possible values.

* Edit
2018-01-22 13:37:19 -08:00
Dag Wieers
7f6feca82f
Revert "win_setup: Add Product ID and Product Key in facts" (#35200)
* Revert "win_setup: Add Product ID and Product Key in facts (#34097)"

This reverts commit cf1f7b53df.
2018-01-22 22:32:23 +01:00
Peter Sprygada
dd5256f3df adds restart_if_needed argument to nios_zone (#35191)
* adds restart_if_needed argument to nios_zone

* minor updates to the documentation strings
2018-01-22 21:21:07 +00:00
Dag Wieers
d6004852a2
ACI: Move to 'host' parameter instead of 'hostname' (#35161)
* ACI: Move to 'host' parameter instead of 'hostname'

* Update host parameter in documentation fragment too
2018-01-22 22:06:56 +01:00
Dag Wieers
cf1f7b53df win_setup: Add Product ID and Product Key in facts (#34097)
* win_setup: Add Product ID and Product Key in facts

So this is actually a very nice way to get product key information from
systems collected centrally.

Especially with systems that have been upgraded from Windows 7 or
Windows 8 to Windows 10 may not have a valid Windows 10 product
license key printed anywhere, it was a digital license.

If you ever have to reinstall the system, you may recover the system
from the recovery partition, or the original media, but cannot upgrade
to Windows 10 for free. By collecting the product key, one can always
reinstall your free Windows upgrade.

My only question is, do we want this to be part of the default facts, as
it may be considered important information. Or should we make a special
**win_product_key_facts** ?

* Add ACPI product key support
2018-01-22 16:00:45 -05:00
Kairo Araujo
bcd883ce5e Included ansible_devices for AIX facts/hardware (#31546)
* Included ansible_devices for AIX
2018-01-22 14:37:45 -05:00
Toshaan Bharvani
87e82be09f added new IBM Power KVM guest recognisation (#35169)
Signed-off-by: Toshaan Bharvani <tab@toshaan.com>
2018-01-22 14:29:44 -05:00
Josh Souza
1ac715987b Update iam_group to add check mode support (#27589) 2018-01-22 14:29:22 -05:00
Ricardo Carrillo Cruz
b7f4504a36
Add eos_l2_interface module and integration tests (#35162)
* Add eos_l2_interface module and integration tests

* Address PR review comments

* Fix pylint issues
2018-01-22 20:00:39 +01:00
Will Thames
142cacfec3 [cloud] ECS Service load balancer modification graceful fail (#32876)
It is not possible to modify the load balancer configuration
for ECS Service.

As it is possible to detect this, it's nicer to fail gracefully
than return AWS's less meaningful failure message.

Fix PEP8 compliance
2018-01-22 13:37:09 -05:00
Abhijeet Kasurde
b24d502682 VMware: Refactor vmware_dvs_portgroup (#35193)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 13:15:18 -05:00
Giovanni Sciortino
b4736a8741 Add rhsm_repository module (#28292)
Add rhsm_repository module
2018-01-22 12:42:29 -05:00
Abhijeet Kasurde
c65842b9d8
Add check mode support in vmware_guest (#32858)
This fix adds check mode support in vmware_guest

Fixes: #32439

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 21:16:19 +05:30
Ganesh Nalawade
e8dd01fa5b
Add junos_l2_interface module (#35123)
* Add junos_l2_interface module

*  Implementation for junos_l2_interface module
*  Integration test

* Fix CI issues

* Fix review comments
2018-01-22 20:38:07 +05:30
Abhijeet Kasurde
912729b6a7
VMware: Check if VM is poweredoff before destroy (#35151)
This fix checks if VM is poweredoff before it can be destroyed.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 20:17:11 +05:30