summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/etcd_ca/tasks/main.yml15
-rw-r--r--roles/openshift_hosted/tasks/registry/secure.yml4
-rw-r--r--roles/openshift_manage_node/tasks/main.yml8
-rw-r--r--roles/openshift_manageiq/tasks/main.yaml4
4 files changed, 20 insertions, 11 deletions
diff --git a/roles/etcd_ca/tasks/main.yml b/roles/etcd_ca/tasks/main.yml
index 865074e41..4e68bc962 100644
--- a/roles/etcd_ca/tasks/main.yml
+++ b/roles/etcd_ca/tasks/main.yml
@@ -38,9 +38,18 @@
delegate_to: "{{ etcd_ca_host }}"
run_once: true
-- command: touch {{ etcd_ca_db }}
- args:
- creates: "{{ etcd_ca_db }}"
+- name: Check etcd_ca_db exist
+ stat: path="{{ etcd_ca_db }}"
+ register: etcd_ca_db_check
+ changed_when: false
+ delegate_to: "{{ etcd_ca_host }}"
+ run_once: true
+
+- name: Touch etcd_ca_db file
+ file:
+ path: "{{ etcd_ca_db }}"
+ state: touch
+ when: etcd_ca_db_check.stat.isreg is not defined
delegate_to: "{{ etcd_ca_host }}"
run_once: true
diff --git a/roles/openshift_hosted/tasks/registry/secure.yml b/roles/openshift_hosted/tasks/registry/secure.yml
index ef1c7c5bc..4cb85df04 100644
--- a/roles/openshift_hosted/tasks/registry/secure.yml
+++ b/roles/openshift_hosted/tasks/registry/secure.yml
@@ -13,6 +13,8 @@
command: >
{{ openshift.common.client_binary }} get service docker-registry
--template='{{ '{{' }} .spec.clusterIP {{ '}}' }}'
+ --config={{ openshift_hosted_kubeconfig }}
+ -n default
register: docker_registry_service_ip
changed_when: false
@@ -74,6 +76,8 @@
{{ openshift.common.client_binary }} env dc/docker-registry
REGISTRY_HTTP_TLS_CERTIFICATE=/etc/secrets/registry.crt
REGISTRY_HTTP_TLS_KEY=/etc/secrets/registry.key
+ --config={{ openshift_hosted_kubeconfig }}
+ -n default
# These commands are on a single line to preserve patch json.
- name: Update registry liveness probe from HTTP to HTTPS
diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml
index f999092cc..f45ade751 100644
--- a/roles/openshift_manage_node/tasks/main.yml
+++ b/roles/openshift_manage_node/tasks/main.yml
@@ -14,7 +14,7 @@
- name: Wait for Node Registration
command: >
- {{ openshift.common.client_binary }} get node {{ item | lower }}
+ {{ openshift.common.client_binary }} get node {{ hostvars[item].openshift.common.hostname | lower }}
--config={{ openshift_manage_node_kubeconfig }}
-n default
register: omd_get_node
@@ -29,8 +29,7 @@
{{ openshift.common.admin_binary }} manage-node {{ hostvars[item].openshift.common.hostname | lower }} --schedulable={{ 'true' if hostvars[item].openshift.node.schedulable | bool else 'false' }}
--config={{ openshift_manage_node_kubeconfig }}
-n default
- with_items:
- - "{{ openshift_nodes }}"
+ with_items: "{{ openshift_nodes }}"
when: hostvars[item].openshift.common.hostname is defined
- name: Label nodes
@@ -38,8 +37,7 @@
{{ openshift.common.client_binary }} label --overwrite node {{ hostvars[item].openshift.common.hostname | lower }} {{ hostvars[item].openshift.node.labels | oo_combine_dict }}
--config={{ openshift_manage_node_kubeconfig }}
-n default
- with_items:
- - "{{ openshift_nodes }}"
+ with_items: "{{ openshift_nodes }}"
when: hostvars[item].openshift.common.hostname is defined and 'labels' in hostvars[item].openshift.node and hostvars[item].openshift.node.labels != {}
- name: Delete temp directory
diff --git a/roles/openshift_manageiq/tasks/main.yaml b/roles/openshift_manageiq/tasks/main.yaml
index de0a7000e..5d7a3c038 100644
--- a/roles/openshift_manageiq/tasks/main.yaml
+++ b/roles/openshift_manageiq/tasks/main.yaml
@@ -70,6 +70,4 @@
when: openshift.common.version_gte_3_2_or_1_2 | bool
- name: Clean temporary configuration file
- command: >
- rm -f {{manage_iq_tmp_conf}}
- changed_when: false
+ file: path={{manage_iq_tmp_conf}} state=absent