initial checkin
This commit is contained in:
commit
b78e5f4ab3
|
@ -0,0 +1,13 @@
|
|||
# incus playbook
|
||||
|
||||
## Introduction
|
||||
|
||||
This role will install incus to the target host.
|
||||
|
||||
This playbook can be run using the following command line;
|
||||
|
||||
ansible-playbook -i <inventory file | IP,> incus.yml
|
||||
|
||||
ie,
|
||||
ansible-playbook -i 192.168.1.123, incus.yml
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
###########################################################################
|
||||
#
|
||||
# This playbook will install incus to the target host.
|
||||
#
|
||||
# - installation instructions from https://github.com/zabbly/incus#installation
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
user: root
|
||||
|
||||
vars:
|
||||
username: "rmorrow"
|
||||
|
||||
tasks:
|
||||
|
||||
############################################################
|
||||
- name: Ensure required supporting packages are installed (Debian)
|
||||
apt:
|
||||
name:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- wget
|
||||
- gnupg
|
||||
- lsb-release
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
############################################################
|
||||
- name: Retrieve GPG key (Debian)
|
||||
shell:
|
||||
cmd: >
|
||||
curl -fsSL
|
||||
https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
|
||||
|
||||
############################################################
|
||||
- name: Add the repository (Debian)
|
||||
shell: |
|
||||
cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
|
||||
Enabled: yes
|
||||
Types: deb
|
||||
URIs: https://pkgs.zabbly.com/incus/stable
|
||||
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
|
||||
Components: main
|
||||
Architectures: $(dpkg --print-architecture)
|
||||
Signed-By: /etc/apt/keyrings/zabbly.asc
|
||||
EOF
|
||||
|
||||
############################################################
|
||||
- name: Update package cache (Ubuntu/Debian)
|
||||
apt:
|
||||
update-cache: true
|
||||
|
||||
############################################################
|
||||
- name: Install package (Ubuntu/Debian)
|
||||
apt:
|
||||
name:
|
||||
- incus
|
||||
|
||||
############################################################
|
||||
- name: Add user to 'incus-admin' group
|
||||
user:
|
||||
name: "{{ username }}"
|
||||
append: true
|
||||
groups: "incus-admin"
|
||||
|
||||
# EOF
|
Loading…
Reference in New Issue