Explorar o código

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

Douglas A %!s(int64=4) %!d(string=hai) anos
pai
achega
0c5efddc7a
Modificáronse 2 ficheiros con 10 adicións e 1 borrados
  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