Created
June 23, 2014 20:43
-
-
Save AntelopeSalad/4f1c6e9fc6037a1abaae to your computer and use it in GitHub Desktop.
This file contains 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
# role A - defaults/main.yml | |
runit_service: | |
# role A - tasks/main.yml | |
command: "echo '{{ item.name}} :: {{ item.script }}'" | |
with_items: runit_service | |
when: runit_service is iterable | |
# role B - using it in your inventory or somewhere | |
runit_service: | |
- { name: foo, script: "exec 2>&1 chpst -u foo -e /etc/sv/foo/env nodejs /srv/foo/foo.js" } | |
- { name: bar, script: "exec 2>&1 chpst -u bar -e /etc/sv/bar/env nodejs /srv/bar/bar.js" } | |
- { name: baz, script: "exec 2>&1 chpst -u baz -e /etc/sv/baz/env nodejs /srv/baz/my_app.js" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment