summaryrefslogtreecommitdiffstats
path: root/roles/etcd_ca/tasks
diff options
context:
space:
mode:
authorManjunath A Kumatagi <mkumatag@in.ibm.com>2016-09-02 17:26:38 +0530
committerManjunath A Kumatagi <mkumatag@in.ibm.com>2016-09-07 15:09:01 -0400
commit3abb43fe1cd1a6bdf00e02e4b4c128dff501823c (patch)
treebd8df25164b50502bbd41c09f700157d50498ccd /roles/etcd_ca/tasks
parentbdb4788982c71214b409b8db3ba2054305c851df (diff)
downloadopenshift-3abb43fe1cd1a6bdf00e02e4b4c128dff501823c.tar.gz
openshift-3abb43fe1cd1a6bdf00e02e4b4c128dff501823c.tar.bz2
openshift-3abb43fe1cd1a6bdf00e02e4b4c128dff501823c.tar.xz
openshift-3abb43fe1cd1a6bdf00e02e4b4c128dff501823c.zip
Fix warnings
Diffstat (limited to 'roles/etcd_ca/tasks')
-rw-r--r--roles/etcd_ca/tasks/main.yml15
1 files changed, 12 insertions, 3 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