summaryrefslogtreecommitdiffstats
path: root/roles/etcd_ca
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-09-08 12:05:45 -0400
committerGitHub <noreply@github.com>2016-09-08 12:05:45 -0400
commit5637ec58fd31a019f2d7e5a0b6760fb21f273881 (patch)
tree7c5c36ce6498d8272c35b76e924dc76679c58bab /roles/etcd_ca
parent52eeaed447a97a85d0266036136ac611be13bbae (diff)
parent3abb43fe1cd1a6bdf00e02e4b4c128dff501823c (diff)
downloadopenshift-5637ec58fd31a019f2d7e5a0b6760fb21f273881.tar.gz
openshift-5637ec58fd31a019f2d7e5a0b6760fb21f273881.tar.bz2
openshift-5637ec58fd31a019f2d7e5a0b6760fb21f273881.tar.xz
openshift-5637ec58fd31a019f2d7e5a0b6760fb21f273881.zip
Merge pull request #2398 from mkumatag/fix_warnings
Fix warnings
Diffstat (limited to 'roles/etcd_ca')
-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