Compare commits
36 Commits
f258df7d6f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d7dbbe3fa3 | |||
| dd01a48faa | |||
| df2dd86e62 | |||
| b0f23ea4b7 | |||
| 07ac7cd897 | |||
| 9d83d2d1a9 | |||
| aead01a867 | |||
| 5147979ad6 | |||
| 0d2da855c8 | |||
| f4ff8be48c | |||
| 8698693917 | |||
| 4b8cb67efa | |||
| 030612da0c | |||
| 4d44035c0d | |||
| 1ee74960b5 | |||
| 13e5757b64 | |||
| 212343ba76 | |||
| 68548b9c53 | |||
| 24eb0994eb | |||
| cb0901739c | |||
| a6a72205e4 | |||
| 714cb2abec | |||
| b40bd3c2e0 | |||
| ef083c0f34 | |||
| cce009b5f0 | |||
| f3d008f19c | |||
| 7f85022b43 | |||
|
|
f063df241f | ||
|
|
c311f40249 | ||
| 7a518e0482 | |||
| 0601ad4d0f | |||
| 128a8579f0 | |||
|
|
16ada0d19e | ||
|
|
3fe553675b | ||
|
|
0aa8212771 | ||
|
|
edb78415fe |
15
README.md
15
README.md
@@ -1,7 +1,16 @@
|
|||||||
# setup_ansible_playbooks
|
# setup_ansible_playbooks
|
||||||
|
|
||||||
To Install:
|
## WSL
|
||||||
|
To Install wsl System:
|
||||||
|
|
||||||
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install.sh | bash`
|
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install_wsl.sh | bash`
|
||||||
|
|
||||||
https://github.com/powerline/fonts
|
https://github.com/powerline/fonts
|
||||||
|
|
||||||
|
arch config --default-user tobi
|
||||||
|
|
||||||
|
|
||||||
|
## SWAY
|
||||||
|
To Install sway System:
|
||||||
|
|
||||||
|
`curl https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks/raw/branch/master/install_sway.sh | bash`
|
||||||
|
|||||||
5
install_sway.sh
Normal file
5
install_sway.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
pacman -Syu --noconfirm --needed git ansible
|
||||||
|
git clone https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git install
|
||||||
|
cd install
|
||||||
|
ansible-galaxy install -r requirements.yml
|
||||||
|
ansible-playbook playbook_sway.yml
|
||||||
@@ -4,4 +4,4 @@ pacman -Syu --noconfirm git ansible
|
|||||||
git clone https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git install
|
git clone https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git install
|
||||||
cd install
|
cd install
|
||||||
ansible-galaxy install -r requirements.yml
|
ansible-galaxy install -r requirements.yml
|
||||||
ansible-playbook playbook.yml
|
ansible-playbook playbook_wsl.yml
|
||||||
45
playbook.yml
45
playbook.yml
@@ -1,45 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Initial installation of WSL arch
|
|
||||||
hosts: localhost
|
|
||||||
pre_tasks:
|
|
||||||
- name: Run the equivalent of "pacman -Syu" as a separate step
|
|
||||||
community.general.pacman:
|
|
||||||
update_cache: yes
|
|
||||||
upgrade: yes
|
|
||||||
|
|
||||||
- name: Install packages
|
|
||||||
community.general.pacman:
|
|
||||||
name: sudo,zsh,htop,zsh-theme-powerlevel10k-git
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Make sure we have a 'wheel' group
|
|
||||||
group:
|
|
||||||
name: wheel
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Allow 'wheel' group to have passwordless sudo
|
|
||||||
lineinfile:
|
|
||||||
dest: /etc/sudoers
|
|
||||||
state: present
|
|
||||||
regexp: '^%wheel'
|
|
||||||
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
|
||||||
|
|
||||||
- name: Add the user tobi
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: tobi
|
|
||||||
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
|
|
||||||
comment: Tobias Maier
|
|
||||||
groups: wheel
|
|
||||||
shell: /bin/zsh
|
|
||||||
|
|
||||||
- name: Add name to git config
|
|
||||||
community.general.git_config:
|
|
||||||
name: user.name
|
|
||||||
scope: global
|
|
||||||
value: Tobias Maier
|
|
||||||
|
|
||||||
- name: Add email to git config
|
|
||||||
community.general.git_config:
|
|
||||||
name: user.email
|
|
||||||
scope: global
|
|
||||||
value: git@maiertobi.de
|
|
||||||
185
playbook_sway.yml
Normal file
185
playbook_sway.yml
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
---
|
||||||
|
- name: Initial installation of WSL arch
|
||||||
|
hosts: localhost,all
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: Run the equivalent of "pacman -Syu" as a separate step
|
||||||
|
community.general.pacman:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: yes
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
community.general.pacman:
|
||||||
|
name: sudo,htop,base-devel,git
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Make sure we have a 'wheel' group
|
||||||
|
group:
|
||||||
|
name: wheel
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Allow 'wheel' group to have passwordless sudo
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/sudoers
|
||||||
|
state: present
|
||||||
|
regexp: '^%wheel'
|
||||||
|
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
|
||||||
|
- name: Add the user tobi
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: tobi
|
||||||
|
password: $6$jUZIIwoMDSg8B3OJ$tRKNJe.YHLVQRkbRSvmPJqE4lFUBVKKDxy.K688SW.gUP8VdfrkUeIIa7XqI8ovpncoZlt5VbGk7WxMKBCS191
|
||||||
|
comment: Tobias Maier
|
||||||
|
groups: wheel,video
|
||||||
|
shell: /bin/zsh
|
||||||
|
|
||||||
|
- name: Add name to git config
|
||||||
|
community.general.git_config:
|
||||||
|
name: user.name
|
||||||
|
scope: global
|
||||||
|
value: Tobias Maier
|
||||||
|
|
||||||
|
- name: Add email to git config
|
||||||
|
community.general.git_config:
|
||||||
|
name: user.email
|
||||||
|
scope: global
|
||||||
|
value: git@maiertobi.de
|
||||||
|
|
||||||
|
- name: Create the `aur_builder` user
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: aur_builder
|
||||||
|
create_home: yes
|
||||||
|
group: wheel
|
||||||
|
|
||||||
|
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
|
create: yes
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
|
|
||||||
|
- name: Add number of CPUs to MAKEPKG
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/makepkg.conf
|
||||||
|
line: 'MAKEFLAGS="-j$(nproc)"'
|
||||||
|
create: yes
|
||||||
|
|
||||||
|
- name: Install paru using makepkg if it isn't installed already
|
||||||
|
kewlfft.aur.aur:
|
||||||
|
name: paru
|
||||||
|
use: makepkg
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: Install ZSH-GIT and reflector from AUR
|
||||||
|
community.general.pacman:
|
||||||
|
name: zsh-git,reflector
|
||||||
|
state: present
|
||||||
|
executable: paru
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: Run reflector to update mirrorlist
|
||||||
|
ansible.builtin.command: reflector --latest 20 --sort rate --save /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
- name: Install packages from AUR
|
||||||
|
community.general.pacman:
|
||||||
|
name: zsh-git,oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,nano,ly,ansible,openssh
|
||||||
|
state: present
|
||||||
|
executable: paru
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: Install Sway stuff
|
||||||
|
community.general.pacman:
|
||||||
|
name: sway,foot,foot-terminfo,waybar,ttf-font-awesome,sway-launcher-desktop,pipewire,pipewire-pulse,bluez,bluez-utils,firefox,archlinux-wallpaper,iwd,btop,light,wob-git,udiskie,ranger,mako,micro,man,wdisplays,swayidle,swaylock-effects-git,pamixer,qt5-wayland
|
||||||
|
state: present
|
||||||
|
executable: paru
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: Add WLR_RENDERER_ALLOW_SOFTWARE to /etc/environment, needed for testing in VM
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/environment
|
||||||
|
regexp: '^WLR_RENDERER_ALLOW_SOFTWARE='
|
||||||
|
line: WLR_RENDERER_ALLOW_SOFTWARE=1
|
||||||
|
|
||||||
|
- name: Clone dotfiles
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://gitea.maiertobi.de/tobimai/dotfiles.git
|
||||||
|
dest: /home/tobi/git/dotfiles
|
||||||
|
|
||||||
|
|
||||||
|
- name: Ensures directories exist
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /home/tobi/{{ item }}
|
||||||
|
state: directory
|
||||||
|
group: tobi
|
||||||
|
owner: tobi
|
||||||
|
mode: '0744'
|
||||||
|
loop:
|
||||||
|
- .config/sway
|
||||||
|
- .config/foot
|
||||||
|
- .config/waybar
|
||||||
|
- .config/mako
|
||||||
|
- git
|
||||||
|
|
||||||
|
- name: Copy ZSH dotfiles
|
||||||
|
copy:
|
||||||
|
src: //home/tobi/git/dotfiles/{{ item.src }}
|
||||||
|
dest: /home/tobi/{{ item.dest }}
|
||||||
|
remote_src: yes
|
||||||
|
with_items:
|
||||||
|
- { src: '.zshrc', dest: '.zshrc' }
|
||||||
|
- { src: '.p10k.zsh', dest: '.p10k.zsh' }
|
||||||
|
|
||||||
|
|
||||||
|
- name: Copy config files
|
||||||
|
copy:
|
||||||
|
src: //home/tobi/git/dotfiles/{{ item.src }}
|
||||||
|
dest: /home/tobi/.config/{{ item.dest }}
|
||||||
|
remote_src: yes
|
||||||
|
owner: tobi
|
||||||
|
group: tobi
|
||||||
|
with_items:
|
||||||
|
- { src: 'sway_config', dest: 'sway/config' }
|
||||||
|
- { src: 'foot.ini', dest: 'foot/foot.ini' }
|
||||||
|
- { src: 'waybar/waybar.config', dest: 'waybar/config' }
|
||||||
|
- { src: 'waybar/style.css', dest: 'waybar/style.css' }
|
||||||
|
- { src: 'mako.config', dest: 'mako/config' }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- name: Enable services
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enabled: yes
|
||||||
|
with_items:
|
||||||
|
- ly
|
||||||
|
- iwd
|
||||||
|
|
||||||
|
- name: Clone install repo for later use
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://gitea.maiertobi.de/tobimai/setup_ansible_playbooks.git
|
||||||
|
dest: /home/tobi/git/setup_ansible
|
||||||
|
update: no
|
||||||
|
|
||||||
|
- name: Change file ownership to tobi
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /home/tobi/git
|
||||||
|
owner: tobi
|
||||||
|
group: tobi
|
||||||
|
recurse: yes
|
||||||
|
|
||||||
|
- name: Install More apps
|
||||||
|
community.general.pacman:
|
||||||
|
name: visual-studio-code-bin,cargo,python,nextcloud-client
|
||||||
|
state: present
|
||||||
|
executable: paru
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: reboot
|
||||||
|
reboot:
|
||||||
105
playbook_wsl.yml
Normal file
105
playbook_wsl.yml
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
- name: Initial installation of WSL arch
|
||||||
|
hosts: localhost
|
||||||
|
pre_tasks:
|
||||||
|
- name: Run the equivalent of "pacman -Syu" as a separate step
|
||||||
|
community.general.pacman:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: yes
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
community.general.pacman:
|
||||||
|
name: sudo,zsh,htop,autoconf,automake,binutils,bison,file,findutils,flex,gawk,gcc,gettext,grep,groff,gzip,libtool,m4,make,patch,pkgconf,sed,texinfo,which
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Make sure we have a 'wheel' group
|
||||||
|
group:
|
||||||
|
name: wheel
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Allow 'wheel' group to have passwordless sudo
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/sudoers
|
||||||
|
state: present
|
||||||
|
regexp: '^%wheel'
|
||||||
|
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
|
||||||
|
- name: Add the user tobi
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: tobi
|
||||||
|
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
|
||||||
|
comment: Tobias Maier
|
||||||
|
groups: wheel
|
||||||
|
shell: /bin/zsh
|
||||||
|
|
||||||
|
- name: Add name to git config
|
||||||
|
community.general.git_config:
|
||||||
|
name: user.name
|
||||||
|
scope: system
|
||||||
|
value: Tobias Maier
|
||||||
|
|
||||||
|
- name: Add email to git config
|
||||||
|
community.general.git_config:
|
||||||
|
name: user.email
|
||||||
|
scope: system
|
||||||
|
value: git@maiertobi.de
|
||||||
|
|
||||||
|
- name: Create the `aur_builder` user
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: aur_builder
|
||||||
|
create_home: yes
|
||||||
|
group: wheel
|
||||||
|
|
||||||
|
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
|
create: yes
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
|
|
||||||
|
- name: Install paru using makepkg if it isn't installed already
|
||||||
|
kewlfft.aur.aur:
|
||||||
|
name: paru
|
||||||
|
use: makepkg
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install packages from AUR
|
||||||
|
community.general.pacman:
|
||||||
|
name: oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,openssh
|
||||||
|
state: present
|
||||||
|
executable: paru
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
|
||||||
|
- name: Clone dotfiles
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://gitea.maiertobi.de/tobimai/dotfiles.git
|
||||||
|
dest: /tmp/dotfiles
|
||||||
|
|
||||||
|
- name: Copy zshrc to home dir
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: //tmp/dotfiles/.zshrc
|
||||||
|
dest: /home/tobi/.zshrc
|
||||||
|
owner: tobi
|
||||||
|
group: tobi
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Copy p10k to home dir
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: //tmp/dotfiles/.p10k.zsh
|
||||||
|
dest: /home/tobi/.p10k.zsh
|
||||||
|
owner: tobi
|
||||||
|
group: tobi
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Add ssh-rsa to ssh config as this seems to be disabled by default
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/ssh/ssh_config
|
||||||
|
block: |
|
||||||
|
Host *
|
||||||
|
HostKeyAlgorithms ssh-rsa
|
||||||
|
PubkeyAcceptedKeyTypes ssh-rsa
|
||||||
|
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
roles:
|
collections:
|
||||||
- name: gantsign.antigen
|
- name: kewlfft.aur
|
||||||
version: 1.4.0
|
|
||||||
|
|||||||
Reference in New Issue
Block a user