Commit graph

3601 commits

Author SHA1 Message Date
René Moser
8b8d5aaca7 cs_instance: remove CloudStackException dep (#31724)
- fixes dep
- fix docs
2017-10-14 00:09:57 +02:00
Adrian Likins
297dfb1d50 Vault secrets script client inc new 'keyring' client (#27669)
This adds a new type of vault-password script  (a 'client') that takes advantage of and enhances the 
multiple vault password support.

If a vault password script basename ends with the name '-client', consider it a vault password script client. 

A vault password script 'client' just means that the script will take a '--vault-id' command line arg.

The previous vault password script (as invoked by --vault-password-file pointing to an executable) takes
no args and returns the password on stdout. But it doesnt know anything about --vault-id or multiple vault
passwords.

The new 'protocol' of the vault password script takes a cli arg ('--vault-id') so that it can lookup that specific
vault-id and return it's password.

Since existing vault password scripts don't know the new 'protocol', a way to distinguish password scripts
that do understand the protocol was needed.  The convention now is to consider password scripts that are
named like 'something-client.py' (and executable) to be vault password client scripts.

The new client scripts get invoked with the '--vault-id' they were requested for. An example:

     ansible-playbook --vault-id my_vault_id@contrib/vault/vault-keyring-client.py some_playbook.yml

That will cause the 'contrib/vault/vault-keyring-client.py' script to be invoked as:

     contrib/vault/vault-keyring-client.py --vault-id my_vault_id

The previous vault-keyring.py password script was extended to become vault-keyring-client.py. It uses
the python 'keyring' module to request secrets from various backends. The plain 'vault-keyring.py' script
would determine which key id and keyring name to use based on values that had to be set in ansible.cfg.
So it was also limited to one keyring name.

The new vault-keyring-client.py will request the secret for the vault id provided via the '--vault-id' option.
The script can be used without config and can be used for multiple keyring ids (and keyrings).

On success, a vault password client script will print the password to stdout and exit with a return code of 0.
If the 'client' script can't find a secret for the --vault-id, the script will exit with return code of 2 and print an error to stderr.
2017-10-13 15:23:08 -04:00
Tim Rupp
ecee475a3a This patch fixes a number of outstanding bugs and code convention problems. (#31618)
* documentation was not inline with other Ansible modules
* Python 3 specific imports were missing
* monitor_type is no longer required when creating a new pool; it is now the default.
* A new monitor_type choice of "single" was added for a more intuitive way to specify "a single monitor". It uses "and_list" underneath, but provides additional checks to ensure that you are specifying only a single monitor.
* host and port arguments have been deprecated for now. Please use bigip_pool_member instead.
* 'partition' field was missing from documentation.
* A note that "python 2.7 or greater is required" has been added for those who were not aware that this applies for ALL F5 modules.
* Unit tests were fixed to support the above module
2017-10-13 09:47:49 -07:00
Abhijeet Kasurde
a047fe0e4c Correct usage for shutil.rmtree (#31541)
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
2017-10-13 10:30:15 -04:00
Lujeni
91ab88dac7 pip: Use chdir directive in the venv path (fixes #25122) (#26865) 2017-10-13 12:39:47 +02:00
Tim Rupp
381b18fd80 Adds a refactored bigip_monitor_http module. (#30998)
This patch refactors the bigip_monitor_http module to use REST
instead of SOAP. It additionally adds unit tests and current F5
code conventions.

Integration tests can be found here
* https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_monitor_http.yaml
* https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_monitor_http/tasks
2017-10-12 17:02:05 -07:00
Brian Coca
12c8dd1893 config tests
also a couple of fixes to manager
2017-10-12 19:26:39 -04:00
Matt Clay
80b0e0e05a Remove cryptography version limit in Azure tests.
No longer needed now that cryptography 2.1.1 has been released.
2017-10-12 15:34:36 -07:00
James Mighion
50052b3d70 Adding a cli transport option for the bigip_command module. (#30391)
* Adding a cli transport option for the bigip_command module.

* Fixing keyerror when using other f5 modules. Adding version_added for new option in bigip_command.

* Removing local connection check because the F5 tasks can be delegated to any host that has the libraries for REST.

* Using the network_common load_provider.

* Adding unit test to cover cli transport and updating previous unit test to ensure cli was not called.
2017-10-12 15:07:15 -07:00
Pilou
840a57a4ed s3_sync: fix broken import (#31460) 2017-10-12 20:48:05 +02:00
jctanner
c05a7add5f Only install pyvmomi if user is root (#31628) 2017-10-12 10:20:33 -04:00
Matt Clay
05ec376197 Multiple Parallels host support for ansible-test. (#31552) 2017-10-12 01:22:18 -07:00
Matt Clay
03e18aa52e Remove cryptography install from CI other test. 2017-10-12 00:36:12 -07:00
Abhijeet Kasurde
9d811a34c4 pep8 fixes for vmware modules (#31537)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-12 07:50:05 +02:00
Trishna Guha
e7145e249f fix ios_interface test unsupported param (#31622)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-12 11:17:06 +05:30
René Moser
540d53327d cs_instance_facts: fix pep8 (#31606) 2017-10-12 14:00:14 +10:00
Matt Clay
8acb901bf2 Update Azure tests to limit cryptography version. (#31616)
* Revert "Work around cryptography 2.1 requiring pip 8.1.2+"

This reverts commit a10a80b8a3.

* Update Azure tests to limit cryptography version.
2017-10-11 19:18:16 -07:00
Toshio Kuratomi
f38b8d9997 Remove boundary_meter module as the hosted service it configured has been removed. (#31506)
References #29387
2017-10-12 09:12:37 +10:00
René Moser
e872763877 cs_portforward: remove CloudStackException dep (#31610)
- fixes pep8
- fixes doc
2017-10-12 00:25:01 +02:00
René Moser
c1121dd5fb cs_securitygroup_rule: remove CloudStackException dependency (#31603)
- fixes pep8
- fixes docs
2017-10-11 22:23:00 +02:00
René Moser
af6e89fbc8 cs_securitygroup: remove CloudStackException dep (#31597)
- fixes pep8
- fixes docs
2017-10-11 20:58:08 +02:00
Rene Moser
0c416b5891 tests: cs_snapshot_policy: add integration tests 2017-10-11 18:35:54 +02:00
Rene Moser
d6e1f02990 cs_snapshot_policy: remove CloudStackException dependency 2017-10-11 18:35:54 +02:00
Philippe Dellaert
9580a6569e Fix #21112 : Adding support for configuring a CD-rom iso image (#28155)
* Initial CD-ROM support

* create cdrom bugfix

* Improving CDROM change detection and fixing template creation bug
Running MarkAsTemplate on an existing template will fail with an error

* Better change detection for guest ID
Should only mark a change in case it actually changes

* Adding integration tests

* Pep8 compliance fixes

* Adding CDROM support, including iso, client and none types

* Updating added release version for CDROM option
2017-10-11 14:29:13 +02:00
rahushen
c976ac7ed6 change ports to non well known ports and drop time_range for N1 (#31261) 2017-10-11 17:37:01 +05:30
Ricardo Carrillo Cruz
7acb0bb187 Parameterize the ssh port on ios_user tests (#31573)
On CI we use 8022 for SSH, thus we need to explicitly pass
ansible_ssh_port to the ssh command to work.
2017-10-11 12:44:57 +02:00
Ricardo Carrillo Cruz
ac95ecaf13 Remove duped authorize on ios_ping anchored tasks (#31572)
Otherwise, we get warnings.
2017-10-11 12:28:10 +02:00
Ricardo Carrillo Cruz
c75c4cbfc8 Introspect the management IP on ios_ping (#31571)
On our CI we don't have external connectivity, so let's ping to
the management interface IP.
Also, ignore errors on the expected failures tests.
2017-10-11 12:10:11 +02:00
Ganesh Nalawade
88da95bb77 Fix rollback in junos_config (#31424)
* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
2017-10-11 10:25:56 +05:30
Toshio Kuratomi
dde2c96d67 Try to cleanup after the rpm_key test 2017-10-10 17:40:35 -07:00
Brian Coca
d84df2405d move from with_<lookup>: to loop:
- old functionality is still available direct lookup use, the following are equivalent

  with_nested: [[1,2,3], ['a','b','c']]

  loop: "{{lookup('nested', [1,2,3], ['a','b','c'])}}"

- avoid squashing with 'loop:'
- fixed test to use new intenal attributes
- removed most of 'lookup docs' as these now reside in the plugins
2017-10-10 15:43:49 -04:00
Ricardo Carrillo Cruz
bd17edd5ed Run neighbors intent tests for ios_interface only if show lldp contains netdev (#31539) 2017-10-10 21:26:47 +02:00
Sam Doran
2610b521bc Remove sysctl entries when state=absent (#31486)
* Remove sysctl entry when state=absent
* Cleanup sysctl integration test syntax
* Correct grammar on error message
* Add sysctl integration test for state=absent
2017-10-10 09:01:33 -07:00
Lukas Bednar
5ccc1072ea [rpm_key] Fix to import first key on the system (#31514)
* [rpm_key] Fix to import first key on the system

Fixes: #31483

* [rpm_key] removed unsafe_shell and "throwaway" underscore

* [rpm_key] adding test to add the first key on system
2017-10-10 13:31:20 +02:00
Artem Zinenko
2b63ae61f2 minor updates + tests to win_firewall_rule as per jborean93 review (#29148)
* Added warning for 'force' option

* Changed 'profiles' type to list

* Changed 'interfacetypes' type to list

* Added deprecation warning and fixed doc

* updated force parameter
2017-10-10 16:23:08 +10:00
Toshio Kuratomi
b454115e9f Update test cases
* Remove cloudstack, f5, and nxos from the wildcard import whitelist
* Remove nxos and f5 from the get_exception whitelist
* Remove some files from the pep8 legacy whitelist
2017-10-09 21:41:02 -07:00
Toshio Kuratomi
2db9b6d2ca Remove wildcard import in test_nclu 2017-10-09 21:41:02 -07:00
Toshio Kuratomi
c81314dcb9 Add a hack to test whether type=path should be used in a module 2017-10-09 21:15:56 -07:00
Jordan Borean
82fa922491 win_become: Added support to become a service user (#30407)
* win_become: Added support to become a service user

* fixes for linting

* changes to get local and network service working

* fixed linting issues again

* pleasing pepe
2017-10-09 17:58:29 -07:00
Jordan Borean
665d838fc2 added optional environment passthrough for MacOS 10.13 compatibility (#31500) 2017-10-10 08:41:06 +10:00
Jordan Borean
f2bc89a880 win_copy: added decrypt option (#31291) 2017-10-10 08:21:25 +10:00
Tim Rupp
75c5d0fedc Adds the bigip_remote_syslog module
This patchs add a remote-syslog module that can be used by people
to manage their (basic, not HSL) syslog configuration
2017-10-09 13:21:16 -07:00
Pilou
1c9bffe248 pip module: fix TypeError (#31395)
* pip: add test: an error occurs when pip not found
* pip: fix TypeError exception when pip executable isn't found
2017-10-09 10:01:21 -07:00
Toshio Kuratomi
5e9384300d Add boilerplate and remove wildcard imports for openstack modules (#31461)
* Add boilerplate and remove wildcard imports for openstack modules
* Remove openstack files that are now pep8 compliant from the legacy list
2017-10-09 09:56:26 -07:00
Sofiane Medjkoune
ef72eda172 Adding doc for the description argument of lxd_profile module 2017-10-09 11:11:58 -04:00
Toshio Kuratomi
9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
2017-10-09 07:38:41 -07:00
Pilou
870974e0be ec2_vpc_route_table: fix broken import (#31459) 2017-10-09 20:20:31 +10:00
Pilou
0be8ac6797 ec2_vpc_igw: fix broken import (#31458) 2017-10-09 15:36:12 +10:00
Dag Wieers
ae5d8e5ebb modprobe: PEP8 compliancy and doc fixes (#31255)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
- Make module a bit more consistent with existing practices
2017-10-08 09:21:58 -04:00
Jordan Borean
c4b51009f0 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors
2017-10-06 15:23:37 +10:00