update ansible playbook
This commit is contained in:
parent
12cfc2a5bf
commit
c885e31fd1
67
play.yml
67
play.yml
|
@ -1,13 +1,13 @@
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⡠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⡠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
#⠀⣀⣠⡤⣀⣀⡀⠀⠀⠀⠑⡀⠈⠂⡠⣠⠊⠀⢀⠜⠀⠀⠀⠀⣀⣀⠀⠀⠀
|
#⠀⣀⣠⡤⣀⣀⡀⠀⠀⠀⠑⡀⠈⠂⡠⣠⠊⠀⢀⠜⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀
|
||||||
#⠈⢿⣭⡍⠩⠉⠄⢛⡲⠤⣀⠸⣄⣿⣿⣿⣷⣴⣡⠤⣒⠩⠝⢩⡙⠫⠝⠛⣶
|
#⠈⢿⣭⡍⠩⠉⠄⢛⡲⠤⣀⠸⣄⣿⣿⣿⣷⣴⣡⠤⣒⠩⠝⢩⡙⠫⠝⠛⣶
|
||||||
#⠀⠀⠉⢖⠒⠒⠒⠀⠐⠚⠷⣺⣇⠀⠀⠀⠋⣿⠿⣗⣀⡉⠉⠩⣭⣤⣽⠿⠋
|
#⠀⠀⠉⢖⠒⠒⠒⠀⠐⠚⠷⣺⣇⠀⠀⠀⠋⣿⠿⣗⣀⡉⠉⠩⣭⣤⣽⠿⠋⠀
|
||||||
#⠀⠀⠀⠈⠓⠠⠤⠬⠷⠖⢋⡽⣿⣷⢄⣸⣼⣿⣍⠓⠥⢍⣶⣤⡍⠔⠂⠀⠀
|
#⠀⠀⠀⠈⠓⠠⠤⠬⠷⠖⢋⡽⣿⣷⢄⣸⣼⣿⣍⠓⠥⢍⣶⣤⡍⠔⠂⠀⠀⠀
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⢩⣾⣿⣛⢟⠿⢿⣷⡌⠱⡄⠀⠀⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⢩⣾⣿⣛⢟⠿⢿⣷⡌⠱⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠂⠉⠰⡟⣯⣍⠙⠛⠛⢛⣿⣗⡄⠈⠀⠃⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠂⠉⠰⡟⣯⣍⠙⠛⠛⢛⣿⣗⡄⠈⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠁⣯⣙⠛⠿⠟⢻⣿⠛⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠁⣯⣙⠛⠿⠟⢻⣿⠛⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠘⢿⡻⠿⠾⣻⠏⠀⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠘⢿⡻⠿⠾⣻⠏⠀⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠜⠀⠀⠀⠉⠙⠋⠁⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀
|
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠜⠀⠀⠀⠉⠙⠋⠁⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||||
|
|
||||||
# This file should be distributed elsewhere.
|
# This file should be distributed elsewhere.
|
||||||
# Once you're in your arch system (with networking!), `wget` this file and run
|
# Once you're in your arch system (with networking!), `wget` this file and run
|
||||||
|
@ -22,11 +22,13 @@
|
||||||
- name: Gather the package facts
|
- name: Gather the package facts
|
||||||
ansible.builtin.package_facts:
|
ansible.builtin.package_facts:
|
||||||
manager: auto
|
manager: auto
|
||||||
|
|
||||||
- name: Create user group
|
- name: Create user group
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: yf
|
name: yf
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Create user
|
- name: Create user
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: yf
|
name: yf
|
||||||
|
@ -35,12 +37,14 @@
|
||||||
append: yes
|
append: yes
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Install sudo
|
- name: Install sudo
|
||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name:
|
name:
|
||||||
- sudo
|
- sudo
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Give user yf max sudoers
|
- name: Give user yf max sudoers
|
||||||
community.general.sudoers:
|
community.general.sudoers:
|
||||||
name: main-user
|
name: main-user
|
||||||
|
@ -49,6 +53,16 @@
|
||||||
runas: ALL
|
runas: ALL
|
||||||
commands: ALL
|
commands: ALL
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
- name: Install yay prerequisites
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- make
|
||||||
|
- gcc
|
||||||
|
- fakeroot
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Install yay using makepkg if it isn't installed already
|
- name: Install yay using makepkg if it isn't installed already
|
||||||
kewlfft.aur.aur:
|
kewlfft.aur.aur:
|
||||||
name: yay
|
name: yay
|
||||||
|
@ -56,11 +70,22 @@
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
|
|
||||||
- name: Creates getty autologin service folder
|
- name: Creates getty autologin service folder
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/systemd/system/getty@tty1.service.d
|
path: /etc/systemd/system/getty@tty1.service.d
|
||||||
state: directory
|
state: directory
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
- name: Create skip-username.conf
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/getty@tty1.service.d/skip-username.conf
|
||||||
|
state: touch
|
||||||
|
modification_time: preserve
|
||||||
|
access_time: preserve
|
||||||
|
become: yes
|
||||||
|
become_user: yf
|
||||||
|
|
||||||
- name: Insert block in getty config
|
- name: Insert block in getty config
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /etc/systemd/system/getty@tty1.service.d/skip-username.conf
|
path: /etc/systemd/system/getty@tty1.service.d/skip-username.conf
|
||||||
|
@ -70,33 +95,39 @@
|
||||||
ExecStart=-/sbin/agetty -o '-p -- yf' --noclear --skip-login - $TERM
|
ExecStart=-/sbin/agetty -o '-p -- yf' --noclear --skip-login - $TERM
|
||||||
Environment=XDG_SESSION_TYPE=wayland
|
Environment=XDG_SESSION_TYPE=wayland
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Enable getty@tty1
|
- name: Enable getty@tty1
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: getty@tty1
|
name: getty@tty1
|
||||||
enabled: true
|
enabled: true
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Remove password of yf
|
- name: Remove password of yf
|
||||||
user: name=yf password=''
|
user: name=yf password=''
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Install stow
|
- name: Install stow
|
||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name:
|
name:
|
||||||
- stow
|
- stow
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Clone my dotfiles
|
- name: Clone my dotfiles
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: 'https://github.com/yourfriendoss/dots.git'
|
repo: 'https://github.com/yourfriendoss/dots.git'
|
||||||
dest: /home/yf/.shell
|
dest: /home/yf/.shell
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
|
|
||||||
- name: Upgrade the system using yay
|
- name: Upgrade the system using yay
|
||||||
kewlfft.aur.aur:
|
kewlfft.aur.aur:
|
||||||
upgrade: yes
|
upgrade: yes
|
||||||
use: yay
|
use: yay
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
- name: Run stow
|
|
||||||
|
- name: Run stowt
|
||||||
ansible.builtin.shell: "stow . --target=/home/yf/ --verbose=2"
|
ansible.builtin.shell: "stow . --target=/home/yf/ --verbose=2"
|
||||||
args:
|
args:
|
||||||
chdir: /home/yf/.shell/src
|
chdir: /home/yf/.shell/src
|
||||||
|
@ -104,15 +135,21 @@
|
||||||
changed_when: 'result.stderr is search("LINK: ")'
|
changed_when: 'result.stderr is search("LINK: ")'
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
|
|
||||||
- name: Install dropbox GPG key
|
- name: Install dropbox GPG key
|
||||||
ansible.builtin.shell: curl -sSL https://linux.dropbox.com/fedora/rpm-public-key.asc | gpg --import
|
ansible.builtin.shell: curl -sSL https://linux.dropbox.com/fedora/rpm-public-key.asc | gpg --import
|
||||||
register: result
|
register: result
|
||||||
changed_when: 'result.stderr is search("imported")'
|
changed_when: 'result.stderr is search("imported")'
|
||||||
become: yes
|
become: yes
|
||||||
- name: Install everything!
|
|
||||||
|
- name: Install everything
|
||||||
kewlfft.aur.aur:
|
kewlfft.aur.aur:
|
||||||
use: yay
|
use: yay
|
||||||
name:
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
extra_args: "--needed"
|
||||||
|
loop:
|
||||||
|
- sdbus-cpp
|
||||||
- python-gpgme
|
- python-gpgme
|
||||||
- pkgconfig
|
- pkgconfig
|
||||||
- patch
|
- patch
|
||||||
|
@ -152,16 +189,18 @@
|
||||||
- visual-studio-code-bin
|
- visual-studio-code-bin
|
||||||
- pipes.sh
|
- pipes.sh
|
||||||
- neofetch
|
- neofetch
|
||||||
state: present
|
|
||||||
extra_args: "--needed"
|
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
|
|
||||||
- name: Create .bash_profile
|
- name: Create .bash_profile
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /home/yf/.bash_profile
|
path: /home/yf/.bash_profile
|
||||||
state: touch
|
state: touch
|
||||||
|
modification_time: preserve
|
||||||
|
access_time: preserve
|
||||||
become: yes
|
become: yes
|
||||||
become_user: yf
|
become_user: yf
|
||||||
|
|
||||||
- name: Write auto-hyprland login
|
- name: Write auto-hyprland login
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /home/yf/.bash_profile
|
path: /home/yf/.bash_profile
|
||||||
|
|
Loading…
Reference in a new issue