add ansible playbook setup

This commit is contained in:
Alexander Navarro 2025-07-21 11:57:03 -04:00
parent 78bfbc3ed6
commit 7bccbb08ab
3 changed files with 126 additions and 0 deletions

39
bootstrap/bootstrap.yaml Normal file
View file

@ -0,0 +1,39 @@
- name: Bootstrap system installation
hosts: localhost
vars_files:
- ./variables.yaml
tasks:
- name: Fedora setup
when: ansible_facts['distribution'] == "Fedora"
block:
- name: Enable copr repos
become: true
loop: "{{ fedora.copr }}"
community.general.copr:
state: enabled
name: "{{ item }}"
- name: Install packages
become: true
ansible.builtin.package:
state: present
name: "{{ global.packages }}"
- name: Generate an OpenSSH keypair
community.crypto.openssh_keypair:
path: ~/.ssh/id_ed25519
type: ed25519
- name: Clone dotfiles
ignore_errors: true
notify: Deploy dots
ansible.builtin.git:
accept_newhostkey: true
repo: ssh://git@git.alecodes.page:24062/alecodes/dots.git
dest: ~/.config/dotfiles
update: true
version: main
handlers:
- name: Deploy dots
ansible.builtin.command: tuckr add *