feat: update alpine setup, add default repositories for latest-stable

This commit is contained in:
arne 2025-03-23 11:51:09 +01:00
parent dbf28f2651
commit fdbde7630e
3 changed files with 22 additions and 17 deletions

View File

@ -0,0 +1,2 @@
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community

View File

@ -1,6 +1,14 @@
---
- name: setup ssh
include: ssh.yml
include_tasks: ssh.yml
- name: install apk repositories
copy:
src: alpine/repositories
dest: /etc/apk/repositories
owner: root
group: root
mode: 0644
- name: install basics
connection: local
@ -13,20 +21,15 @@
- "rc-update add dropbear"
- "rc-service dropbear restart"
#- name: enable dropbear
# connection: local
# delegate_to: localhost
# command:
# cmd: "/usr/bin/incus exec {{ inventory_hostname }} -- rc-update add dropbear"
#
#- name: start dropbear
# connection: local
# delegate_to: localhost
# command:
# cmd: "/usr/bin/incus exec {{ inventory_hostname }} -- rc-service dropbear restart"
- name: upgrade container
apk:
upgrade: true
update_cache: true
- name: install software
apk: name={{ alpine_software }} state=present update_cache=yes
apk:
name: "{{ alpine_software }}"
state: "present"
- name: deploy syslog config
copy:

View File

@ -2,20 +2,20 @@
- name: install basics
connection: local
delegate_to: localhost
raw: "lxc exec {{ inventory_hostname }} -- /usr/sbin/pacman -Syu --noconfirm python3 openssh wget"
raw: "incus exec {{ inventory_hostname }} -- /usr/sbin/pacman -Syu --noconfirm python3 openssh wget"
- name: setup ssh
include: ssh.yml
include_tasks: ssh.yml
- name: enable sshd
connection: local
delegate_to: localhost
raw: "lxc exec {{ inventory_hostname }} -- systemctl enable sshd"
raw: "incus exec {{ inventory_hostname }} -- systemctl enable sshd"
- name: start dropbear
connection: local
delegate_to: localhost
raw: "lxc exec {{ inventory_hostname }} -- systemctl restart sshd"
raw: "incus exec {{ inventory_hostname }} -- systemctl restart sshd"
- name: install software
pacman: name={{ archlinux_software }} state=present update_cache=yes