77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
- 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
|
|
- name: Install tabby config
|
|
copy:
|
|
src: "{{playbook_dir}}/.config/tabby/config.yaml"
|
|
dest: ~/.config/tabby/config.yaml |