Skip to content

Instantly share code, notes, and snippets.

@thegiantbeast
Last active August 26, 2015 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thegiantbeast/90efb8cb1a08cdef8c0b to your computer and use it in GitHub Desktop.
Save thegiantbeast/90efb8cb1a08cdef8c0b to your computer and use it in GitHub Desktop.
Note: Had to use '-' instead of '/' on filenames since github gists doesn't support folder structure.
PLAY [my.own.host.local] ******************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [checkVersion | set_fact ] **********************************************
ok: [127.0.0.1]
TASK: [checkVersion | debug msg="Setting variable to {{ currentVersion }}"] ***
ok: [127.0.0.1] => {
"msg": "Setting variable to stable"
}
TASK: [installVersion | debug msg="Installing {{ currentVersion }} version"] ***
ok: [127.0.0.1] => {
"msg": "Installing stable version"
}
TASK: [checkVersion | set_fact ] **********************************************
ok: [127.0.0.1]
TASK: [checkVersion | debug msg="Setting variable to {{ currentVersion }}"] ***
ok: [127.0.0.1] => {
"msg": "Setting variable to beta"
}
TASK: [checkVersion | set_fact ] **********************************************
ok: [127.0.0.1]
TASK: [checkVersion | debug msg="Setting variable to {{ currentVersion }}"] ***
ok: [127.0.0.1] => {
"msg": "Setting variable to alpha"
}
TASK: [testRole | debug msg="All tasks finished"] *****************************
ok: [127.0.0.1] => {
"msg": "All tasks finished"
}
PLAY RECAP ********************************************************************
127.0.0.1 : ok=9 changed=0 unreachable=0 failed=0
---
- hosts: "my.own.host.local"
roles:
- { role : testRole }
---
- set_fact:
currentVersion: "{{ version }}"
- debug: msg="Setting variable to {{ currentVersion }}"
---
- debug: msg="Installing {{ currentVersion }} version"
---
dependencies:
- { role: checkVersion, version: "stable" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}" }
- { role: checkVersion, version: "beta" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}" }
- { role: checkVersion, version: "alpha" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}" }
---
- debug: msg="All tasks finished"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment