Browse Source

tasks: Ensure the 'adm' group is present

The role uses the 'adm' group when creating the log directory. However,
nothing really checks whether the groups is present or not, so it will
fail in case it is not. As such, we need to create the group before
trying to use it.

Change-Id: I757632db50b57710da77ea36de09e5f76674fcd5
changes/60/602360/1
Markos Chandras 9 months ago
parent
commit
f856772945
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      tasks/haproxy_pre_install.yml

+ 9
- 0
tasks/haproxy_pre_install.yml View File

@@ -43,6 +43,15 @@
43 43
   tags:
44 44
     - haproxy-user
45 45
 
46
+- name: create the system group
47
+  group:
48
+    name: "adm"
49
+    state: "present"
50
+    system: "yes"
51
+  tags:
52
+    - haproxy-dirs
53
+    - haproxy-logs
54
+
46 55
 - name: Create haproxy log dir
47 56
   file:
48 57
     path: "{{ '/var/log/haproxy' | realpath }}"

Loading…
Cancel
Save