First attempt at ansiblization of openshift/modernpaste

Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
Rick Elrod 2017-07-25 17:52:06 +00:00
parent af2fac3977
commit eb7a002027
9 changed files with 216 additions and 0 deletions

View file

@ -0,0 +1,18 @@
- name: Create temporary file
tempfile: state=file
register: tmpfile
run_once: true
- name: Copy template to temporary file ({{tmpfile.path}})
template: src={{ansible}}/roles/openshift-apps/{{app}}/templates/{{template}} dest={{tmpfile.path}}.yml
when: template is defined
run_once: true
- name: Copy file to temporary file ({{tmpfile.path}})
copy: src={{ansible}}/roles/openshift-apps/{{app}}/files/{{file}} dest={{tmpfile.path}}.yml
when: file is defined
run_once: true
- name: Call `oc apply` on the copied file
shell: oc -n {{app}} apply -f {{tmpfile.path}}.yml
run_once: true