Explorar o código

fix bash_profile for statusservices

Blaine Story hai 4 días
pai
achega
194cb33c6f
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      roles/statusservices/tasks/main.yml

+ 7 - 5
roles/statusservices/tasks/main.yml

@@ -16,17 +16,19 @@
   when:
     - service_list is defined
 
-- name: Ensure root .bash_profile exists
+- name: Ensure root .bash_profile.local exists
   ansible.builtin.file:
-    path: /root/.bash_profile
-    state: file
+    path: /root/.bash_profile.local
+    state: touch
     owner: root
     group: root
     mode: '0640'
+  changed_when: false
 
-- name: Add statusservices to .bash_profile
+
+- name: Add statusservices to .bash_profile.local
   lineinfile:
-    path: /root/.bash_profile
+    path: /root/.bash_profile.local
     line: '/usr/local/bin/statusservices'
     state: present
   when: