--- - name: Install Incus from Zabbly Stable Repository hosts: localhost become: yes vars: zabbly_key_url: "https://pkgs.zabbly.com/key.asc" keyring_dir: "/etc/apt/keyrings" keyring_asc: "/etc/apt/keyrings/zabbly.asc" keyring_gpg: "/etc/apt/keyrings/zabbly.gpg" repo_file: "/etc/apt/sources.list.d/zabbly-incus-stable.sources" os_codename: "{{ ansible_lsb.codename }}" arch: "{{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }}" tasks: - name: Ensure required tools are installed apt: name: - curl - gnupg - lsb-release state: present update_cache: yes - name: Create APT keyring directory file: path: "{{ keyring_dir }}" state: directory mode: '0755' - name: Download Zabbly GPG key (ASCII) get_url: url: "{{ zabbly_key_url }}" dest: "{{ keyring_asc }}" mode: '0644' - name: Convert ASCII key to GPG format command: gpg --dearmor -o "{{ keyring_gpg }}" "{{ keyring_asc }}" args: creates: "{{ keyring_gpg }}" - name: Add Zabbly Incus Stable APT repository copy: dest: "{{ repo_file }}" content: | Enabled: yes Types: deb URIs: https://pkgs.zabbly.com/incus/stable Suites: {{ os_codename }} Components: main Architectures: {{ arch }} Signed-By: {{ keyring_gpg }} - name: Update APT cache apt: update_cache: yes - name: Install Incus packages apt: name: - incus - incus-client - incus-ui-canonical state: present - name: "Post Installation Instructions" debug: msg: "Post Installation Instructions: https://git.marmattheo.com/marmattheo/LXC-Incus-stable-setup/src/branch/master/README.md"