--- # tasks file for debian-serv - name: Install vimrc ansible.builtin.import_role: name: vimrc vars: user: "debian" - name: Fetch Caddy pubkey ansible.builtin.get_url: url: "{{ caddy_pubkey_url }}" dest: /tmp/gpg.key - name: Sign Caddy pubkey ansible.builtin.shell: cmd: gpg --dearmor -o caddy-stable-archive-keyring.gpg gpg.key && rm -f gpg.key chdir: /tmp - name: Copy signed key to /usr/share/keyrings/caddy-stable-archive-keyring.gpg ansible.builtin.copy: src: /tmp/caddy-stable-archive-keyring.gpg dest: /usr/share/keyrings/caddy-stable-archive-keyring.gpg remote_src: true - name: Fetch Caddy sources.list ansible.builtin.get_url: url: "{{ caddy_sources_url }}" dest: /etc/apt/sources.list.d/caddy-stable.list - name: Fetch Tailscale pubkey ansible.builtin.get_url: url: "{{ tailscale_pubkey_url }}" dest: /usr/share/keyrings/tailscale-archive-keyring.gpg - name: Fetch Tailscale sources.list ansible.builtin.get_url: url: "{{ tailscale_sources_url }}" dest: /etc/apt/sources.list.d/tailscale.list - name: Install Caddy and Tailscale ansible.builtin.apt: pkg: - caddy - tailscale update_cache: true - name: Fetch molly-brown repo ansible.builtin.git: repo: https://tildegit.org/solderpunk/molly-brown.git dest: /tmp/molly-brown - name: Build molly-brown binary with Go ansible.builtin.shell: cmd: go build chdir: /tmp/molly-brown - name: Copy molly-brown binary to /usr/local/bin ansible.builtin.copy: src: /tmp/molly-brown/molly-brown dest: /usr/local/bin/molly-brown remote_src: true - name: Copy molly-brown.service for systemd ansible.builtin.copy: src: /tmp/molly-brown/contrib/init/molly-brown.service.example dest: /etc/systemd/system/molly-brown.service remote_src: true - name: Set User directive in molly-brown.service ansible.builtin.lineinfile: path: /etc/systemd/system/molly-brown.service search_string: "User=molly" line: "User={{ ansible_user }}" - name: Set Group directive in molly-brown.service ansible.builtin.lineinfile: path: /etc/systemd/system/molly-brown.service insertafter: '^User' line: "Group={{ ansible_user }}"