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: "Create directory: /etc/frp"
  file:
    path: /etc/frp
    state: directory

- copy:
    content: '# Configuration for /etc/init.d/frpc\nfrps_opts="-c /etc/frpc.ini"'
    dest: /etc/conf.d/frpc
    mode: 0644
  when: 
    - ansible_distribution == "Alpine" 
  notify: "Restart frpc"

- name: "[Alpine] Generate config for frpc"
  template:
    src: frpc.conf.j2
    dest: /etc/frpc.ini
    owner: frpc
    group: frpc
    mode: 0644
  notify: "Restart frpc"
  when: 
    - ansible_distribution == "Alpine" 

- name: "[Archlinux] Generate config for frpc"
  template:
    src: frpc.conf.j2
    dest: /etc/frp/frpc.ini
  notify: "Restart frpc"
  when: 
    - ansible_distribution == "Archlinux"