Unconfigured keyring (default) | Configured keyring | ||||
---|---|---|---|---|---|
R == -1 ("all") | R >= 1 (default) | ||||
F == 0 | F > 0 | S >= R | S < R |
| | F == 0 | F > 0 | S >= R | S < R |
test_dir | |
├── roles | |
│ ├── a | |
│ │ ├── tasks | |
│ │ │ ├── subtasks | |
│ │ │ │ ├── main.yml | |
│ │ │ │ │ - debug: msg="{{ lookup('file', 'test_relative.yml') }}" | |
│ │ │ │ ├── test_relative.yml | |
│ │ │ │ │ - debug: msg="works before 2.16.3" | |
│ │ │ ├── main.yml |
[pause_group0] | |
pause0 | |
pause1 | |
pause2 | |
[pause_group1] | |
pause3 | |
pause4 | |
pause5 |
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 |
Unconfigured keyring (default) | Configured keyring | ||||
---|---|---|---|---|---|
R == -1 ("all") | R >= 1 (default) | ||||
F == 0 | F > 0 | S >= R | S < R |
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: ...
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 |
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 |
# 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 |
# add hosts and hostvars to inventory with the yaml inventory plugin | |
all: | |
hosts: | |
host1: | |
a: 'is_defined' | |
host2: |
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 |