From 17f094bb6a4e806eb48882232957f23f727402e1 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 26 Sep 2017 17:27:21 -0400 Subject: [PATCH] corrected import_play into to import_playbook (#30853) * corrected import_play into to import_playbook fixes #30744 --- docs/docsite/rst/playbooks_best_practices.rst | 4 ++-- docs/docsite/rst/roadmap/ROADMAP_2_4.rst | 2 +- lib/ansible/modules/utilities/logic/_include.py | 2 +- .../utilities/logic/{import_plays.py => import_playbook.py} | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename lib/ansible/modules/utilities/logic/{import_plays.py => import_playbook.py} (93%) diff --git a/docs/docsite/rst/playbooks_best_practices.rst b/docs/docsite/rst/playbooks_best_practices.rst index aab4d114b1..7fccf23c3b 100644 --- a/docs/docsite/rst/playbooks_best_practices.rst +++ b/docs/docsite/rst/playbooks_best_practices.rst @@ -221,8 +221,8 @@ some other playbooks:: --- # file: site.yml - - import_plays: webservers.yml - - import_plays: dbservers.yml + - import_playbook: webservers.yml + - import_playbook: dbservers.yml In a file like webservers.yml (also at the top level), we map the configuration of the webservers group to the roles performed by the webservers group:: diff --git a/docs/docsite/rst/roadmap/ROADMAP_2_4.rst b/docs/docsite/rst/roadmap/ROADMAP_2_4.rst index 863550b113..2751d6d064 100644 --- a/docs/docsite/rst/roadmap/ROADMAP_2_4.rst +++ b/docs/docsite/rst/roadmap/ROADMAP_2_4.rst @@ -128,7 +128,7 @@ Runtime Check on Modules for Blacklisting Disambiguate Includes --------------------- -- Create import_x for 'static includes' (import_task, import_play, import_role) +- Create import_x for 'static includes' (import_task, import_playbook, import_role) - Any directives are applied to the 'imported' tasks diff --git a/lib/ansible/modules/utilities/logic/_include.py b/lib/ansible/modules/utilities/logic/_include.py index 06ad9f7e92..e232b28bd6 100644 --- a/lib/ansible/modules/utilities/logic/_include.py +++ b/lib/ansible/modules/utilities/logic/_include.py @@ -20,7 +20,7 @@ module: include short_description: include a play or task list. deprecated: The include action was too confusing, dealing with both plays and tasks, being both dynamic and static. This module will be removed in version 2.8. - As alternatives use include_tasks, import_plays, import_tasks. + As alternatives use include_tasks, import_playbook, import_tasks. description: - Includes a file with a list of plays or tasks to be executed in the current playbook. - Files with a list of plays can only be included at the top level, lists of tasks can only be included where tasks normally run (in play). diff --git a/lib/ansible/modules/utilities/logic/import_plays.py b/lib/ansible/modules/utilities/logic/import_playbook.py similarity index 93% rename from lib/ansible/modules/utilities/logic/import_plays.py rename to lib/ansible/modules/utilities/logic/import_playbook.py index 3ccab82b8d..b3e0b93245 100644 --- a/lib/ansible/modules/utilities/logic/import_plays.py +++ b/lib/ansible/modules/utilities/logic/import_playbook.py @@ -16,7 +16,7 @@ DOCUMENTATION = ''' --- author: - "Ansible Core Team (@ansible)" -module: import_plays +module: import_playbook short_description: import a playbook. description: - Includes a file with a list of plays to be executed. @@ -37,7 +37,7 @@ EXAMPLES = """ - debug: msg: "play1" -- import_plays: otherplays.yml +- import_playbook: otherplays.yml - name: This DOES NOT WORK @@ -47,7 +47,7 @@ EXAMPLES = """ msg: task1 - name: This failes because I'm inside a play already - import_plays: stuff.yml + import_playbook: stuff.yml """ RETURN = """