ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
---

- name: Add user 'maddy' to group 'acme-redirect'
  user:
    name: maddy
    groups: acme-redirect
    append: yes
  when: 
    - services.acme_redirect.enable is true

- name: "Generate file: /etc/maddy/maddy.conf"
  template: 
    src: maddy.conf.j2
    dest: /etc/maddy/maddy.conf
    mode: 0644
    owner: maddy
    group: maddy
  notify: "Restart maddy"

- name: "Create file: /var/log/maddy.log"
  file:
    path:  /var/log/maddy.log
    state: touch
    owner: maddy
    group: maddy
    mode:  0644

- name: "Patch file: /etc/init.d/maddy"
  patch:
    src: maddy-service.patch
    dest: /etc/init.d/maddy
  when:
    - ansible_service_mgr == "openrc"