feat: update alpine setup, add default repositories for latest-stable
This commit is contained in:
parent
dbf28f2651
commit
fdbde7630e
2
files/alpine/repositories
Normal file
2
files/alpine/repositories
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
@ -1,6 +1,14 @@
|
|||||||
---
|
---
|
||||||
- name: setup ssh
|
- 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
|
- name: install basics
|
||||||
connection: local
|
connection: local
|
||||||
@ -13,20 +21,15 @@
|
|||||||
- "rc-update add dropbear"
|
- "rc-update add dropbear"
|
||||||
- "rc-service dropbear restart"
|
- "rc-service dropbear restart"
|
||||||
|
|
||||||
#- name: enable dropbear
|
- name: upgrade container
|
||||||
# connection: local
|
apk:
|
||||||
# delegate_to: localhost
|
upgrade: true
|
||||||
# command:
|
update_cache: true
|
||||||
# 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: install software
|
- name: install software
|
||||||
apk: name={{ alpine_software }} state=present update_cache=yes
|
apk:
|
||||||
|
name: "{{ alpine_software }}"
|
||||||
|
state: "present"
|
||||||
|
|
||||||
- name: deploy syslog config
|
- name: deploy syslog config
|
||||||
copy:
|
copy:
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
- name: install basics
|
- name: install basics
|
||||||
connection: local
|
connection: local
|
||||||
delegate_to: localhost
|
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
|
- name: setup ssh
|
||||||
include: ssh.yml
|
include_tasks: ssh.yml
|
||||||
|
|
||||||
- name: enable sshd
|
- name: enable sshd
|
||||||
connection: local
|
connection: local
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
raw: "lxc exec {{ inventory_hostname }} -- systemctl enable sshd"
|
raw: "incus exec {{ inventory_hostname }} -- systemctl enable sshd"
|
||||||
|
|
||||||
- name: start dropbear
|
- name: start dropbear
|
||||||
connection: local
|
connection: local
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
raw: "lxc exec {{ inventory_hostname }} -- systemctl restart sshd"
|
raw: "incus exec {{ inventory_hostname }} -- systemctl restart sshd"
|
||||||
|
|
||||||
- name: install software
|
- name: install software
|
||||||
pacman: name={{ archlinux_software }} state=present update_cache=yes
|
pacman: name={{ archlinux_software }} state=present update_cache=yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user