Forráskód Böngészése

feat(ansible-user): use ansible user to avoid using root

Douglas A 4 éve
szülő
commit
0c5efddc7a
2 módosított fájl, 10 hozzáadás és 1 törlés
  1. 1 0
      centos_update.yml
  2. 9 1
      debian_update.yml

+ 1 - 0
centos_update.yml

@@ -1,6 +1,7 @@
 ---
 - hosts: omega
   become_user: root
+  user: ansible
   become: yes
   tasks:
     - name: update the system

+ 9 - 1
debian_update.yml

@@ -1,5 +1,6 @@
 ---
 - hosts: debian
+  user: ansible
   become_user: root
   become: yes
   tasks:
@@ -15,4 +16,11 @@
     - name: Remove dependencies that are no longer required
       apt:
         autoremove: yes
-        
+   
+    - name: Add acl for user
+      apt:
+        name: "{{ item }}"
+        state: present
+      with_items:
+        - acl
+        - python3-pip