diff --git a/playbooks/openshift-apps/bodhi.yml b/playbooks/openshift-apps/bodhi.yml index 22530cff69..b76b6e4010 100644 --- a/playbooks/openshift-apps/bodhi.yml +++ b/playbooks/openshift-apps/bodhi.yml @@ -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 diff --git a/playbooks/openshift-apps/greenwave.yml b/playbooks/openshift-apps/greenwave.yml index f12d9c2d0d..2b7ddcefcd 100644 --- a/playbooks/openshift-apps/greenwave.yml +++ b/playbooks/openshift-apps/greenwave.yml @@ -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 diff --git a/playbooks/openshift-apps/librariesio2fedmsg.yml b/playbooks/openshift-apps/librariesio2fedmsg.yml index 667199150f..2da8c3dcc9 100644 --- a/playbooks/openshift-apps/librariesio2fedmsg.yml +++ b/playbooks/openshift-apps/librariesio2fedmsg.yml @@ -1,5 +1,5 @@ - name: make the app be real - hosts: os-masters-stg + hosts: os-masters-stg[0] user: root gather_facts: True diff --git a/playbooks/openshift-apps/modernpaste.yml b/playbooks/openshift-apps/modernpaste.yml index 69d46755ae..73e35da892 100644 --- a/playbooks/openshift-apps/modernpaste.yml +++ b/playbooks/openshift-apps/modernpaste.yml @@ -1,5 +1,5 @@ - name: make the app be real - hosts: os-masters-stg + hosts: os-masters-stg[0] user: root gather_facts: True diff --git a/playbooks/openshift-apps/rats.yml b/playbooks/openshift-apps/rats.yml index 476888ceec..f1bdbe0e14 100644 --- a/playbooks/openshift-apps/rats.yml +++ b/playbooks/openshift-apps/rats.yml @@ -1,5 +1,5 @@ - name: make the app be real - hosts: os-masters-stg + hosts: os-masters-stg[0] user: root gather_facts: True diff --git a/playbooks/openshift-apps/release-monitoring.yml b/playbooks/openshift-apps/release-monitoring.yml index c7d591792a..70804f6a8f 100644 --- a/playbooks/openshift-apps/release-monitoring.yml +++ b/playbooks/openshift-apps/release-monitoring.yml @@ -1,5 +1,5 @@ - name: make the app be real - hosts: os-masters-stg + hosts: os-masters-stg[0] user: root gather_facts: True diff --git a/playbooks/openshift-apps/transtats.yml b/playbooks/openshift-apps/transtats.yml index f18bc14384..13ab0136de 100644 --- a/playbooks/openshift-apps/transtats.yml +++ b/playbooks/openshift-apps/transtats.yml @@ -1,5 +1,5 @@ - name: make the app be real - hosts: os-masters-stg + hosts: os-masters-stg[0] user: root gather_facts: True diff --git a/playbooks/openshift-apps/waiverdb.yml b/playbooks/openshift-apps/waiverdb.yml index 2f7af5f085..19e5322327 100644 --- a/playbooks/openshift-apps/waiverdb.yml +++ b/playbooks/openshift-apps/waiverdb.yml @@ -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 diff --git a/roles/openshift/keytab/tasks/main.yml b/roles/openshift/keytab/tasks/main.yml index 44522de4de..0c78213891 100644 --- a/roles/openshift/keytab/tasks/main.yml +++ b/roles/openshift/keytab/tasks/main.yml @@ -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 diff --git a/roles/openshift/object/tasks/main.yml b/roles/openshift/object/tasks/main.yml index 9e2cbe0597..2799275be1 100644 --- a/roles/openshift/object/tasks/main.yml +++ b/roles/openshift/object/tasks/main.yml @@ -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 diff --git a/roles/openshift/rollout/tasks/main.yml b/roles/openshift/rollout/tasks/main.yml index d0a8ab9107..a49e01360b 100644 --- a/roles/openshift/rollout/tasks/main.yml +++ b/roles/openshift/rollout/tasks/main.yml @@ -1,3 +1,2 @@ - name: Run `oc rollout latest` shell: oc -n {{app}} rollout latest {{dcname}} - run_once: true diff --git a/roles/openshift/secret-file/tasks/main.yml b/roles/openshift/secret-file/tasks/main.yml index b16f99b8dd..e6623f402f 100644 --- a/roles/openshift/secret-file/tasks/main.yml +++ b/roles/openshift/secret-file/tasks/main.yml @@ -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 diff --git a/roles/openshift/start-build/tasks/main.yml b/roles/openshift/start-build/tasks/main.yml index ab3a5aa884..a15529cabe 100644 --- a/roles/openshift/start-build/tasks/main.yml +++ b/roles/openshift/start-build/tasks/main.yml @@ -1,3 +1,2 @@ - name: Run `oc start-build` shell: oc -n {{app}} start-build {{buildname}} - run_once: true