--- - 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"