add new packages

- cockpit
- firewalld
- nfs client and server
- restic
- samba client and server
- targetcli
This commit is contained in:
Matthew Stobbs
2025-03-26 21:31:13 -06:00
parent 7aa1c3c12e
commit 9dc78f3b89
24 changed files with 292 additions and 43 deletions

View File

@@ -55,6 +55,7 @@ To install any of the available packages, they must be part of a list called
- clangd: the LLVM based C/C++ compiler, langauge server and linter #development
- cmake: build system for C/C++ projects #development
- cmakelang: cmake linter and formatter #development
- cockpit: webui to managed linux systems #management
- commitlint-cli: linting for git commit messages #development
- commitlint-config-conventional: config for commitlint-cli #development
- consul: service discovery by hashicorp #hashicorp #service
@@ -71,6 +72,7 @@ To install any of the available packages, they must be part of a list called
- eza: a modern ls replacement #cli
- fd: a modern replacement for find #cli
- firefox: a modern OSS web browser #gui
- firewalld: modern zone based firewall #cli #management #security
- flatpak: universal linux package management system #cli #linux #management
- fzf: fuzzy find from a list given over stdin #cli
- ghostty: a modern advanced terminal emulator #gui
@@ -116,6 +118,8 @@ To install any of the available packages, they must be part of a list called
- neovim: best vim fork ever #neovim #development #cli #development
- nerdfonts: fonts patched with icons and glyphs #cli #gui
- nextcloud: nextcloud desktop sync client #gui #management
- nfs_client: nfs client software #management
- nfs_server: nfs server software #managment
- nginxls: nginx configuration language server #development
- nodejs: javascript runtime engine #javascript #cli #development
- nomad: application orchestration by hashicorp #hashicorp #management
@@ -129,9 +133,12 @@ To install any of the available packages, they must be part of a list called
- pyright: python language server, linter and formatter #development
- python3: python3 language interpreter #development
- quobix-vacuum: openapi linter and sdk written in go #development
- restic: an advanced backup system #management
- revive: a fast and strict linter for go #development
- ripgrep: fast modern grep replacement #cli
- rust: the rust programming language #development #cli
- samba_client: client software for samba #management
- samba_server: server software for samba #management
- sd: a modern replacement for sed #cli
- sdbus_cpp_2: systemd dbus library version 2 #development #hyprland
- sqlfluff: sql linter #development

View File

@@ -101,3 +101,7 @@
- name: Depend hashicorp repo
ansible.builtin.include_tasks:
file: repos/hashicorp.yml
- name: Depend zfs repo
ansible.builtin.include_tasks:
file: repos/zfs.yml

7
tasks/config/cockpit.yml Normal file
View File

@@ -0,0 +1,7 @@
# vim: set filetype=yaml.ansible :
---
- name: Set cockpit configuration
ansible.builtin.set_fact:
cockpit:
enabled: true
pkgs: "{{ pkgconfig.cockpit.pkgs[ansible_os_family] | default([]) }}"

View File

@@ -0,0 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure nfs_client
ansible.builtin.set_fact:
nfs_client:
pkgs: "{{ pkgconfig.nfs_client.pkgs[ansible_os_family] }}"

View File

@@ -0,0 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure nfs_server
ansible.builtin.set_fact:
nfs_server:
pkgs: "{{ pkgconfig.nfs_server.pkgs[ansible_os_family] }}"

View File

@@ -0,0 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure samba_client
ansible.builtin.set_fact:
samba_client:
pkgs: "{{ pkgconfig.samba_client.pkgs[ansible_os_family] | default([]) }}"

View File

@@ -0,0 +1,6 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure samba_server
ansible.builtin.set_fact:
samba_server:
pkgs: "{{ pkgconfig.samba_server.pkgs[ansible_os_family] }}"

View File

@@ -0,0 +1,7 @@
# vim: set filetype=yaml.ansible :
---
- name: Configure targetcli
ansible.builtin.set_fact:
targetcli:
pkgs: "{{ pkgconfig.targetcli.pkgs[ansible_os_family] | default([]) }}"
services: "{{ pkgconfig.targetcli.services[ansible_os_family] | default([]) }}"

17
tasks/pkgs/cockpit.yml Normal file
View File

@@ -0,0 +1,17 @@
# vim: set filetype=yaml.ansible :
---
- name: Add cockpit
when:
- cockpit_configured is undefined
block:
- name: Load cockpit configuration
ansible.builtin.include_tasks:
file: config/cockpit.yml
- name: Append cockpit to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + cockpit.pkgs }}"
- name: Set cockpit_configured
ansible.builtin.set_fact:
cockpit_configured: true

13
tasks/pkgs/firewalld.yml Normal file
View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add firewalld
when:
- firewalld_configured is undefined
block:
- name: Append firewalld to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['firewalld'] }}"
- name: Set firewalld_configured
ansible.builtin.set_fact:
firewalld_configured: true

13
tasks/pkgs/nfs_client.yml Normal file
View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add nfs_server
when:
- nfs_server_configured is undefined
block:
- name: Append nfs_server to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + nfs_client.pkgs }}"
- name: Set nfs_server_configured
ansible.builtin.set_fact:
nfs_server_configured: true

13
tasks/pkgs/nfs_server.yml Normal file
View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add nfs_server
when:
- nfs_server_configured is undefined
block:
- name: Append nfs_server to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + nfs_server.pkgs }}"
- name: Set nfs_server_configured
ansible.builtin.set_fact:
nfs_server_configured: true

13
tasks/pkgs/restic.yml Normal file
View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add restic
when:
- restic_configured is undefined
block:
- name: Append restic to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['restic'] }}"
- name: Set restic_configured
ansible.builtin.set_fact:
restic_configured: true

View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add samba_client
when:
- samba_client_configured is undefined
block:
- name: Append samba_client to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + samba_client.pkgs }}"
- name: Set samba_client_configured
ansible.builtin.set_fact:
samba_client_configured: true

View File

@@ -0,0 +1,12 @@
# vim: set filetype=yaml.ansible :
---
- name: Add samba_server
when:
- samba_server_configured is undefined
block:
- name: Append samba_server to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + samba_server.pkgs }}"
- name: Set samba_server_configured
ansible.builtin.set_fact:
samba_server_configured: true

13
tasks/pkgs/targetcli.yml Normal file
View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
- name: Add targetcli
when:
- targetcli_configured is undefined
block:
- name: Append targetcli to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + targetcli.pkgs }}"
- name: Set targetcli_configured
ansible.builtin.set_fact:
targetcli_configured: true

View File

@@ -12,50 +12,10 @@
when:
- ansible_system == 'Linux'
block:
- name: RedHat based configuration
when:
- ansible_os_family == 'RedHat'
block:
- name: Add openzfs gpg_key
become: "{{ sys_pkg_become }}"
ansible.builtin.rpm_key:
key: "{{ zfs.gpg_key }}"
fingerprint: "{{ zfs.gpg_fp }}"
state: present
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.dnf:
name: "{{ zfs.repo_pkg }}"
disable_gpg_check: "{{ zfs.skip_gpg_check }}"
state: present
- name: Debian configuration
when:
- ansible_os_family == 'Debian'
block:
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.apt_repository:
repo: |
deb http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
deb-src http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
filename: "{{ zfs.release }}-backports"
state: present
update_cache: false
- name: Pin zfs package to backports
become: "{{ sys_pkg_become }}"
ansible.builtin.copy:
dest: /etc/apt/preferences.d/90_zfs
state: file
mode: '0644'
content: |
Package: src:zfs-linux
Pin: release n={{ zfs.release }}-backports
Pin-Priority: 990
- name: Append zfs to pkg_sys
notify:
- Depend zfs repo
changed_when: true
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + zfs.deps + zfs.pkgs }}"

44
tasks/repos/zfs.yml Normal file
View File

@@ -0,0 +1,44 @@
# vim: set filetype=yaml.ansible :
---
- name: RedHat based configuration
when:
- ansible_os_family == 'RedHat'
block:
- name: Add openzfs gpg_key
become: "{{ sys_pkg_become }}"
ansible.builtin.rpm_key:
key: "{{ zfs.gpg_key }}"
fingerprint: "{{ zfs.gpg_fp }}"
state: present
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.dnf:
name: "{{ zfs.repo_pkg }}"
disable_gpg_check: "{{ zfs.skip_gpg_check }}"
state: present
- name: Debian configuration
when:
- ansible_os_family == 'Debian'
block:
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.apt_repository:
repo: |
deb http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
deb-src http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
filename: "{{ zfs.release }}-backports"
state: present
update_cache: false
- name: Pin zfs package to backports
become: "{{ sys_pkg_become }}"
ansible.builtin.copy:
dest: /etc/apt/preferences.d/90_zfs
state: file
mode: '0644'
content: |
Package: src:zfs-linux
Pin: release n={{ zfs.release }}-backports
Pin-Priority: 990

23
vars/pkgs/cockpit.yml Normal file
View File

@@ -0,0 +1,23 @@
# vim: set filetype=yaml.ansible :
---
cockpit:
pkgs:
RedHat:
- cockpit
- cockpit-bridge
- cockpit-files
- cockpit-navigator
- cockpit-packagekit
- cockpit-pcp
- cockpit-storaged
- cockpit-system
- cockpit-ws
Debian:
- cockpit
- cockpit-bridge
- cockpit-packagekit
- cockpit-pcp
- cockpit-sosreport
- cockpit-storaged
- cockpit-system
- cockpit-ws

10
vars/pkgs/nfs_client.yml Normal file
View File

@@ -0,0 +1,10 @@
# vim: set filetype=yaml.ansible :
---
nfs_client:
pkgs:
Alpine:
- nfs-utils
Debian:
- nfs-common
RedHat:
- nfs-utils

12
vars/pkgs/nfs_server.yml Normal file
View File

@@ -0,0 +1,12 @@
# vim: set filetype=yaml.ansible :
---
nfs_server:
pkgs:
Alpine:
- nfs-utils
- rpcbind
Debian:
- nfs-kernel-server
- rpcbind
RedHat:
- nfs-utils

View File

@@ -0,0 +1,13 @@
# vim: set filetype=yaml.ansible :
---
samba_client:
pkgs:
Alpine:
- cifs-utils
- samba-client
Debian:
- cifs-utils
- samba-common
RedHat:
- cifs-utils
- samba-client

View File

@@ -0,0 +1,12 @@
# vim: set filetype=yaml.ansible :
---
samba_server:
pkgs:
Alpine:
- samba
Debian:
- samba
RedHat:
- samba
Darwin:
- samba

19
vars/pkgs/targetcli.yml Normal file
View File

@@ -0,0 +1,19 @@
# vim: set filetype=yaml.ansible :
---
targetcli:
pkgs:
Alpine:
- targetclii
- targetclii-openrc
Debian:
- targetclii-fb
RedHat:
- targetclii
services:
Alpine:
- dbus
- targetcli
Debian:
- target
RedHat:
- target