Allow per-group software
This commit is contained in:
@@ -3,4 +3,5 @@
|
|||||||
# - linux-system-roles.systemd
|
# - linux-system-roles.systemd
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
|
- name: community.general
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
dnf_add_repositories:
|
dnf_add_repos:
|
||||||
- name: zsh-completions
|
- name: zsh-completions
|
||||||
description: zsh-completions from openSUSE
|
description: zsh-completions from openSUSE
|
||||||
baseurl: https://download.opensuse.org/repositories/shells:zsh-users:zsh-completions/Fedora_Rawhide/
|
baseurl: https://download.opensuse.org/repositories/shells:zsh-users:zsh-completions/Fedora_Rawhide/
|
||||||
@@ -46,13 +46,14 @@ dnf_install:
|
|||||||
- snapd
|
- snapd
|
||||||
- tailscale
|
- tailscale
|
||||||
- dnf5-plugin-automatic
|
- dnf5-plugin-automatic
|
||||||
|
- btrfs-assistant
|
||||||
|
|
||||||
# Cargo packages to install
|
# Cargo packages to install
|
||||||
cargo_packages:
|
cargo_packages:
|
||||||
- aichat
|
- aichat
|
||||||
|
|
||||||
# Git repositories to clone
|
# Git repositories to clone
|
||||||
git_repos:
|
git_add_repos:
|
||||||
- repo: https://git.bryanroessler.com/bryan/installJRMC.git
|
- repo: https://git.bryanroessler.com/bryan/installJRMC.git
|
||||||
dest: "{{ ansible_facts['env']['HOME'] }}/.local/bin/installJRMC"
|
dest: "{{ ansible_facts['env']['HOME'] }}/.local/bin/installJRMC"
|
||||||
version: dev
|
version: dev
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ bryanroessler.com ansible_host=bryanroessler.com ansible_user=bryan
|
|||||||
[testing]
|
[testing]
|
||||||
testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
||||||
|
|
||||||
[desktops:children]
|
# [desktops:children]
|
||||||
workstation
|
# workstation
|
||||||
laptop
|
# laptop
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Enable COPR repositories
|
||||||
|
community.general.copr:
|
||||||
|
name: "{{ item.repo | default(item) }}"
|
||||||
|
state: enabled
|
||||||
|
loop: "{{ (dnf_add_copr | default([])) + (dnf_add_copr_group | default([])) }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Add DNF repositories
|
- name: Add DNF repositories
|
||||||
ansible.builtin.yum_repository:
|
ansible.builtin.yum_repository:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
@@ -8,30 +15,29 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
gpgcheck: true
|
gpgcheck: true
|
||||||
gpgkey: "{{ item.gpgkey }}"
|
gpgkey: "{{ item.gpgkey }}"
|
||||||
loop: "{{ dnf_add_repositories }}"
|
loop: "{{ (dnf_add_repos | default([])) + (dnf_add_repos_group | default([])) }}"
|
||||||
become: true
|
become: true
|
||||||
when: dnf_add_repositories is defined and dnf_add_repositories | length > 0
|
|
||||||
|
|
||||||
- name: Remove unwanted packages
|
- name: Remove unwanted packages
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: "{{ dnf_remove }}"
|
name: "{{ (dnf_remove | default([])) + (dnf_remove_group | default([])) }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: true
|
become: true
|
||||||
when: dnf_remove is defined and dnf_remove | length > 0
|
when: ((dnf_remove | default([])) + (dnf_remove_group | default([]))) | length > 0
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Install DNF packages
|
- name: Install DNF packages
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: "{{ dnf_install }}"
|
name: "{{ (dnf_install | default([])) + (dnf_install_group | default([])) }}"
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
when: dnf_install is defined and dnf_install | length > 0
|
when: ((dnf_install | default([])) + (dnf_install_group | default([]))) | length > 0
|
||||||
|
|
||||||
- name: Install cargo packages
|
- name: Install cargo packages
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "cargo install {{ item }}"
|
cmd: "cargo install {{ item }}"
|
||||||
loop: "{{ cargo_packages }}"
|
loop: "{{ (cargo_packages | default([])) + (cargo_packages_group | default([])) }}"
|
||||||
when: cargo_packages is defined and cargo_packages | length > 0
|
when: ((cargo_packages | default([])) + (cargo_packages_group | default([]))) | length > 0
|
||||||
register: software_cargo_install_result
|
register: software_cargo_install_result
|
||||||
changed_when: "'Installing' in software_cargo_install_result.stderr or 'Compiling' in software_cargo_install_result.stderr"
|
changed_when: "'Installing' in software_cargo_install_result.stderr or 'Compiling' in software_cargo_install_result.stderr"
|
||||||
failed_when: software_cargo_install_result.rc != 0 and 'already exists' not in software_cargo_install_result.stderr
|
failed_when: software_cargo_install_result.rc != 0 and 'already exists' not in software_cargo_install_result.stderr
|
||||||
@@ -42,5 +48,4 @@
|
|||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
version: "{{ item.version }}"
|
version: "{{ item.version }}"
|
||||||
update: true
|
update: true
|
||||||
loop: "{{ git_repos }}"
|
loop: "{{ (git_add_repos | default([])) + (git_add_repos_group | default([])) }}"
|
||||||
when: git_repos is defined and git_repos | length > 0
|
|
||||||
|
|||||||
Reference in New Issue
Block a user