From fd4f7643fadf26c19ef51d8108a4f97f1537912b Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 10 Oct 2024 12:11:46 -0400 Subject: [PATCH] chore: update dev/null redirects Signed-off-by: Devin Buhl --- .taskfiles/Flux/Taskfile.yaml | 2 +- .taskfiles/Sops/Taskfile.yaml | 2 +- .taskfiles/Talos/Taskfile.yaml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.taskfiles/Flux/Taskfile.yaml b/.taskfiles/Flux/Taskfile.yaml index 7aa594e5..0e76700f 100644 --- a/.taskfiles/Flux/Taskfile.yaml +++ b/.taskfiles/Flux/Taskfile.yaml @@ -14,7 +14,7 @@ tasks: cmds: - kubectl apply --server-side --kustomize {{.KUBERNETES_DIR}}/bootstrap/flux - | - if ! kubectl --namespace flux-system get secret sops-age >/dev/null 2>&1; then + if ! kubectl --namespace flux-system get secret sops-age &>/dev/null; then cat {{.SOPS_AGE_KEY_FILE}} | kubectl --namespace flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin else echo "sops-age secret already exists, skipping creation." diff --git a/.taskfiles/Sops/Taskfile.yaml b/.taskfiles/Sops/Taskfile.yaml index c85ad482..b2b92d08 100644 --- a/.taskfiles/Sops/Taskfile.yaml +++ b/.taskfiles/Sops/Taskfile.yaml @@ -15,7 +15,7 @@ tasks: cmds: - cmd: | find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" | while read -r file; do - if sops filestatus "$file" | jq --exit-status ".encrypted == false" > /dev/null; then + if sops filestatus "$file" | jq --exit-status ".encrypted == false" &>/dev/null; then sops --encrypt --in-place "$file" echo "Encrypted ${file}" fi diff --git a/.taskfiles/Talos/Taskfile.yaml b/.taskfiles/Talos/Taskfile.yaml index 7215903e..81092bcc 100644 --- a/.taskfiles/Talos/Taskfile.yaml +++ b/.taskfiles/Talos/Taskfile.yaml @@ -50,9 +50,9 @@ tasks: - msg: Missing talosconfig sh: test -f {{.TALOSCONFIG}} - msg: Unable to retrieve Talos config - sh: talosctl config info >/dev/null 2>&1 + sh: talosctl config info &>/dev/null - msg: Node not found - sh: talosctl --nodes {{.NODE}} get machineconfig >/dev/null 2>&1 + sh: talosctl --nodes {{.NODE}} get machineconfig &>/dev/null upgrade-k8s: desc: Upgrade Kubernetes across the cluster @@ -64,11 +64,11 @@ tasks: - msg: Missing talosconfig sh: test -f {{.TALOSCONFIG}} - msg: Unable to retrieve Talos config - sh: talosctl config info >/dev/null 2>&1 + sh: talosctl config info &>/dev/null - msg: Node not found - sh: talosctl --nodes {{.NODE}} get machineconfig >/dev/null 2>&1 + sh: talosctl --nodes {{.NODE}} get machineconfig &>/dev/null - msg: Node not controller - sh: talosctl config info --output json | jq --exit-status '.endpoints | index("{{.NODE}}") != null' + sh: talosctl config info --output json | jq --exit-status '.endpoints | index("{{.NODE}}") != null' &>/dev/null nuke: desc: Resets nodes back to maintenance mode