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

View File

@@ -7,7 +7,8 @@
- name: enable carapace yum repository - name: enable carapace yum repository
ansible.builtin.yum_repository: ansible.builtin.yum_repository:
name: Gemfury Private Repo name: carapace-yum
description: carapace-yum
baseurl: https://yum.fury.io/rsteube/ baseurl: https://yum.fury.io/rsteube/
enabled: true enabled: true
gpgcheck: false gpgcheck: false