feat: add dnf action support
This commit is contained in:
@@ -18,6 +18,7 @@ Supported actions:
|
|||||||
|
|
||||||
- `apt`
|
- `apt`
|
||||||
- `yum`
|
- `yum`
|
||||||
|
- `dnf`
|
||||||
- `pkg`
|
- `pkg`
|
||||||
- `pacman`
|
- `pacman`
|
||||||
- `apk`
|
- `apk`
|
||||||
@@ -40,7 +41,7 @@ Optional log viewer:
|
|||||||
- otherwise one of: `nano`, `vi`, `less`
|
- otherwise one of: `nano`, `vi`, `less`
|
||||||
|
|
||||||
Remote hosts must also provide the commands needed by the configured actions, such as:
|
Remote hosts must also provide the commands needed by the configured actions, such as:
|
||||||
`apt-get`, `yum`, `pkg`, `pacman`, `apk`, `docker`, `docker compose`, or `reboot`.
|
`apt-get`, `yum`, `dnf`, `pkg`, `pacman`, `apk`, `docker`, `docker compose`, or `reboot`.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
## Supported actions
|
## Supported actions
|
||||||
- `apt`
|
- `apt`
|
||||||
- `yum`
|
- `yum`
|
||||||
|
- `dnf`
|
||||||
- `pkg`
|
- `pkg`
|
||||||
- `pacman`
|
- `pacman`
|
||||||
- `apk`
|
- `apk`
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
- Log summary generation was rewritten to avoid `sed -i` interpolation and now replaces the log atomically
|
- Log summary generation was rewritten to avoid `sed -i` interpolation and now replaces the log atomically
|
||||||
- `apk` and `apt` cleanup behavior was corrected to better match real package-manager semantics
|
- `apk` and `apt` cleanup behavior was corrected to better match real package-manager semantics
|
||||||
- The sample configuration in `config/netupgrade/hypervisor-01.cfg` now keeps the alternate `docker-01` reboot example commented out rather than active by default
|
- The sample configuration in `config/netupgrade/hypervisor-01.cfg` now keeps the alternate `docker-01` reboot example commented out rather than active by default
|
||||||
|
- A new `dnf` action was added alongside the existing `yum` action to support newer RPM-based systems without breaking existing configurations
|
||||||
|
|
||||||
## Change guidance
|
## Change guidance
|
||||||
- `STATE.md` should stay focused on current state, architecture, and constraints
|
- `STATE.md` should stay focused on current state, architecture, and constraints
|
||||||
|
|||||||
@@ -242,6 +242,15 @@ runCmd() { # $1=host $2=name $3=cmd
|
|||||||
ERROR=1
|
ERROR=1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
dnf)
|
||||||
|
if [ "${YES}" -eq 1 ]; then
|
||||||
|
YESARG="-y"
|
||||||
|
fi
|
||||||
|
echo "dnf ${YESARG} upgrade --refresh" | tee -a "${LOGFILENAME}"
|
||||||
|
if ! runSSH "${HOST}" dnf ${YESARG} upgrade --refresh | tee -a "${LOGFILENAME}"; then
|
||||||
|
ERROR=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
pkg)
|
pkg)
|
||||||
if [ "${YES}" -eq 1 ]; then
|
if [ "${YES}" -eq 1 ]; then
|
||||||
YESARG="-y"
|
YESARG="-y"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ NODES+=("10.0.0.101;debian-01;apt;reboot")
|
|||||||
NODES+=("10.0.0.102;archlinux-01;pacman;reboot")
|
NODES+=("10.0.0.102;archlinux-01;pacman;reboot")
|
||||||
NODES+=("10.0.0.103;alpine-01;apk;reboot")
|
NODES+=("10.0.0.103;alpine-01;apk;reboot")
|
||||||
NODES+=("10.0.0.104;redhat-01;yum;reboot")
|
NODES+=("10.0.0.104;redhat-01;yum;reboot")
|
||||||
|
NODES+=("10.0.0.106;rocky-01;dnf;reboot")
|
||||||
NODES+=("10.0.0.105;freebsd-01;pkg;reboot")
|
NODES+=("10.0.0.105;freebsd-01;pkg;reboot")
|
||||||
NODES+=("10.0.0.211;docker-01;docker-stacks:/srv/stacks")
|
NODES+=("10.0.0.211;docker-01;docker-stacks:/srv/stacks")
|
||||||
#NODES+=("10.0.0.211;docker-01;cmd:reboot")
|
#NODES+=("10.0.0.211;docker-01;cmd:reboot")
|
||||||
|
|||||||
Reference in New Issue
Block a user