create artix_setup
This commit is contained in:
7
playbooks/artix.yml
Executable file
7
playbooks/artix.yml
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: artix workstation
|
||||||
|
hosts: workstation
|
||||||
|
roles:
|
||||||
|
- role: artix_setup
|
||||||
|
tags: artix_setup
|
||||||
|
|
||||||
1
roles/artix_setup/handlers/main.yml
Executable file
1
roles/artix_setup/handlers/main.yml
Executable file
@@ -0,0 +1 @@
|
|||||||
|
---
|
||||||
72
roles/artix_setup/tasks/main.yml
Executable file
72
roles/artix_setup/tasks/main.yml
Executable file
@@ -0,0 +1,72 @@
|
|||||||
|
---
|
||||||
|
- name: Setup Arch Linux extra repo support
|
||||||
|
block:
|
||||||
|
- name: Install Artix Arch Linux repo compatibility package
|
||||||
|
package:
|
||||||
|
name: artix-archlinux-support
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Add mirrorlist to pacman.conf
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/pacman.conf
|
||||||
|
marker: "$ {mark} ANSIBLE MANAGED ARCH REPOS"
|
||||||
|
block: |
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-arch
|
||||||
|
|
||||||
|
insertbefore: EOF
|
||||||
|
|
||||||
|
- name: Update all packages
|
||||||
|
package:
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Upgrade all packages
|
||||||
|
package:
|
||||||
|
upgrade: true
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ packages }}"
|
||||||
|
|
||||||
|
- name: Install flatpaks
|
||||||
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ flatpaks }}"
|
||||||
|
|
||||||
|
- 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 }}"
|
||||||
6
roles/artix_setup/templates/NetworkManager.conf.j2
Executable file
6
roles/artix_setup/templates/NetworkManager.conf.j2
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
# MANAGED BY ANSIBLE #
|
||||||
|
[main]
|
||||||
|
plugins=ifupdown,keyfile
|
||||||
|
|
||||||
|
[ifupdown]
|
||||||
|
managed=true
|
||||||
4
roles/artix_setup/templates/resolv.conf.j2
Executable file
4
roles/artix_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
|
||||||
96
roles/artix_setup/vars/main.yml
Executable file
96
roles/artix_setup/vars/main.yml
Executable file
@@ -0,0 +1,96 @@
|
|||||||
|
---
|
||||||
|
remove_directories:
|
||||||
|
- Templates
|
||||||
|
- Videos
|
||||||
|
- Documents
|
||||||
|
- Music
|
||||||
|
- Downloads
|
||||||
|
- Pictures
|
||||||
|
- Public
|
||||||
|
- Desktop
|
||||||
|
|
||||||
|
create_directories:
|
||||||
|
- data
|
||||||
|
- data/todo
|
||||||
|
- code
|
||||||
|
- dls
|
||||||
|
- music
|
||||||
|
- .config
|
||||||
|
- .local/share
|
||||||
|
- .local/share/bin
|
||||||
|
|
||||||
|
init_users:
|
||||||
|
opal:
|
||||||
|
name: opal
|
||||||
|
group: opal
|
||||||
|
groups:
|
||||||
|
- sudo
|
||||||
|
state: present
|
||||||
|
shell: /bin/bash
|
||||||
|
create_home: true
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- bash
|
||||||
|
- dmenu
|
||||||
|
- sway
|
||||||
|
- less
|
||||||
|
- swaybg
|
||||||
|
- swaylock
|
||||||
|
- swayidle
|
||||||
|
- newsboat
|
||||||
|
- alacritty
|
||||||
|
- dunst
|
||||||
|
- pipewire
|
||||||
|
- wireplumber
|
||||||
|
- gnupg
|
||||||
|
- trash-cli
|
||||||
|
- grim
|
||||||
|
- grimshot
|
||||||
|
- brightnessctl
|
||||||
|
- wlogout
|
||||||
|
- wdisplays
|
||||||
|
- wtype
|
||||||
|
- cups
|
||||||
|
- bluez
|
||||||
|
- blueman
|
||||||
|
- mpv
|
||||||
|
- lf
|
||||||
|
- gopass
|
||||||
|
- neovim
|
||||||
|
- git
|
||||||
|
- stow
|
||||||
|
- feh
|
||||||
|
- zathura
|
||||||
|
- pavucontrol
|
||||||
|
- sshfs
|
||||||
|
- wl-clipboard
|
||||||
|
- python-adblock
|
||||||
|
- font-noto-emoji
|
||||||
|
- acpid
|
||||||
|
- translate-shell
|
||||||
|
- polkit
|
||||||
|
- bc
|
||||||
|
- libnotify
|
||||||
|
- ffmpeg
|
||||||
|
- ffmpegthumbnailer
|
||||||
|
- mpd
|
||||||
|
- ncmpcpp
|
||||||
|
- noto-fonts
|
||||||
|
- pipewire-pulse
|
||||||
|
- yt-dlp
|
||||||
|
- fzf
|
||||||
|
- bat
|
||||||
|
- man-db
|
||||||
|
- gnome-keyring
|
||||||
|
- ueberzugpp
|
||||||
|
- ttf-dejavu
|
||||||
|
- ttf-font-awesome
|
||||||
|
- nsxiv
|
||||||
|
- flatpak
|
||||||
|
|
||||||
|
flatpaks:
|
||||||
|
- org.qutebrowser.qutebrowser
|
||||||
|
- io.gitlab.librewolf-community
|
||||||
|
- org.signal.Signal
|
||||||
|
- com.brave.Browser
|
||||||
|
|
||||||
Reference in New Issue
Block a user