Rather than run_once, use first os-master entry
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
f3d2bde922
commit
36b7948be8
13 changed files with 9 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters:os-masters-stg
|
||||
hosts: os-masters[0]:os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
|||
service: bodhi
|
||||
host: "bodhi.stg.fedoraproject.org"
|
||||
when: env == "staging"
|
||||
- fail: msg="testing"
|
||||
- role: openshift/secret-file
|
||||
app: bodhi
|
||||
secret_name: bodhi-fedmsg-key
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters:os-masters-stg
|
||||
hosts: os-masters[0]:os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters-stg
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters-stg
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters-stg
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters-stg
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters-stg
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters:os-masters-stg
|
||||
hosts: os-masters[0]:os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Create temporary file
|
||||
tempfile: state=file
|
||||
register: tmpfile
|
||||
run_once: true
|
||||
|
||||
- name: Acquire a keytab
|
||||
include_role:
|
||||
|
@ -11,10 +10,8 @@
|
|||
|
||||
- name: Call `oc secrets new` on the copied file
|
||||
shell: oc -n {{app}} secrets new {{secret_name}} {{key}}={{tmpfile.path}}
|
||||
run_once: true
|
||||
register: create_out
|
||||
failed_when: "create_out.rc != 0 and 'AlreadyExists' not in create_out.stderr"
|
||||
|
||||
#- name: Delete temporary file
|
||||
# file: path={{tmpfile.path}} state=absent
|
||||
# run_once: true
|
||||
|
|
|
@ -1,27 +1,21 @@
|
|||
- name: Create temporary file
|
||||
tempfile: state=file suffix=.yml
|
||||
register: tmpfile
|
||||
run_once: true
|
||||
|
||||
- name: Copy template {{template}} to temporary file ({{tmpfile.path}})
|
||||
template: src={{roles_path}}/openshift-apps/{{app}}/templates/{{template}} dest={{tmpfile.path}}
|
||||
when: template is defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy template {{template_fullpath}} to temporary file ({{tmpfile.path}})
|
||||
template: src={{template_fullpath}} dest={{tmpfile.path}}
|
||||
when: template_fullpath is defined and template is not defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy file {{file}} to temporary file ({{tmpfile.path}})
|
||||
copy: src={{roles_path}}/openshift-apps/{{app}}/files/{{file}} dest={{tmpfile.path}}
|
||||
when: file is defined and template is not defined and template_fullpath is not defined
|
||||
run_once: true
|
||||
|
||||
- name: Call `oc apply` on the copied file
|
||||
shell: oc -n {{app}} apply -f {{tmpfile.path}}
|
||||
run_once: true
|
||||
|
||||
- name: Delete temporary file
|
||||
file: path={{tmpfile.path}} state=absent
|
||||
run_once: true
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
- name: Run `oc rollout latest`
|
||||
shell: oc -n {{app}} rollout latest {{dcname}}
|
||||
run_once: true
|
||||
|
|
|
@ -1,29 +1,23 @@
|
|||
- name: Create temporary file
|
||||
tempfile: state=file
|
||||
register: tmpfile
|
||||
run_once: true
|
||||
|
||||
- name: Copy template {{template}} to temporary file ({{tmpfile.path}})
|
||||
template: src={{roles_path}}/openshift-apps/{{app}}/templates/{{template}} dest={{tmpfile.path}}
|
||||
when: template is defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy file {{file}} to temporary file ({{tmpfile.path}})
|
||||
copy: src={{roles_path}}/openshift-apps/{{app}}/files/{{file}} dest={{tmpfile.path}}
|
||||
when: file is defined
|
||||
run_once: true
|
||||
|
||||
- name: Copy private file {{privatefile}} to temporary file ({{tmpfile.path}})
|
||||
copy: src={{private}}/files/{{privatefile}} dest={{tmpfile.path}}
|
||||
when: privatefile is defined
|
||||
run_once: true
|
||||
|
||||
- name: Call `oc secrets new` on the copied file
|
||||
shell: oc -n {{app}} secrets new {{secret_name}} {{key}}={{tmpfile.path}}
|
||||
run_once: true
|
||||
register: create_out
|
||||
failed_when: "create_out.rc != 0 and 'AlreadyExists' not in create_out.stderr"
|
||||
|
||||
- name: Delete temporary file
|
||||
file: path={{tmpfile.path}} state=absent
|
||||
run_once: true
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
- name: Run `oc start-build`
|
||||
shell: oc -n {{app}} start-build {{buildname}}
|
||||
run_once: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue