-
-
Save novodinia/afa58be3c34dd600291f 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
$ pwd | |
/home/dan/foo | |
$ tree | |
. | |
|-group_vars | |
|-roles | |
|---foo | |
|-----meta | |
$ cat roles/foo/meta/main.yml | |
--- | |
dependencies: | |
- { role: openjdk, java_version: 7 } | |
$ cat playbook | |
--- | |
- hosts: all | |
vars: | |
foo_dir: /root/foo | |
bar_dir: /root/foo/bar | |
tasks: | |
- name: make foo directory | |
file: path={{ foo_dir }} state=directory | |
- name: download bar | |
get_url: dest={{ foo_dir }} url=https://example.com/bar.tar.gz | |
- name: extract bar | |
command: chdir={{ foo_dir }} tar xzf bar.tar.gz | |
- name: get conf file | |
get_url: dest={{ bar_dir }} url=https://gist.githubusercontent.com/novodinia/234mzdf/raw/ou34m34/file.conf | |
- name: launch bar | |
command: chdir={{ bar_dir }} ./bin/bar --conf file.conf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment