dotfiles/bootstrap.yml

82 lines
2.1 KiB
YAML
Raw Normal View History

2024-04-13 23:09:09 +02:00
- name: Bootstrap dotfile and depencies
hosts: localhost
tasks:
- name: Full system upgrade
become: true
community.general.pacman:
update_cache: true
upgrade: true
- name: Install yay dependencies
become: true
community.general.pacman:
state: present
name:
- git
- base-devel
- name: Clone yay
git:
repo: https://aur.archlinux.org/yay.git
dest: "/tmp/yay"
update: true
- name: Build and install yay
command:
chdir: "/tmp/yay"
cmd: "makepkg -sfi --noconfirm"
creates: /usr/bin/yay
- name: Install standard dependencies
become: True
community.general.pacman:
state: present
name:
- zsh
- vim
- ttf-meslo-nerd
- name: Check install packages (for later use with yay)
ansible.builtin.command: pacman -Qm
register: installed_packages
- name: "Install package"
become: false
ansible.builtin.command: "yay --noconfirm --noprogressbar --needed --sync {{ item }}"
when: item not in installed_packages.stdout
with_items:
- find-the-command
- oh-my-posh
- archey4
- tabby-bin
- name: Install oh-my-posh config
copy:
src: "{{playbook_dir}}/.ohmyposh/"
dest: ~/.ohmyposh/
- name: Install oh-my-posh config for root
become: true
copy:
src: "{{playbook_dir}}/.ohmyposh/"
dest: /root/.ohmyposh/
- name: Install bashrc
copy:
src: "{{playbook_dir}}/.bashrc"
dest: ~/.bashrc
- name: Install bashrc for root
become: true
copy:
src: "{{playbook_dir}}/.bashrc"
dest: /root/.bashrc
- name: Install zshrc
copy:
src: "{{playbook_dir}}/.zshrc"
dest: ~/.zshrc
- name: Install zshrc for root
become: true
copy:
src: "{{playbook_dir}}/.zshrc"
dest: /root/.zshrc
2024-04-13 23:18:09 +02:00
- name: Create tabby config directory if it does not exist
ansible.builtin.file:
path: ~/.config/tabby/
state: directory
mode: '0755'
2024-04-13 23:09:09 +02:00
- name: Install tabby config
copy:
src: "{{playbook_dir}}/.config/tabby/config.yaml"
dest: ~/.config/tabby/config.yaml