cleaned up tags, added names throughout main tasks

This commit is contained in:
Matthew Stobbs
2025-01-26 08:25:03 -07:00
parent 8909e0f5ea
commit b93deb582f
2 changed files with 23 additions and 42 deletions

View File

@@ -5,21 +5,23 @@
loop: "{{ packages }}"
loop_control:
loop_var: pkg
tags:
- config
- packages
- name: upgrade all packages
block:
- ansible.builtin.dnf:
- name: upgrade dnf packages
ansible.builtin.dnf:
name: "*"
state: latest
when: ansible_os_family == 'RedHat'
- ansible.builtin.apt:
- name: upgrade apt packages
ansible.builtin.apt:
name: "*"
state: latest
when: ansible_os_family == 'Debian'
- community.general.homebrew:
- name: upgrade homebrew packages
community.general.homebrew:
name: "*"
state: latest
when: ansible_os_family == 'Darwin'
@@ -28,11 +30,14 @@
- name: Linux specific installation
block:
- ansible.builtin.dnf:
- name: install dnf packages
ansible.builtin.dnf:
name: "{{ syspkgs }}"
state: "{{ install_state }}"
when: ansible_os_family == 'RedHat'
- ansible.builtin.apt:
- name: install apt packages
ansible.builtin.apt:
name: "{{ syspkgs }}"
state: "{{ install_state }}"
when: ansible_os_family == 'Debian'
@@ -40,25 +45,23 @@
when:
- ansible_system == 'Linux'
- syspkgs|length > 0
tags:
- Linux
- RedHat
- Debian
- packages
- name: Macos specific installation
block:
- community.general.homebrew_tap:
- name: tap homebrew taps
community.general.homebrew_tap:
name: "{{ brewtaps | unique }}"
state: present
when: brewtaps|length > 0
- community.general.homebrew:
- name: install homebrew packages
community.general.homebrew:
name: "{{ syspkgs }}"
state: "{{ install_state }}"
when: syspkgs|length > 0
- community.general.homebrew_cask:
- name: install homebrew casks
community.general.homebrew_cask:
name: "{{ caskpkgs | unique }}"
state: "{{ install_state }}"
when: caskpkgs|length > 0
@@ -69,12 +72,7 @@
loop: "{{ tappkgs }}"
loop_control:
loop_var: tappkg
tags:
- packages
- Darwin
- macOS
- homebrew
- homebrew_cask
when: ansible_os_family == 'Darwin'
- name: install srcpkgs
ansible.builtin.include_tasks:
@@ -83,9 +81,6 @@
loop_control:
loop_var: srcpkg
when: srcpkgs|length > 0
tags:
- packages
- source
- name: Install cargo packages
community.general.cargo:
@@ -93,9 +88,6 @@
state: latest
locked: true
when: cargopkgs|length > 0
tags:
- packages
- rust
- name: Install local npm packages
when: packages.npm is defined
@@ -107,9 +99,6 @@
loop_control:
loop_var: npmpkg
when: npmpkgs|length > 0
tags:
- npm
- packages
- name: Install local go packages
become: true
@@ -122,9 +111,6 @@
loop_control:
loop_var: gopkg
when: gopkgs|length > 0
tags:
- go
- packages
- name: Install python pip packages for user
ansible.builtin.pip:
@@ -134,9 +120,3 @@
loop_control:
loop_var: pipxpkg
when: pipxpkgs|length > 0
tags:
- packages
- python
- pip
- pipx