Commit graph

21827 commits

Author SHA1 Message Date
HD650
0586cb1536 Check type of fail_msg and success_msg 2018-06-21 13:59:50 -04:00
zhikangzhang
24189e7639 Point out that fail_msg is new in 2.7 2018-06-21 13:59:50 -04:00
zhikangzhang
2333b4474c Rename argument msg to fail msg
This change make the arguments of assert less ambiguous.
2018-06-21 13:59:50 -04:00
Abhijeet Kasurde
065d9ed6ac FreeIPA: Add support for TTL in dnsrecord (#41768)
Fixes: #33969

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-21 13:57:47 -04:00
Ryan Brown
5abb63ea56 Remove unused imports from aws_config_aggregator (#41803) 2018-06-21 13:36:07 -04:00
Ondra Machacek
8f144976df ovirt_auth: In case of token is passed u/p is not requierd (#41788) 2018-06-21 13:15:47 -04:00
Sloane Hertel
ba7d3dab5c Document compose for aws_ec2 inventory plugin (#40621)
* Document compose for aws_ec2 inventory plugin

* split up examples into several parts with some additional comments
2018-06-21 13:15:07 -04:00
Dag Wieers
da49aaf1d9 Add trailing dot and make it a separate item 2018-06-21 12:33:03 -04:00
Camillevau
79982473ca Update docker_container.py
<!--- Your description here -->

 label: docsite_pr
2018-06-21 12:33:03 -04:00
cpollard0
f93a171bb6 [aws][docs] Update max session duration in sts_assume_role documentation(#41765)
Update to reflect assume role updated durations as of March 2018. 
https://aws.amazon.com/blogs/security/enable-federated-api-access-to-your-aws-resources-for-up-to-12-hours-using-iam-roles/

+label: docsite_pr
2018-06-21 12:05:51 -04:00
Mark Phillips
355b56ef00 [docs] Change 'tag' to 'tags' in aws_ec2 inventory examples (#41438) 2018-06-21 10:23:20 -04:00
Martin Krizek
2f60baa5e0 file: clarify attributes usage in docs (#41780) 2018-06-21 10:08:29 -04:00
Paul
b21673b321 Update zabbix_screen.py limit screen columns (#41487)
* Update zabbix_screen.py limit screen columns

Add option graphs_in_row that allows to limit the count of columns on zabbix screen. When graphs_in_row columns is filled, begins to draw next row. If there is many hosts with many graphs each, draws all graphs for one host in an column each below each other

* fix remove whitespaces before and after brackets

Fixing ansible-test sanity --test pep8 errors
moved

* fix documentation parsing error

Fixing error: missing documentation (or could not parse documentation): expected string or buffer
2018-06-21 07:36:18 -04:00
Loïc
b61b113fb9 new provider: ownca (#35840) 2018-06-21 12:41:00 +05:30
Sloane Hertel
c4a6bce69f ecs_service: make assign_public_ip option a boolean (#41759) 2018-06-21 12:17:01 +10:00
Toshio Kuratomi
3ea936312a Remove an unnecessary import from the ansiballz wrapper (#41747) 2018-06-21 12:04:55 +10:00
Jordan Borean
11bd3fd318 win_updates fix when win_updates is run with async (#41756) 2018-06-20 14:52:24 -07:00
Toshio Kuratomi
8bd245a6a2 Fix file state=touch not returning diff information
Fixes #41755
2018-06-20 14:51:27 -07:00
Tim Rupp
58d857f235
Marks select modules as stableinterface (#41741)
this is being required by customers so that they may adopt ansible
and F5's work in ansible.
2018-06-20 12:16:43 -07:00
Adam Miller
80940a6b1c ensure copy action plugin returns an invocation in result (#41426)
* ensure copy action plugin returns an invocation in result

Fixes #18232

Previously the action plugin for copy, which runs operations on the
control host to orchestrate executing both local actions on the
control host and remote actions on the remote host, is not returning
invocation dict in the result dict, this happens here where the
return from _copy_file() is None

When force is True, the _execute_module() method is called, which
returns the dict containing the invocation key. This patch ensures
there is always an invocation key.

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix conditional, handle content no_log

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-20 14:35:47 -04:00
Evgeni Golov
e601caf873 lineinfile: add regex as an alias for regexp (#20454)
the param is called regexp, but a lot of people spell it regex
add an alias to help them
2018-06-20 12:54:33 -04:00
Sumit Jaiswal
c989b62eef
To fix eos_vrf failure when transport method is eapi (#41470)
* resolve bug 40930

* resolve bug 40930

* to fix review comments

* to fix review comments

* reverting the changes based on review
2018-06-20 21:32:54 +05:30
Brian Coca
05a49d6eb6
handle groups correctly when they are 'null' (#41698)
* handle groups correctly when they are 'null'

 - even if defined as mapping but having no keys, objects shoudl still be processed correctly
 - also add ansilbe_verbosity to vars not to display in ansible-inventory

fixes #41692
2018-06-20 11:26:46 -04:00
Deepak Agrawal
e91cee1a31
net_put module: add default mode to copy binary files (#41476)
* add default mode to copy binary files

* sanity fix

* add version for new options
2018-06-20 16:02:49 +05:30
Martin Krizek
2e68811c34 apt: fix apt-mark on debian6 (#41530) 2018-06-20 05:57:59 -04:00
Kevin Breit
543a7469b7 New module - meraki_switchport (#41634)
* Initial commit for meraki_switchport module
- Query or modify swichport configurations
- Further optimizations are available
- Integration tests will require manual editing of file for others

* Remove blank lines
2018-06-20 09:48:30 +02:00
Kevin Breit
b8c39a0875 New module - meraki_config_template (#41633)
* Implement configuration template management
- Queries or removes templates
- Can bind or unbind templates to networks
- Module is idempotent only for binding and unbinding
- Meraki does not allow template creation via API
- Integration test is tedious b/c previous bullet point
- Fixed bug in construct_path() so it won't set self.function

* PEP8 changes

* Re-enable some integration tests, use variables, and fix broken code
2018-06-20 09:47:31 +02:00
Kevin Breit
618c3c508f New module - meraki_vlan (#41632)
* Initial commit of meraki_vlan module
- Create, delete, modify, and query VLANs within a network
- Support for all allowed objects in the VLAN data structure
- Meraki defaults networks to have VLANs disabled and there is no
way to use the API to enable VLAN support. It must be enabled
manually.

* Fix formatting error in documentation

* Formatting changes and added documentation

* PEP8 fix
2018-06-20 09:46:15 +02:00
Kevin Breit
7c888b86ba New module - meraki_device (#41631)
* Initial commit for meraki_device module
- Allow claiming, removal, updating, and querying of devices
- Integration tests are included
- Integration tests are not complete because physical gear is required
- Integration tests also require Meraki subscriptions

* Added support for serial number query without network

* Added support for net_id and net_name

* Changes recommended by ansible-test for PEP8 and documentation

* Remove duplicate state in example

* Fix typo
2018-06-20 09:44:50 +02:00
Kevin Breit
564fe87b29 Improve support for org_id in module (#41519)
- Faster performance since it reduces number of API calls
- Also simplified some of the execution
2018-06-20 09:41:53 +02:00
Kevin Breit
62bad5d592 Remove notes since it's already specified in the doc fragment (#41614) 2018-06-20 09:40:47 +02:00
Kevin Breit
cccaf951fa Improved support for parameter testing and checks for org_id (#41517) 2018-06-20 09:40:10 +02:00
Kevin Breit
4a0b8f5123 Added support for passing org_id instead of org_name (#41518)
- Faster execution if passed instead of org_name
- Updated documentation
- Added additional integration tests
2018-06-20 09:39:25 +02:00
Kevin Breit
5ee0c0af18 Meraki_snmp - Add examples for SNMP documentation (#41424)
* Add examples for SNMP documentation

* Removed whitespace for PEP8
2018-06-20 09:38:10 +02:00
Kevin Breit
7058f11e1d Removed redundant documentation (#41422)
- Removed response documentation on keys which are standard across
modules.
2018-06-20 09:36:57 +02:00
Kevin Breit
9c4e5a2b30 Add proper response documentation (#41370)
- Added response documentation for organizations
- Additional information is likely to be added later
2018-06-20 09:35:11 +02:00
Abhijeet Kasurde
671babd9aa openssl_csr: Update example (#41677)
Update example of Subject Alternative Name with dynamic list.

Fixes: #33676

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-20 02:28:59 -04:00
Abhijeet Kasurde
b5c18ea2bd
VMware: Add timeout in wait_for_task (#39596)
* VMware: Add timeout in wait_for_task
* Added exponential backoff algorithm
* code review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-20 11:23:58 +05:30
Ryan Brown
84612577ba [aws] Remove unused return in ec2_vpc_dhcp_option_facts module (#41709) 2018-06-19 16:36:45 -04:00
Ryan Brown
531cdddeed [aws] Remove unused return in ec2_vpc_igw_facts module (#41708) 2018-06-19 16:31:18 -04:00
Ryan Brown
a01a17c772 [aws] Remove extra variable definition in ec2_vpc_nacl module (#41707) 2018-06-19 16:29:56 -04:00
Ryan Brown
22f1b71be0 [aws] Remove unused variable in ec2_asg module (#41706) 2018-06-19 16:23:41 -04:00
Brian Coca
89f169127b added missing raise 2018-06-19 16:21:16 -04:00
Abhijeet Kasurde
174d969714 Correct defaults in lxc and lxd connection plugin
remote_addr value defaults to inventory_hostname, current defaults
seems to be copy-paste error.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-19 15:45:18 -04:00
Ryan Brown
956fe7362d [aws] Fix unused return value in ec2_vpc_vgw_facts module (#41697) 2018-06-19 14:46:24 -04:00
Sloane Hertel
1268ce4d4f [ecs_service] fix assign_public_ip network configuration to module parameter rather than fixed string (#41689)
Fix parameter name

Use suboptions

document suboptions

Add a test to assert assign_public_ip is configurable
2018-06-19 14:35:53 -04:00
Abhijeet Kasurde
37293dec3d Raise Exception in virtualbox inventory plugin
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-19 14:33:52 -04:00
Ryan Brown
67d6e8177e [aws] remove unused variable in iam_user module (#41695) 2018-06-19 14:32:56 -04:00
Ryan Brown
1118e441e9 [aws] lambda_policy: Remove spurious definition of policy variable (#41693) 2018-06-19 14:30:04 -04:00
Ryan Brown
fd8cc775a7 [aws] Simplify conditional in iam_cert module (#41691) 2018-06-19 14:28:43 -04:00
Lindsay Hill
0713925f3d Fixed SLX-OS docstring inconsistency (#41662) 2018-06-19 13:15:47 -05:00
David Moreau Simard
89a9fb79da Add RETURN docs for the pip module (#39907)
The pip module returns some things. Let's document them.
2018-06-19 13:34:14 -04:00
Ryan S. Brown
52acec3455 [aws] Remove double-defined variable from iam_policy module 2018-06-19 11:50:16 -04:00
Jacob
617093efa7 Add upgrade ('latest') support to pkgng module (#41623)
* Add upgrade ('latest') support to pkgng module

* fixup for bad yaml

* fixup for bcoca review:
- add `version_added:` to description
- change examples to use `name:` and remove comments
- DRY out install_packages()
- clean up state conditional check in modules.params

* fixup to remove extra whitespace

* fixup to handle custom pkgsite when checking for updates

* fixup to remove misleading `version_added:`
2018-06-19 10:42:22 -04:00
Ryan S. Brown
a5ec29ed49 Fix exception message in AWS lambda module 2018-06-19 10:11:14 -04:00
Adam Miller
6a620a1ed9 add notes to service_facts about accessing fact data (#41608)
* add notes to service_facts about accessing fact data

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove unquoted :

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-19 09:33:20 -04:00
Nilashish Chakraborty
837c216587
Fix vyos_vlan aggregate issue & added tests (#41638)
* Fix vyos_vlan aggregate issue & Added tests

* Fix #2 for vyos_vlan aggregate issue
2018-06-19 18:50:28 +05:30
Ryan Brown
7dcaef8115
Fix aws_config_aggregator argument count error (#41686) 2018-06-19 08:48:46 -04:00
Deepakkothandan
5a72eef0a3 [ecs_service] fix assign_public ip for network configuration (#41685)
* fix assign_public ip for ecs_service

* used module.botocore_at_least instead of distutils
2018-06-19 08:46:40 -04:00
Kristian Østergaard Martensen
d8fc027db5 [docs] Include "_facts" in module examples section (#41680)
The example says module name: "cloudwatchlogs_log_group"
where it should say: "cloudwatchlogs_log_group_facts"

+label: docsite_pr
2018-06-19 08:25:24 -04:00
Tim Rupp
6c654b6947
Fixes the default assignment of values (#41672)
Fixes: #41640

The defaults should be inherited from the parent during initial
creation. This patch fixes that.
2018-06-18 16:06:13 -07:00
Jason Tedor
f71ad4e315 Enable to use greedy checks for outdated casks (#40799)
* Enable to use greedy checks for outdated casks

When using brew cask outdated to check if an installed cask is outdated
or not, brew cask will skip casks that have auto_updates set to true or
version: latest. This means that Ansible tasks using the homebrew_cask
module to upgrade packages installed by brew cask will miss upgrading
such packages. However such packages can still be managed by brew cask
so we need to be able detect such packages. This can be done with the
--greedy flag passed to brew cask outdated as this will also include
such packages that are outdated. This commit adds a greedy parameter to
the homebrew_cask module to enable upgrading such packages using Ansible
tasks with the homebrew_cask module. The default behavior preserves the
same behavior as today. Example usage would be:

- homebrew_cask:
  name: 1password
  state: upgraded
  update_homebrew: yes
  greedy: yes

* Fix test issues

* Add extra comma to match style
2018-06-18 17:30:32 -04:00
Jonathan Davila
a79b6ec8a2
Update my own author email in comments block
my ansible/redhat email is not valid, replacing it with something that is.
2018-06-18 16:15:31 -04:00
Andrew Gaffney
729e7471d6 Fix name of action plugin in error message (#41665) 2018-06-19 01:21:38 +05:30
Pilou
3e6c76fc2e Scaleway inventory plugin: small improvements (#41642)
* scaleway inventory: token is mandatory

* scaleway inventory: mention exception in error

* scaleway inventory: remove print statement

* scaleway inventory: options don't need to be attr

* scaleway inventory: remove unused attr
2018-06-18 13:54:38 -04:00
Matt Martz
ee221859cd
Load role vars and defaults before parsing tasks (#40982)
* Load role vars and defaults before parsing tasks. Fixes #40163

* Add porting guide note

* Wording clarifications

* typo

* grammar fixes
2018-06-18 10:56:55 -05:00
James Cassell
23fbe0ce8e update play_context for reset_connection (#40866)
steps taken from lib/ansible/executor/task_executor.py

fixes: https://github.com/ansible/ansible/issues/27520
2018-06-18 11:10:16 -04:00
Justin
6bd7d71cc1 Fix vmware host config for all vmware OptionTypes (#41343)
* Fix vmware host config for all vmware OptionTypes

Setting some options and option types failed with invalid value errors being return from vmware, this resolves all known ways that issue can occur.

* Add logic for integer inputs as string

For example - "UserVars.ESXiShellInteractiveTimeOut": "20"

Fixes #40180
Fixes #41212
2018-06-18 19:57:37 +05:30
Markos Chandras
1737b7be3e facts: suse: Fix major version detection for SUSE (#41416)
When parsing the distribution files such as /etc/os-release, we extract
the full distribution version but not the major version. As such, the
ansible_distribution_major_version ends up being 'NA' whereas the
ansible_distribution_version contains the full version.

Before this patch we get this on openSUSE Leap 15

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "NA"}, "changed": false}

After this patch we get this

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "15"}, "changed": false}

This also fixes the Tumbleweed distribution test to report a proper
major version and also adds a test for openSUSE Leap 15.0 to avoid
potential future regressions.

Fixes: #41410
2018-06-18 09:53:50 -04:00
Jon Dufresne
bf304832ff Prefer readthedocs.io instead of readthedocs.org for doc links (#41537)
Read the Docs moved hosting to readthedocs.io instead of
readthedocs.org. Fix all links in the project.

For additional details, see:

https://blog.readthedocs.com/securing-subdomains/

> Starting today, Read the Docs will start hosting projects from
> subdomains on the domain readthedocs.io, instead of on
> readthedocs.org. This change addresses some security concerns around
> site cookies while hosting user generated data on the same domain as
> our dashboard.
2018-06-18 08:22:50 -04:00
Sloane Hertel
8047d97ffc
read scaleway option after the options have been set (#41259) 2018-06-18 07:59:52 -04:00
Abhijeet Kasurde
fb7fdc53ec
Fix typo in group_by module (#41627)
Fixes: #31600

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-18 15:33:08 +05:30
saichint
119e6d680b fix nxos_linkagg issue (#41550)
* fix nxos_linkagg issue

* fix shippable
2018-06-16 20:23:29 +05:30
Kevin Breit
674dd3b10d Add docstrings to meraki module utility methods
PR #41369

Co-authored-by: Kevin Breit <kevin.breit@kevinbreit.net>
2018-06-16 14:10:34 +03:00
Tim Rupp
16466f3171
Fixes usage of popen in bigip iapplx package (#41612)
This functionality is superceeded by the run_command method in the
ansible module class.
2018-06-15 15:41:57 -07:00
Toshio Kuratomi
5c614a59a6 Temporarily revert c119d54
There were bugs in this that needed to be resolved.  No time to get the
fix reviewed sufficiently for 2.6.0.

We'll get this into 2.7.0 and try to get this into 2.6.1 as well.

Will need the work done in https://github.com/ansible/ansible/pull/36218
when it does get merged.
2018-06-15 13:00:54 -07:00
Sam Doran
6fa2d9ac6f Update user module docs (#41572)
* Clarify append and groups behavior
* Document return values
2018-06-15 10:38:01 -07:00
Sharp Hall
3935cce394 docker: Allow publishing of ports with the same number but different protocol (#38412)
* Don't deduplicate docker container ports with different protocols

* Test _parse_exposed_ports
2018-06-15 12:36:20 -04:00
Abhijeet Kasurde
f21307da91 Add more info related to galaxy sub commands (#41085)
Fixes: #17469

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-15 12:12:13 -04:00
schp
63f2ad8776 sort the port list properly (.sort() returns None) 2018-06-15 06:38:33 -07:00
Ivica Kolenkaš
0691c9c099 setting LANG, LC_ALL and LC_NUMERIC to C (#41544)
* This forces the fact gathering commands to use C locale, preventing
weird locale issues such as different separator etc
2018-06-15 17:55:54 +05:30
Abhijeet Kasurde
a94ddedfd3 Correct typo from 'Valut' to 'Vault' (#41574)
Correct typo from 'Valut' to 'Vault'

+label: docsite_pr
2018-06-15 07:08:04 +02:00
Felix Yan
d352cf514e Fix some typos in config/base.yml (#41363) 2018-06-14 23:53:41 -04:00
David Zager
00b397cfdb Update APB templates (#41559) 2018-06-14 17:05:30 -04:00
James Simpson
8357ae69e7 Fixes #35622 (#41522) 2018-06-14 23:13:46 +05:30
Trishna Guha
f170298332
fix nxos edit_config for httpapi and have uniform load_config (#41358)
* fix nxos load_config for httpapi and migrate to cliconf

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

* add comment

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

* address review comment

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

* address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-06-14 22:02:12 +05:30
John Imison
0d885260a5 Adding success_msg to assert (#41048)
* Adding success_msg to assert

* Added missing version_added. Importing and checking string_types.
2018-06-14 11:34:04 -04:00
Nathaniel Case
50e776877d
Check for ConnectionError on change of config or commands (#41504) 2018-06-14 09:45:54 -04:00
Andreas Calminder
75e9b76c15 accept + and - modifiers for file attributes (#40061)
* accept + and - modifiers for file attributes
* tests for adding/removing file attributes
2018-06-14 06:31:14 -07:00
Trishna Guha
8ab0d654f3
don't retrieve config in running_config when config is provided for diff (#41400)
* don't retrieve config in running_config when config is provided for diff

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

* fix for eos, nxos

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

* add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-06-14 18:02:19 +05:30
Biao Liu
d90d8e7f99 Add cli and netconf ability from ansible itself for cloudengine ce modules (#41357)
* for shippable

for shippable

* add cliconf

* add network_cli

* add cliconf and network cli and netconf

* modify bugs of netconf

* add shippable modify

* update shippable

update shippable
2018-06-14 09:38:27 +05:30
saichint
79dd206b3e fix reload smu issue (#41270)
* fix reload smu issue

* review comments
2018-06-14 09:17:33 +05:30
Ben Berry
32c191ee9c expand user before calling abspath (#40196)
* expand user before calling abspath

* omit expanduser code smell check for volumes
2018-06-13 21:18:02 -04:00
Brian Coca
414aae70b1 corrected version 2018-06-13 15:07:40 -04:00
plumbeo
9b0883c70d Add nomask option to the acl module (#39810)
* Add nomask option to the acl module

* acl: allow to choose if and when to recalculate the effective right masks of the files
2018-06-13 15:08:00 -04:00
Adam Miller
c4bf168940 service_facts correct meaning of state for systemd service units (#40914)
* service_facts correct meaning of state for systemd service units

Fixes #40809

Previously this module used the commend `systemctl list-unit-files
--type=service` to query state of services but list-unit-files only
shows enabled vs disabled which is not what we want for "state"

Signed-off-by: Adam Miller <admiller@redhat.com>

* make sure to define service_name before referencing it

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-13 15:01:48 -04:00
jaevans
75443b2094 Add support for Tower Smart inventories (#41458)
* Support Smart Inventories

Add kind and host_filter fields and pass through to tower_cli.

* Add documentation for new Smart Inventories options

* Add missing description header for host_filter documentation

* Add version added tags to new options

* Bumped vesion_added to 2.7
2018-06-13 13:00:05 -04:00
Simon Dodsley
8df02ac37e Fix race condifiton where multiple hosts can try and create or delete (#39698)
the same volume, snapshot or hostgroup,
2018-06-13 09:52:51 -07:00
Matt Martz
3832d04611 Ensure we raise the exception caught _post_validate_environment->_parse_env_kv. Fixes #41322 (#41411) 2018-06-13 12:22:07 -04:00
Zim Kalinowski
5b0bb91c72 reappied changes in a new pr (#41228) 2018-06-13 15:42:29 +08:00