+---------------------+----------------------------------+--------------------------------------------------------------+ | | Unconfigured keyring (default) | Configured keyring | +=====================+==================================+================================+=============================+ | | | R == -1 ("all") | R >= 1 (default) | | | +-----------------+--------------+--------------+--------------+ | | | F == 0 | F > 0 | S >= R | S < R | +---------------------+----------------------------------+-----------------+--------------+--------------+--------------+ | U >= 1 | Invalid option error 1 | Success 2| Fail | Success | Fail | +---------------------+-------------------------
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pause_group0] | |
pause0 | |
pause1 | |
pause2 | |
[pause_group1] | |
pause3 | |
pause4 | |
pause5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azure_rm_acs | |
azure_rm_aks | |
azure_rm_aks_facts | |
azure_rm_appserviceplan | |
azure_rm_appserviceplan_facts | |
azure_rm_availabilityset | |
azure_rm_availabilityset_facts | |
azure_rm_containerinstance | |
azure_rm_containerregistry | |
azure_rm_deployment |
In Ansible <= 2.9 the module_defaults keyword supports a hardcoded list of groups to define common arguments for actions. The actions in each group are also hardcoded in core. For example, the group aws contains the modules ec2 and aws_s3, and can be used like this:
module_defaults:
group/aws:
aws_access_key_id: "{{ access_key }}"
aws_secret_access_key: "{{ secret_key }}"
tasks:
- aws_s3: ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/action/reboot.py b/lib/ansible/plugins/action/reboot.py | |
index 64397b12fa..12ecdaee0b 100644 | |
--- a/lib/ansible/plugins/action/reboot.py | |
+++ b/lib/ansible/plugins/action/reboot.py | |
@@ -12,6 +12,7 @@ from datetime import datetime, timedelta | |
from ansible.errors import AnsibleError, AnsibleConnectionFailure | |
from ansible.module_utils._text import to_native, to_text | |
+from ansible.module_utils.api import retry_with_delays_and_condition | |
from ansible.module_utils.common.validation import check_type_list, check_type_str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module_defaults: | |
group/aws: &aws_connection_info | |
... | |
# module_defaults does not work in conjunction with the 'collections' keyword | |
# use the fully qualified plugin name to ensure this works however the module is called | |
# and continues to work in the future | |
community.aws.new_module: | |
<<: *aws_connection_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test_aws_ec2.yml: | |
# plugin: amazon.aws.aws_ec2 | |
# regions: us-east-1 | |
export AWS_PROFILE=shertel | |
ansible-inventory -i test_aws_ec2.yml --list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add hosts and hostvars to inventory with the yaml inventory plugin | |
all: | |
hosts: | |
host1: | |
a: 'is_defined' | |
host2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py | |
index 79aa3eb1ec..079e488128 100644 | |
--- a/lib/ansible/cli/doc.py | |
+++ b/lib/ansible/cli/doc.py | |
@@ -161,6 +161,7 @@ class DocCLI(CLI): | |
# add to plugin paths from command line | |
basedir = context.CLIARGS['basedir'] | |
if basedir: | |
+ basedir = os.path.abspath(basedir) | |
AnsibleCollectionConfig.playbook_paths = basedir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py | |
index bda38b0bdf..e3da2fd038 100644 | |
--- a/lib/ansible/executor/task_executor.py | |
+++ b/lib/ansible/executor/task_executor.py | |
@@ -1032,6 +1032,8 @@ class TaskExecutor: | |
# let action plugin override module, fallback to 'normal' action plugin otherwise | |
if self._shared_loader_obj.action_loader.has_plugin(self._task.action, collection_list=collections): | |
handler_name = self._task.action | |
+ elif self._shared_loader_obj.action_loader.has_plugin(self._task.abbreviated_name, collection_list=collections): | |
+ handler_name = self._task.abbreviated_name |
NewerOlder