Created
February 15, 2019 22:44
-
-
Save creisor/f9f2773b4b0839423107400dad860bf1 to your computer and use it in GitHub Desktop.
This is how you run a playbook within a playbook, and only register change when the "inner playbook" registers a change.
This file contains hidden or 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
- name: Run AWX Installer | |
local_action: "command ansible-playbook -i awx_repo/installer/inventory awx_repo/installer/install.yml --limit \"{{ ansible_limit }}\"" | |
become: no | |
tags: | |
- awx_deploy | |
- awx-deploy | |
- deploy | |
- install | |
register: awx_installer_output | |
changed_when: ((awx_installer_output.stdout_lines[-1] | regex_search('changed=(\\d+)', '\\1'))[0] | int) > 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment