Commit graph

2630 commits

Author SHA1 Message Date
Tim Rupp
478d364f4d Adds bigip_iapp_template module (#25630)
This module can be used to upload and manage TCL iApps on a BIG-IP.
iApps can be added, removed and updated in place as needed. iApp
files should be provided to the module via Ansible lookups.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_iapp_template.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_iapp_template/tasks
2017-06-14 18:29:10 +01:00
Tim Rupp
0c68e200d5 Adds the bigip_provision module to Ansible (#25558)
This module allows an administrator to provision new module functionality
on a BIG-IP. BIG-IP modules provide enhanced ADC and security features that
are commonly used by customers such as GTM, ASM, and AFM.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_provision.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_provision/tasks
2017-06-14 18:28:12 +01:00
Dag Wieers
1c9a570ffe win_timezone: Add diff support, integration tests (#25284)
* win_timezone: Add diff support, integration tests

This PR includes:

- Diff support
- Returns both previous_timezone and timezone
- Adds integration tests
- More examples
- Improved documentation

* Merged the changes from jborean93's PR
2017-06-14 17:34:46 +01:00
Jordan Borean
d3352c5b49 win_tempfile: Added integration tests (#25069)
* win_tempfile: Added integration tests

* fixed up tests
2017-06-14 17:17:22 +01:00
Sloane Hertel
dfcf43efa9 ec2: Allow EC2-VPC instances to modify security groups - fixes #18928 (#23831)
* Allow EC2-VPC instances to update SG

make ec2 pep8

* use sets instead of loop and a break

* bring things in an indentation level

* Use to_text instead of str, text_type instead of basestring, - instead of difference

* basestrings not unicode

* simplifying syntax
2017-06-14 11:10:29 -04:00
Brian Coca
74842adc07 1st part of ansible config, adds ansible-config to view/manage configs (#12797)
* Start of ansible config project

moved configuration definitions to external yaml file vs hardcoded
 * updated constants to be a data strcutures that are looped over and also return origin of setting
changed to manager/data scheme for base classes
new cli ansible-config to view/manage ansible configuration settings
 * prints green for default/unchanged and yellow for those that have been overriden
 * added list action to show all configurable settings and their associated ini and env var names
 * allows specifying config file to see what result would look like
 * TBD update, edit and view options

removed test for functions that have been removed

env_Vars are now list of dicts
allows for version_added and deprecation in future
added a couple of descriptions for future doc autogeneration
ensure test does not fail if delete_me exists
normalized 'path expansion'
added yaml config to setup packaging
removed unused imports
better encoding handling

updated as per feedback

* pep8
2017-06-14 11:08:34 -04:00
Nathaniel Case
4344132a7d nxos_vpc updates (#25452)
* Add nxos_vpc tests

* Split execute-show between get_config and run_commands
2017-06-14 11:06:49 -04:00
Ganesh Nalawade
b69c7f50d0 Add junos_vlan platform agnostic module (#25652)
* Add junos_vlan platform agnostic module

*  junos_vlan implementation

*  integration test for junos_vlan

* Minor fixes

* Fix Integration test failure
2017-06-14 14:23:52 +05:30
Andrew Saraceni
91e995d691 Allow win_scheduled_task to support adding and removing task paths (#24025)
* allows win_scheduled_task to support adding and removing task paths

* fix line length for documentation

* added integration tests for path creation and removal

* removing ability to remove TaskPath if a task isn't removed.  also removed superfluous line of code in Invoke-TaskPathCheck function
2017-06-14 08:02:36 +01:00
Dag Wieers
cf30b162a9 vmware_guest: Various fixes to VM customizations (from template) (#24768)
* Various fixes to VM customizations (from template)

This patch implements:
- New find_obj() function from vmware.py replacing get_obj()
- Implement proper resource_pool selection
- Fix productId implementation (was not working)
- Ensure that we are not changing anything that is not mandatory (hostName, orgName, fullName)


This is an alternative proposal to #24283
This does not fix #19860 yet though.

For our use-case, we do not want to customize the network information (or any information in fact).
What is used in the template should remain intact.

* Added find_obj() function

* Fix the returned object-list (unused yet)

* Small improvement

* Support DHCP type and fix customizations

* Small fix

* Support resource_pool also for reconfiguring VM

* Remove redundant

* Fix short hostname, specific resource_pool, PEP8

* Improve docs and examples

* Fix missing hostsystem

* Make folder absolute path

* Improve docs, add missing 'mac'
2017-06-13 17:50:55 -04:00
Adrian Likins
56b7483b85 More statvfs info for mount facts rebase 12073 (#25454)
* Add more mount point statvfs info including sizes

Based on https://github.com/ansible/ansible/pull/12073

facts.utils.get_mount_size() now returns a dict of most
of the posix statvfs data, including block_size and inode
counts.

Update the facts.hardware classes that use get_mount_size() to
use the new info by mount_info.update(mount_statvfs_inof) to merge.

* add back unit tests for LinuxHardware mount/fs facts

* add test cases for facts.utils.get_mount_size
2017-06-13 15:31:41 -04:00
Dag Wieers
bf43eb92f5 win_firewall: check-mode support, integration tests (#25127)
* win_firewall: check-mode support, integration tests

This PR includes:
- Check-mode implementation
- Documentation improvements
- Ensure module output is consistent (no matter what profiles are provided)
- Fixed indentation
- Cosmetic changes
- Integration tests

* win_firewall: check-mode support, integration tests

This PR includes:
- Check-mode implementation
- Documentation improvements
- Ensure module output is consistent (no matter what profiles are provided)
- Fixed indentation
- Cosmetic changes
- Integration tests
2017-06-13 17:32:22 +01:00
Ganesh Nalawade
343a709800 Fix platform agnostic net_user integration test fail (#25649)
* Fix platform agnostic net_user integration test fail

* Fix minor issue in eos integration test
2017-06-13 18:12:42 +05:30
Matt Martz
cb704a4310 If there are no DOCs provided at all, don't traceback, skip the _ensure_imports_below_docs test (#25621) 2017-06-12 16:47:06 -05:00
Sloane Hertel
3f0c47196e [cloud] s3: deleting a nonexistent bucket should not give a traceback Fixes #25445 (#25487)
* trying to delete a nonexistent bucket should not fail

* Improve error handling for deleting s3 bucket

* Allow successful deletion

* Add test for deleting a nonexistent bucket

rename integration test target from s3 to aws_s3
2017-06-12 13:52:25 -04:00
Ricardo Carrillo Cruz
9725e056bc Add missing register on openvswitch_db integration tests (#25609) 2017-06-12 17:48:59 +02:00
Ricardo Carrillo Cruz
0dbea4575c Add assertions to openvswitch_db integration test (#25600)
* Add missing delegate_to on openvswitch_db integration test runner

* Add assertions to openvswitch_db integration test
2017-06-12 17:41:10 +02:00
Abhijeet Kasurde
da6f6d27e8 Add Description parameter in os_user
Fixes #18914

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-12 10:56:34 -04:00
Ricardo Carrillo Cruz
081e138cf1 Add missing delegate_to on openvswitch_db integration test runner (#25597) 2017-06-12 13:36:51 +02:00
Will Thames
16b877e2b3 ec2_asg and ec2_asg_facts module improvements (#25166)
* ec2_asg and ec2_asg_facts module improvements

Return target group information for both ec2_asg and ec2_asg_facts
modules

Provide RETURN documentation for ec2_asg module

PEP8 fixes for ec2_asg_facts

* ec2_asg: use pagination when describing target groups

In case an ASG has 100s of target groups, ensure that
we get the full result using build_full_result
2017-06-12 07:15:04 -04:00
Ricardo Carrillo Cruz
c296fcb0e0 [WIP] Add openvswitch_db integration tests (#23803)
* WIP Add openvswitch_db integration tests

* Add  ovs.yaml playbook entrypoint for OVS

* Add test case pattern filtering

* Clear out aliases for now

Running tests on posix group just fails, containers do not have ovs
2017-06-12 13:13:41 +02:00
Toshio Kuratomi
3f9d1ab024 Add deps for cryptography to the Docker images (#25580) 2017-06-12 11:14:46 +01:00
Abhijeet Kasurde
b89cb95609 Fix spelling mistakes (comments only) (#25564)
Original Author : klemens <ka7@github.com>

Taking over previous PR as per
https://github.com/ansible/ansible/pull/23644#issuecomment-307334525

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-12 07:55:19 +01:00
Pilou
460d932aa8 postgresql_user: fix bugs related to 'expires' option (#23862)
* Factorize tests related to no_password_change using an include task

* Refactor: deduplicate tasks

* postgresql_user: test 'expires' parameter

* Change 'valid until' even it's the only updated field

* value is changed when another value is provided

* value isn't returned when unset

* Remove unused variable

* psycopg2.extras.DictRow is able to handle comparison

* postgresql_user: simplify helper method

* postgresql_user: define variable just before using it

* Fix comparison between user input and applied configuration

* new test: adding an invalid attribute

* Refactor, add cleaning task

* Check that using same attribute a 2nd time does nothing

* Always try to remove created user

* postgresql_user: fix pep8
2017-06-11 14:48:39 -07:00
René Moser
0a972ea6bf wait_for: add some integration tests (#25553) 2017-06-09 21:35:10 +02:00
René Moser
29817ab115 cloudstack: add tests, fix pep8 (#25518)
* cloudstack: cs_zone: fix pep8

* cloudstack: cs_zone: add tests
2017-06-09 18:48:53 +02:00
Sloane Hertel
b376bde4d7 [cloud] ec2_eni module - allow attaching a new instance - fixes #19452 (#22377)
* fix bug attaching instances

* pep8
2017-06-09 11:31:42 -04:00
Tim Rupp
61684f7313 Updates gtm wide ip module to be feature complete (#25502)
This module is used to manage GTM wide ips on a bigip.
Previously, this module only included a small subset of functionality
primarily related to editing a wide ip that already existed. Additionally
it used the SOAP api for its communication. this patch completes the
feature set of wide ips and refactors the code to use the F5 python SDK
and the REST API.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_gtm_wide_ip.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_gtm_wide_ip/tasks
2017-06-09 16:07:14 +01:00
Ricardo Carrillo Cruz
72e65e4290 Platform agnostic module for VRFs (#25383)
* WIP VRF platform agnostic module

* Fixed examples refering vlans instead of vrfs

* Add integration tests
2017-06-09 13:33:11 +02:00
Ricardo Carrillo Cruz
d83f254bb6 New eos_vrf module (#25427)
* New eos_vrf module

* Add CLI integration tests

* Check rd only if not None
2017-06-09 13:24:28 +02:00
Trishna Guha
91e5fce90f Add ios_user implementation module (#25413)
* Add ios_user module

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

* Integration test for ios_user

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

* Add unit test for ios_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-09 13:50:57 +05:30
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
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
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
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
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
Trishna Guha
36082e32b4 Add integration test for nxos_user (#25464)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-08 13:32:49 +05:30
Trishna Guha
b1b68840be Add missing integration test for eos_user (#25463)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-08 12:28:29 +05:30
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
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
745f72916f bigip tests now skipped if missing lib 2017-06-07 17:24:51 -04:00
Matt Martz
e86b00b917 Make validate-modules a .py file, and symlink back to validate-modules (#25227)
* Make validate-modules a .py file, and symlink back to validate-modules

* Set prog for argparse in valdiate-modules
2017-06-07 14:44:33 -05: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
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
Dag Wieers
4307733e6e Revert the accidental addition of python-lxml (#25432)
I inadvertedly added python-lxml to the cloudstack-simulator Dockerfile.

This PR reverts this specific change.

This relates to PR #25324
2017-06-07 15:59:28 +01:00
John R Barker
a6c078c7fb Add tzdata back (#25433)
It appears that the base Docker images have removed tzdata.
We use tzdata in the debconf tests, so add it back.
2017-06-07 15:54:01 +01: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
Dag Wieers
966b5fd1a0 Add python-lxml to docker images (#25324) 2017-06-07 12:48:16 +01: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
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