summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/utilities
diff options
context:
space:
mode:
authorAlicia Cozine <879121+acozine@users.noreply.github.com>2019-05-06 15:17:50 -0500
committerSandra McCann <samccann@redhat.com>2019-05-06 16:17:50 -0400
commit8cb76408d3aff99029ab5cde8b8d91308462f411 (patch)
treedd98adc1e949f7eabdeef95e94b9fd0d62a20e4e /lib/ansible/modules/utilities
parentdc711c30182e50bee5177df55b70a94d35df6509 (diff)
downloadansible-8cb76408d3aff99029ab5cde8b8d91308462f411.tar.gz
Update include_role description (#56001)
* Update include_role description to discuss tasks: use The previous description in this statement's description really threw me off, and is IMO ambiguous at best. 'Loads and executes a role as a task dynamically. This frees roles from the roles: directive and allows them to be treated more as tasks.' For reference, I spent a long time trying to make include_role, with a loop, work under a roles: section. It doesn't work, but this documentation and its use of the roles: keyword in the opening, and the phrase '"more" as a task' muddies the waters. +label: docsite_pr
Diffstat (limited to 'lib/ansible/modules/utilities')
-rw-r--r--lib/ansible/modules/utilities/logic/include_role.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/ansible/modules/utilities/logic/include_role.py b/lib/ansible/modules/utilities/logic/include_role.py
index 2b88715687..722251cb8e 100644
--- a/lib/ansible/modules/utilities/logic/include_role.py
+++ b/lib/ansible/modules/utilities/logic/include_role.py
@@ -19,16 +19,17 @@ author: Ansible Core Team (@ansible)
module: include_role
short_description: Load and execute a role
description:
- - Loads and executes a role as a task dynamically.
- - This frees roles from the C(roles:) directive and allows them to be treated more as tasks.
- - Unlike M(import_role), most keywords, including loop, with_items, and conditionals, apply to this statement.
- - The do until loop is not supported on M(include_role).
+ - Dynamically loads and executes a specified role as a task.
+ - May be used only where Ansible tasks are allowed - inside C(pre_tasks), C(tasks), or C(post_tasks) playbook objects, or as a task inside a role.
+ - Task-level keywords, loops, and conditionals apply only to the C(include_role) statement itself.
+ - To apply keywords to the tasks within the role, pass them using the C(apply) option or use M(import_role) instead.
+ - Ignores some keywords, like C(until) and C(retries).
- This module is also supported for Windows targets.
version_added: "2.2"
options:
apply:
description:
- - Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to the tasks within the include.
+ - Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to all tasks within the included role.
version_added: '2.7'
name:
description: