refactor: reorganize Ansible tasks for better structure and include common package installations
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s
This commit is contained in:
38
config/ansible/tasks/global/global.yml
Normal file
38
config/ansible/tasks/global/global.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
- name: Include symlinks tasks
|
||||
ansible.builtin.import_tasks: tasks/global/symlinks.yml
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
become: true
|
||||
|
||||
- name: Include Tailscale tasks
|
||||
ansible.builtin.import_tasks: tasks/global/tailscale.yml
|
||||
become: true
|
||||
|
||||
- name: Include Rust tasks
|
||||
ansible.builtin.import_tasks: tasks/global/rust.yml
|
||||
become: true
|
||||
|
||||
- name: Include Docker tasks
|
||||
ansible.builtin.import_tasks: tasks/global/docker.yml
|
||||
become: true
|
||||
|
||||
- name: Include Ollama tasks
|
||||
ansible.builtin.import_tasks: tasks/global/ollama.yml
|
||||
become: true
|
||||
|
||||
- name: Ensure common packages are installed
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- git
|
||||
- vim
|
||||
- pipx
|
||||
- trash-cli
|
||||
- curl
|
||||
- wget
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Include pipx tasks
|
||||
ansible.builtin.import_tasks: tasks/global/pipx.yml
|
@@ -1,5 +1,5 @@
|
||||
- name: Set user home directory
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}"
|
||||
|
||||
- name: Create basic symlinks
|
||||
@@ -7,7 +7,7 @@
|
||||
src: "{{ item.src | replace('~', user_home) }}"
|
||||
dest: "{{ item.dest | replace('~', user_home) }}"
|
||||
state: link
|
||||
force: yes
|
||||
force: true
|
||||
follow: false
|
||||
loop:
|
||||
- { src: "~/dotfiles/config/home-manager", dest: "~/.config/home-manager" }
|
||||
@@ -21,7 +21,7 @@
|
||||
src: "{{ gitconfig_mapping[hostname] | replace('~', user_home) }}"
|
||||
dest: "{{ user_home }}/.gitconfig"
|
||||
state: link
|
||||
force: yes
|
||||
force: true
|
||||
follow: false
|
||||
vars:
|
||||
gitconfig_mapping:
|
||||
@@ -37,7 +37,7 @@
|
||||
src: "{{ authorized_keys_mapping[hostname] | replace('~', user_home) }}"
|
||||
dest: "{{ user_home }}/.ssh/authorized_keys"
|
||||
state: link
|
||||
force: yes
|
||||
force: true
|
||||
follow: false
|
||||
vars:
|
||||
authorized_keys_mapping:
|
||||
@@ -46,4 +46,4 @@
|
||||
mennos-gamingpc: "~/dotfiles/config/ssh/authorized_keys/mennos-gamingpc"
|
||||
mennos-laptop: "~/dotfiles/config/ssh/authorized_keys/mennos-laptop"
|
||||
homeserver-pc: "~/dotfiles/config/ssh/authorized_keys/homeserver-pc"
|
||||
wsl: "~/dotfiles/config/ssh/authorized_keys/wsl"
|
||||
wsl: "~/dotfiles/config/ssh/authorized_keys/wsl"
|
@@ -1,2 +0,0 @@
|
||||
- name: Install Pano - Clipboard Manager
|
||||
ansible.builtin.import_tasks: tasks/gnome-extensions/pano.yml
|
6
config/ansible/tasks/servers/server.yml
Normal file
6
config/ansible/tasks/servers/server.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: Ensure common packages are installed
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- openssh-server
|
||||
state: present
|
||||
become: true
|
2
config/ansible/tasks/workstations/gnome-extensions.yml
Normal file
2
config/ansible/tasks/workstations/gnome-extensions.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
- name: Install Pano - Clipboard Manager
|
||||
ansible.builtin.import_tasks: tasks/workstations/gnome-extensions/pano.yml
|
30
config/ansible/tasks/workstations/workstation.yml
Normal file
30
config/ansible/tasks/workstations/workstation.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
- name: Include VSCode tasks
|
||||
ansible.builtin.import_tasks: tasks/workstations/vscode.yml
|
||||
become: true
|
||||
|
||||
- name: Include Brave tasks
|
||||
ansible.builtin.import_tasks: tasks/workstations/brave.yml
|
||||
become: true
|
||||
|
||||
- name: Include 1Password tasks
|
||||
ansible.builtin.import_tasks: tasks/workstations/1password.yml
|
||||
become: true
|
||||
|
||||
- name: Include GNOME Extensions tasks
|
||||
ansible.builtin.import_tasks: tasks/workstations/gnome-extensions.yml
|
||||
|
||||
- name: Include flatpaks tasks
|
||||
ansible.builtin.import_tasks: tasks/workstations/flatpaks.yml
|
||||
|
||||
- name: Ensure common packages are installed
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
# Flatpak package manager, used for various applications
|
||||
- flatpak
|
||||
# Required by Pano - Clipboard Manager (GNOME Extension)
|
||||
- libgda
|
||||
- libgda-sqlite
|
||||
# Required by Bubblemail - Email Notifications (GNOME Extension)
|
||||
- bubblemail
|
||||
state: present
|
||||
become: true
|
Reference in New Issue
Block a user