configurations-ansible/roles/yggdrasil/tasks/install_Debian.yml
2023-03-16 23:01:51 +01:00

36 lines
1.1 KiB
YAML

- name: Install cURL if not present
ansible.builtin.package:
name: curl
- name: Create /usr/local/apt-keys directory
ansible.builtin.file:
path: /usr/local/apt-keys
state: directory
mode: '0755'
- name: Download GPG key
ansible.builtin.shell: gpg --fetch-keys https://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/key.txt
- name: Install GPG key
ansible.builtin.shell: gpg --export 569130E8CA20FBC4CB3FDE555898470A764B32C9 | sudo tee /usr/local/apt-keys/yggdrasil-keyring.gpg > /dev/null
- name: Add specified repository into sources list using specified filename
ansible.builtin.apt_repository:
repo: deb [signed-by=/usr/local/apt-keys/yggdrasil-keyring.gpg] http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/ debian yggdrasil
state: present
filename: yggdrasil
- name: Update repositories cache and install "yggdrasil" package
ansible.builtin.apt:
name: yggdrasil
update_cache: yes
- block:
- include_tasks: "update_peers.yml"
- name: Enable Yggdrasil service
ansible.builtin.systemd:
name: yggdrasil
enabled: yes
state: started
masked: no