]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/roles/root/tasks/root.yml
Fix(add-apache-vhost): Remove wrong conditions
[ansible.git] / playbooks / debian / roles / root / tasks / root.yml
index 5824fda33187bd051304fe52b1508b04be26ecc2..b713f01625c7d622f72bdcfd59c94ab68b096b58 100644 (file)
          '.screenrc', '.shellrc', '.tmux.conf', '.vimrc',
         ]
 
+- name: "Setup ~root - check .sh_history"
+  become: true
+  stat:
+    path: ~root/.sh_history
+  register: sh_history
+
 - name: "Setup ~root - create .sh_history"
   become: true
   file:
@@ -47,6 +53,7 @@
     owner: root
     group: root
     mode: "0600"
+  when: not sh_history.stat.exists
 
 - name: "Setup ~root - link .bash_history"
   become: true