Commit Graph

24740 Commits (7e92ff823e2bf97ee33c1b7ff87bb8acecb5ae77)

Author SHA1 Message Date
Toshio Kuratomi 7e92ff823e Split up the base_parser function
The goal of breaking apart the base_parser() function is to get rid of
a bunch of conditionals and parameters in the code and, instead, make
code look like simple composition.

When splitting, a choice had to be made as to whether this would operate
by side effect (modifying a passed in parser) or side effect-free
(returning a new parser everytime).

Making a version that's side-effect-free appears to be fighting with the
optparse API (it wants to work by creating a parser object, configuring
the object, and then parsing the arguments with it) so instead, make it
clear that our helper functions are modifying the passed in parser by
(1) not returning the parser and (2) changing the function names to be
more clear that it is operating by side-effect.

Also move all of the generic optparse code, along with the argument
context classes, into a new subdirectory.
6 years ago
Toshio Kuratomi afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
6 years ago
Toshio Kuratomi c18da65089 Add a CLIArgs Singleton class that will hold the parse cli arguments 6 years ago
Toshio Kuratomi 5844c8c7f0 Cleanups to the common.sys_info API
* Move get_all_subclasses out of sys_info as it is unrelated to system
  information.
* get_all_subclasses now returns a set() instead of a list.
* Don't port get_platform to sys_info as it is deprecated.  Code using
  the common API should just use platform.system() directly.
* Rename load_platform_subclass() to get_platform_subclass and do not
  instantiate the rturned class.
* Test the compat shims in module_utils/basic.py separately from the new
  API in module_utils/common/sys_info.py and module_utils/common/_utils.py
6 years ago
Dag Wieers f90ec17465
ACI: Implement encoded query_string (#50358)
This requires urldecode support in Ansible
6 years ago
Dag Wieers f45c41ef3e urldecode filter for Jinja2 (#28503)
* urldecode filter for Jinja2

We needed this in order to deconstruct correct URLs using Jinja2.
And we might as well upstream this.

* Add integration tests

* Fixes for Python 3

* Add urlencode for older Jinja2
6 years ago
Matt Martz 3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
6 years ago
Jordan Borean 63e454a4b2 dnf - fix conf_file loading (#50515) 6 years ago
drewmullen 04a9a887d5 allow for vault enterprise namespaces (#50462)
* enable namespaces feature for hashi_vault lookup

* include version_added dict in options documentation
6 years ago
Dag Wieers d863027159 Windows: Add missing parameter types and doc fixes (#50232)
* Windows: Add missing parameter types and doc fixes

This PR includes:
- Adding missing parameter types
- Various documentation fixes

* Update lib/ansible/modules/windows/win_copy.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_credential.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_computer.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_user.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_environment.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_psexec.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_uri.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_wait_for.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Ensure docstrings are raw strings
6 years ago
Peter Kirby 5a8aa7ca1f Fixes #37209 - Added complex return value, instance (#49989) 6 years ago
Richlv ff4af614e1 Update zabbix_action.py (#50490)
* Add trailing dots for consistency.
* Document how the current host can be specified for "run_on_hosts".

+label: docsite_pr
6 years ago
Abhijeet Kasurde ae404d1476 gcp: documentation update (#50183)
* gcp: documentation update

* Update example about dynamic inventory
* minor typo fixes in gcp_utils
* Additional information about enabling inventory plugin in ansible.cfg

partially fixes: #44404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ondra Machacek 362e603eb3 ovirt_host: Improve failed upgrade check (#50489) 6 years ago
Wojciech Sciesinski df93e08d6a Add choices of the state parameter documentation (#50481)
* Add choices of the state parameter documentation

* Consistency
6 years ago
lolcube e295315ef7 add openssh_cert module (#49605)
* add openssh_cert module

* fix some linter issues

* address review feedback

* add basis for integration tests

* change valid datetime formats

* handle principals as set not as list

* handle principals as set not as list

* handle principals as set not as list
6 years ago
Felix Fontein 5c5cd2dc4d openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.
6 years ago
Felix Fontein a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
6 years ago
Felix Fontein 6b33c588d0 docker_swarm_service: Fix typo for option type (#50483)
* Fix typo for option type in docker_swarm_service.

* Add changelog.
6 years ago
Joseph Benden d810acf7a5 Add support for Kali Linux detection. (#50331)
Signed-off-by: Joseph Benden <joe@benden.us>
6 years ago
Adam Miller ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Wojciech Wypior 3ef71e529a added new module to manipulate signatre sets on ASM policy (#50209) 6 years ago
Wojciech Wypior 78e81b2965 fixed a bug in transform_name (#50213) 6 years ago
Eric L 69deb73803 Fix firewalld module failing on missing protocol. (#50242)
Under Python 3.7 at least, the split of the port field fails
ungracefully if there is no slash. The fix also addresses the
case of an empty protocol after the slash.
6 years ago
Remi Verchere 23706dbc20 Add support for NRDP notifications (#39297)
* Add support for NRDP notifications

* Correct pep-8 check, adding copyright

* Correct pep-8 check using autopep8

* Update nrdp to 2.6 version

* Update nrdp to 2.7 version

* Use internal ansible url and options modules

* Remove useless comments

* Add option to validate https certs

* Update nrdp to 2.8 version

* Correct nrdp pep8
6 years ago
Kortum, Kevin e2f6598e3f - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Stephan Schwarz deba5f0e54 Added Ansible UTM Module for managing reverse proxy auth profile entries. 6 years ago
Kortum, Kevin d3865a0a8a - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Johannes Brunswicker 617e20e955 Added Ansible UTM Module for managing reverse proxy frontend entries 6 years ago
Kortum, Kevin e52b6c8554 - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Johannes Brunswicker d556d27825 Added Ansible UTM Module for managing reverse proxy location entries 6 years ago
Yuwei Zhou 14129b09f7 rename force to force_delete_nonempty (#50290) 6 years ago
Felix Fontein 26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
6 years ago
René Moser e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
6 years ago
Simon Dodsley 507f89e693 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict
6 years ago
curry9999 9fb4e24660 Documentation remove escape r (#50277)
* A colon is not described

* dddd

* Update branch
6 years ago
Simon Dodsley cda4010024 Fix bad placement of array variable (#50256) 6 years ago
Felix Fontein 04e2a94687 Improve tagging examples. (#50321) 6 years ago
Felix Fontein a1dfce3aa1 ACME: add seealso references (#50320)
* Add seealso references to ACME modules.

* Bump to latest drafts.
6 years ago
Adam Miller 33156712a9 Provide both service state and status when possible in service_facts (#49618)
* Combine systemd units/unit-files output for service_facts

Fixes #47118

Previously we were only taking the output of `systemd units` which
would leave out information about the service units that were
disabled, static, masked, etc. Now we're aggregating the results so
that anything not active/inactive/dead at least is pulled as fact
data with it's state provided.

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

* provide state and status information about services

Fixes #45730

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
John Hu 9be3ebc596 docker_image: add network parameter (#50313)
* docker_image: add network parameter

Add a network parameter to the docker_image module to specify the
network to use for RUN commands.

Called it network instead of network_mode as the latter seems like a
legacy of when there were just a few default options to choose from,
while now the name of an arbitrary network can be specified.

Fixes #21433

* Format description

* Update docker_image option_minimal_versions

* Ensure network_mode param optional
6 years ago
Nilashish Chakraborty d4db426737
Change net_* default behaviour on missing module (#49923)
* Fix net_base default behaviour

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* New fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
6 years ago
Ruben Tsirunyan 09ba1f38f1 Zabbix Action: Idempotency fix (#50297) 6 years ago
rajaspachipulusu17 3517373cfd Pluribus Networks igmp snooping module with Unit tests (#50146) 6 years ago
Ganesh Nalawade 104c415543
Fix for AttributeError in network_cli (#50284)
*  Value of prompt_answer is wrongly used as `self.prompt_answer`
   while logging it in message queue
6 years ago
kvaps 344b6002b1 fix: ansible_kubectl_ssl_ca_cert variable (#50217)
* fix: mistake for ansible_kubectl_ssl_ca_cert variable

* fix: K8S_AUTH_VERIFY_SSL
6 years ago
curry9999 4fe346da18 Add colon after module name (#50274)
* A colon is not described

* dddd

* Update aws_kms_facts.py
6 years ago
Abhijeet Kasurde fc6c500b5b
postgresql_user: set type of conn_limit (#50178)
conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting.

Fixes: #38118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jason Lingohr 4c3064a36f Update nios_aaaa_record.py (#50271)
Should be ipv6.

+label: docsite_pr
6 years ago
Simon Weald d4bd323c3a update github handle (#50235) 6 years ago