Commit Graph

20580 Commits (5d90ebb28ef8771ef5dbf88956179d050d381e6e)

Author SHA1 Message Date
David Passante abae7a49f7 Fixes #37824. cloudstack: do not rely on APIs list queries for names (#37910) 6 years ago
nathanwebsterdotme ce6595b567 aws_ssm_parameter_store - Make the module idempotent (#36252)
* Make the module idempotent

* pep8 fixes.

* Made required changes for overwrite_value for idempotency.

* Fix missing error definition

* Add in missing documentation variable.
6 years ago
Matt Martz 6051ef4041
Revert accidental addition of Mapping in #37741 (#37939) 6 years ago
Matt Martz ffbbb5a25b
Use arg_spec type for comparisons on default and choices (#37741)
* Use arg_spec type for comparisons on default and choices

* Further improve type casting

* Make sure to capture output in more places

* Individually report invalid choices

* Update ignore.txt after resolving merge conflicts
6 years ago
Toshio Kuratomi 9890ce47e8 Optimizations in mod_args parsing
* Make it less likely that we have to identify all the modules during
  a playbook run.  PluginLoader is optimized to look for modules one
  directory at a time.  If we find a module before we've examined all
  the directories we never have to touch the other directories.
  Reordering this conditional makes it so tasks which don't have
  a module file will not force us to examine all the module directories
  before moving on to other sources of task actions.
* Change several variables we consult to see if a task is in a certain
  category from lists/tuples to frozensets.  These are static lists
  which we only do containment tests on so frozensets should be faster
6 years ago
Matt Martz 1f824bd620 Don't overwrite builtin jinja2 filters with tests (#37881)
* Don't overwrite builtin jinja2 filters with tests. Fixes #37856

* Fix tests and other callers of _get_filters
6 years ago
Nathaniel Case 169209c32a
Put back $PATH checking in ansible-connection call (#37933) 6 years ago
saichint 0df5cfd41f fix nxos_static_route issues (#37614)
* fix nxos_static_route issues

* remove nxos_static_route from ignore
6 years ago
Matt Martz 0dcd8b598c
Don't assume that self._task.action is copy, explicitly set. Addresses #37238 (#37777) 6 years ago
Ganesh Nalawade 8eaa9cc938
Fix junos modules check_mode issue (#37311)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
6 years ago
Adam Miller 7cd3d9cc1a Correct msg to detect idempotent yum groupinstall (#37858)
The message text used to check stderr for a warning about
groupinstall in order to determine if a change occurred is specific
to the version of yum that is in RHEL7 and newer. This change simply
removes a couple words off the end in order to only use text found
in the warning message in older versions of yum.

Fixes #35982

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Abhijeet Kasurde f0fd0f219d Hide apikey from log in uptimerobot (#37342)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Heusini 702b5a3e81 Added poweroff_guest vm and reboot_guest vm in vsphere_guest (#34348) 6 years ago
Abhijeet Kasurde adbda67151 New module: digital_ocean_domain_facts (#37269)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Will Thames 681c69f8c1 Fix the aws_kms_facts module name in module docs (#37902)
Forgot to update the examples when the module name changed to
have the `aws_` prefix
6 years ago
Sloane Hertel ba0ff415a0 [cloud] ec2_vpc_nacl: add documentation about ingress and egress rules (#37747)
Fixes #25152

Use suboptions
6 years ago
Nate 2c44061a04 append request headers instead of replacing (#37845) 6 years ago
Jordan Borean b7ce2b1c5a
win_certificate_store: fix typo stopping key_storage from working (#37810) 6 years ago
Eric Brown e95e9de235 Typos in the yaml inventory plugin
This patch fixes up some English typos in the yaml inventory
plugin documentation.

* s/specifically/specific
* s/as/as an

Signed-off-by: Eric Brown <browne@vmware.com>
6 years ago
Strahinja Kustudic 68ff986708 Fix 'repomd.xml signature could not be verified' (#35989)
If a repo with `repo_gpgcheck=1` is added and the repo GPG key was never
accepted, quering this repo would throw an error `repomd.xml signature
could not be verified` and the module would fail. If that happens now
`yum -y makecache` will be run which will fetch the new repo data and
accept the repo GPG key.
6 years ago
Alex Tsitsimpis c3ab6cb9b1 template: Add option to `lstrip_blocks' and fix setting`trim_blocks` inline (#37478)
* template: Add integration tests for `lstrip_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Fix passing `trim_blocks' inline

Fix passing `trim_blocks' option to the template module as inline
argument. Previously passing the `trim_blocks' option inline instead of
using the YAML dictionary format resulted in it always being set to
`True', even if `trim_blocks=False' was used.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add option to `lstrip_blocks'

Add option to set `lstrip_blocks' when using the template module to
render Jinja templates. The Jinja documentation suggests that
`trim_blocks' and `lstrip_blocks' is a great combination and the
template module already provides an option for `trim_blocks'.

Note that although `trim_blocks' in Ansible is enabled by default since
version 2.4, in order to avoid breaking things keep `lstrip_blocks'
disabled by default. Maybe in a future version it could be enabled by
default.

This seems to address issue #10725 in a more appropriate way than the
suggested.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add integration tests for `trim_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Check Jinja2 support for `lstrip_blocks'

Since the `lstrip_blocks' option was added in Jinja2 version 2.7, raise
an exception when `lstrip_blocks' is set but Jinja2 does not support it.
Check support for `lstrip_blocks' option by checking `jinja2.defaults'
for `LSTRIP_BLOCKS' and do not use `jinja2.__version__' because the
latter is set to `unknown' in some cases, perhaps due to bug in
`pkg_resources' in Python 2.6.6.

Also update option description to state that Jinja2 version >=2.7 is
required.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
6 years ago
Martin Krizek 687f3bbef3
apt: fix mark when no packages (#37835) 6 years ago
David Passante 270e799cb6 cs_vpc_offering: listVPCOffering API returns any matching names (#37783)
* fix listVPCOffering API method returns any matching names

* fix build_ci no-underscore-variable

* clearer variable name

* making it simpler
6 years ago
Martin Krizek 00d9345158
apt: mark installed packages manual (#37751)
* apt: mark installed packages manual

* Add fallback for when manual is not a thing
6 years ago
Jordan Borean ca225d6da0
Changed Azure SecurityRule to use kwargs instead of positional args (#37695) 6 years ago
Fredrik Holmberg e06f3463fd Typo in ipaddr filter (#37592)
interger = integer
6 years ago
Colin Nolan a4a2b4a381 consul_kv: decodes kv values from Consul to utf-8 (#35894)
* Decodes kv values from Consul to utf-8.

* Switches to using module utils to perform text decoding.

* Adds self to authors list to help community maintenance.
6 years ago
Tim Werner a51a699314 make jira authentication Python3 compatible (#33862)
* make jira authentication Python3 compatible
6 years ago
Brian Coca 3bec76fc85 Avoid 2nd processing of facts for actions
include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes #37535, mostly by avoiding reprocessing and 'cleaning'
6 years ago
Toshio Kuratomi 0633f73faf Fix loader for filters (#37748)
* Fix loading of filter and test plugins

Filter and test plugins are different than other plugins in that they
can have many plugins in a single file.  Therefore they need to operate
a little differently.  They need to have all of the potential files
returned.  Then the caller takes care of passing those onto jinja2 in
order for jinja2 to make use of them.

This problem was (most recently) introduced with f921369445

This commit also restructures how we deduplicate plugins to take paths
into account.  If we want to start scoping which set of modules are
loaded (due to roles, for instance) we'll need to hang on to the path
information.

* add integration test for override

* Fix style checks for bcoca code

* Implement jinja2 plugin loader as a subclass

Having a subclass allows us to customize the overriding of jinja
plugins.  We can then move common parts of common code into the Loader.
6 years ago
chenl87 e501134755 [aws] Register scalable target prior to creating/deleting a scaling policy (#35632)
* Added missing scalable target creation

* Changed if statement

* Added support to results of all actions

* Fixed line lengths, whitespaces and blank lines between functions

* Fixed documentation formatting

* Work in progress, fixed returns from functions, still need to do exception handling

* Work in progress, still need to do exception handling

* Moved to AnsibleAWSModule, Added exception handling

* Added detailed return doc

* Fixed return doc alarms

* fixed return yaml

* Fixed function calls when creating/deleting

* fixed unnecessary blank line

* removed imports and unnecessary checks handled by AnsibleAWSModule

* removed whitespace
6 years ago
Ravi 340064bfb9 Fix python3 interpreter issue (#34811) (#35176)
* Fix python3 interpreter issue (#34811)

* Update ansible.module_utils._text (#34811)

* Convert to text later to account for multibyte characters
6 years ago
Sloane Hertel da3f7a8db1 [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock - fixes #37003 (#37010)
* [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock

Add module warnings rather than silently skipping

* Permit warnings for routes tables containing vpc endpoints to be turned off

* Add tests to ensure a VPC endpoint associated with a route table does not result in a traceback
6 years ago
Sloane Hertel 3a5a0fed06 [cloud] ec2_ami_copy: undeprecate wait_timeout to allow modifiable timeouts again to allow a longer timeout than 600 seconds (#37680)
Fixes #37111
6 years ago
Tony Goetheyn 868811adbc Documentation update (#37782)
- Mention Perl requirement for customisations to work in Linux based OS.
- Fix typo
6 years ago
Lachlan Cooper fcbee7e40b Check that output from list_vhosts can be split (#37630)
As with list_users, list_vhosts can sometimes return a value that
doesn't contain a '\t' character. This appears to be the case if the
server has no vhosts, for example.

The same fix was applied to the rabbitmq_users module here:
fafb89cde5
6 years ago
Alessandro Asoni 6ad784bbbb Fixed issue with accessing response in digital_ocean module (#37268) 6 years ago
Will Thames 9802088082 New generator inventory plugin (#37690)
* New generator inventory plugin

Allows construction of hosts and groups through cartesian
product of various group combinations

* Add generator plugin documentation
6 years ago
Dag Wieers 2c2f335893
win_psexec: Fix pslint issues (#37718) 6 years ago
Dag Wieers de5fb66026
win_product_facts: Fix pslint issues (#37722) 6 years ago
Zim Kalinowski fef5f01b11 adding possibility to specify resource group for referred virtual net… (#36768)
* adding possibility to specify resource group for referred virtual network

* fixed sanity issues

* removed trailing whitespace

* added test

* fixed documentation

* try to fix unstable test

* Tidied up the description of virtual_network_resource_group
6 years ago
Zim Kalinowski 9fb04d20e1 azure_rm_networkinterface: don't query subnet as it's not necessary (#36826)
* don't query subnet as it's not necessary

* fixed pep8?

* another attempt to fix pep8 indentation
6 years ago
Dag Wieers bc4f8a6786
win_tempfile: Fix pslint issues (#37720) 6 years ago
Jordan Borean 04539ca448
Updated text for azure_rm_virtualmachine around images that can be used (#37686) 6 years ago
Zim Kalinowski 0b828ee830 azure_rm_virtualmachine: adding possibility of disabling public ip address (#36766)
* adding possibility of disabling public ip address

* fixed indent

* fixed whitespace

* fixed mistake

* try to create test with vm without public ip address

* try to fix test

* another attempt for test

* fixing test

* create vm with no ip with different name and delete it immediately

* a few additional fixes

* another attempt to pass test

* must be deleted

* simplified no ip test

* reorganised tests

* Wrapped choice in C()
6 years ago
Zim Kalinowski 89401f13f7 azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)
* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt
6 years ago
Dag Wieers fdc0e5c5fb
win_defrag: Fix pslint issues (#37719) 6 years ago
Dag Wieers f78b415db0
win_wakeonlan: Fix pslint issues (#37717) 6 years ago
Yuwei Zhou 8c819dd9cb Support MSI for ansible on Azure resources (#36634)
* msi

* add env and param

* add msi in default

* add azure_rm

* add document

* subscription param

* if not enabled msi

* remove the msi in default mode since the infinite loop will block if not enabled msi

* lint

* lint

* Update azure_rm_common.py

* fix

* catch exc and make error message more friendly

* lint

* Minor docs changes to the msi source option
6 years ago
Matt Clay aee01564a9 Clean up non-standard module shebangs. 6 years ago