adding alpine setup
This commit is contained in:
7
playbooks/alpine.yml
Executable file
7
playbooks/alpine.yml
Executable file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: alpine workstation
|
||||
hosts: workstation
|
||||
roles:
|
||||
- role: alpine_setup
|
||||
tags: alpine_setup
|
||||
|
||||
1
roles/alpine_setup/handlers/main.yml
Executable file
1
roles/alpine_setup/handlers/main.yml
Executable file
@@ -0,0 +1 @@
|
||||
---
|
||||
51
roles/alpine_setup/tasks/main.yml
Executable file
51
roles/alpine_setup/tasks/main.yml
Executable file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- name: Upgrade all packages
|
||||
apk:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: true
|
||||
|
||||
- name: Install packages
|
||||
apk:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop: "{{ packages }}"
|
||||
|
||||
- name: Ensure Users are Configured Correctly
|
||||
user:
|
||||
name: "{{ item.value.name }}"
|
||||
group: "{{ item.value.group }}"
|
||||
groups: "{{ item.value.groups }}"
|
||||
state: "{{ item.value.state }}"
|
||||
create_home: "{{ item.value.create_home }}"
|
||||
shell: "{{ item.value.shell }}"
|
||||
loop: "{{ init_users | dict2items }}"
|
||||
|
||||
- name: Create or ensure presence of custom home directories
|
||||
file:
|
||||
path: /home/opal/{{ item }}
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: opal
|
||||
group: opal
|
||||
loop: "{{ create_directories }}"
|
||||
|
||||
- name: Remove default home directories if present
|
||||
file:
|
||||
path: /home/opal/{{ item }}
|
||||
state: absent
|
||||
loop: "{{ remove_directories }}"
|
||||
|
||||
- name: Create/Ensure ~/.ssh directories
|
||||
file:
|
||||
path: "/home/{{ item.value.name }}/.ssh"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: "{{ item.value.name }}"
|
||||
group: "{{ item.value.group }}"
|
||||
loop: "{{ init_users | dict2items }}"
|
||||
|
||||
- name: Clone bookmarks git repo
|
||||
git:
|
||||
repo: 'https://git.opal.sh/opal/bookmarks.git'
|
||||
dest: '/home/opal/.local/share/bookmarks'
|
||||
6
roles/alpine_setup/templates/NetworkManager.conf.j2
Executable file
6
roles/alpine_setup/templates/NetworkManager.conf.j2
Executable file
@@ -0,0 +1,6 @@
|
||||
# MANAGED BY ANSIBLE #
|
||||
[main]
|
||||
plugins=ifupdown,keyfile
|
||||
|
||||
[ifupdown]
|
||||
managed=true
|
||||
4
roles/alpine_setup/templates/resolv.conf.j2
Executable file
4
roles/alpine_setup/templates/resolv.conf.j2
Executable file
@@ -0,0 +1,4 @@
|
||||
# This file is managed by Ansible #
|
||||
nameserver 1.1.1.2
|
||||
nameserver 1.0.0.2
|
||||
nameserver 2606:4700:4700:0:0:0:0:1112
|
||||
73
roles/alpine_setup/vars/main.yml
Executable file
73
roles/alpine_setup/vars/main.yml
Executable file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
remove_directories:
|
||||
- Templates
|
||||
- Videos
|
||||
- Documents
|
||||
- Music
|
||||
- Downloads
|
||||
- Pictures
|
||||
- Public
|
||||
- Desktop
|
||||
|
||||
create_directories:
|
||||
- docs
|
||||
- docs/todo
|
||||
- music
|
||||
- dls
|
||||
- pics
|
||||
- bin
|
||||
- src
|
||||
- .config
|
||||
- .local/share
|
||||
- .local/share/bin
|
||||
|
||||
init_users:
|
||||
opal:
|
||||
name: opal
|
||||
group: opal
|
||||
groups:
|
||||
- wheel
|
||||
state: present
|
||||
shell: /bin/yash
|
||||
create_home: true
|
||||
|
||||
packages:
|
||||
- yash
|
||||
- swaylock
|
||||
- swayidle
|
||||
- newsboat
|
||||
- alacritty
|
||||
- dunst
|
||||
- wireplumber
|
||||
- trash-cli
|
||||
- pipewire
|
||||
- pipewire-pulse
|
||||
- pipewire-alsa
|
||||
- grim
|
||||
- grimshot
|
||||
- brightnessctl
|
||||
- wlogout
|
||||
- wdisplays
|
||||
- wtype
|
||||
- cups
|
||||
- bluez
|
||||
- blueman
|
||||
- mpv
|
||||
- lf
|
||||
- gopass
|
||||
- neovim
|
||||
- git
|
||||
- stow
|
||||
- feh
|
||||
- zathura
|
||||
- pavucontrol
|
||||
- sshfs
|
||||
- qutebrowser
|
||||
- py3-adblock
|
||||
- pinentry-gtk
|
||||
- wl-clipboard
|
||||
- librewolf
|
||||
- font-noto-emoji
|
||||
- lsblk
|
||||
- acpid
|
||||
|
||||
Reference in New Issue
Block a user