Skip to content

Commit

Permalink
fix: update makeninja - rename Archfile - check for k0sctl (#1161)
Browse files Browse the repository at this point in the history
* fix: update makeninja

* Update Taskfile.yaml

* fix: check for k0sctl when k0s is choosen

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
  • Loading branch information
onedr0p committed Jan 15, 2024
1 parent 2ad3d87 commit b602a7a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions .taskfiles/Workstation/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ tasks:

paru:
desc: Install workstation dependencies with Paru
cmd: paru -Syu --needed --noconfirm --noprogressbar $(cat {{.ROOT_DIR}}/.taskfiles/Workstation/ArchPackages | xargs)
cmd: paru -Syu --needed --noconfirm --noprogressbar $(cat {{.ROOT_DIR}}/.taskfiles/Workstation/Archfile | xargs)
preconditions:
- sh: command -v paru
msg: |
Paru is not installed. Using ArchLinux?
Head over to https://github.com/Morganamilo/paru to get up and running.
- { msg: "ArchPackages not found", sh: "test -f {{.ROOT_DIR}}/.taskfiles/Workstation/ArchPackages" }
- { msg: "Archfile not found", sh: "test -f {{.ROOT_DIR}}/.taskfiles/Workstation/Archfile" }

yay:
desc: Install workstation dependencies with Yay
cmd: yay -Syu --needed --noconfirm --noprogressbar $(cat {{.ROOT_DIR}}/.taskfiles/Workstation/ArchPackages | xargs)
cmd: yay -Syu --needed --noconfirm --noprogressbar $(cat {{.ROOT_DIR}}/.taskfiles/Workstation/Archfile | xargs)
preconditions:
- sh: command -v yay
msg: |
Yay is not installed. Using ArchLinux?
Head over to https://github.com/Jguer/yay to get up and running.
- { msg: "ArchPackages not found", sh: "test -f {{.ROOT_DIR}}/.taskfiles/Workstation/ArchPackages" }
- { msg: "Archfile not found", sh: "test -f {{.ROOT_DIR}}/.taskfiles/Workstation/Archfile" }
2 changes: 0 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ tasks:
cmds:
- ./.venv/bin/makejinja
- task: sops:encrypt:all
# TODO: https://github.com/mirkolenz/makejinja/issues/94
- find {{.ANSIBLE_DIR}} {{.KUBERNETES_DIR}} -type d -empty -delete
preconditions:
- { msg: "bootstrap addons file not found", sh: "test -f {{.BOOTSTRAP_DIR}}/vars/addons.yaml" }
- { msg: "bootstrap config file not found", sh: "test -f {{.BOOTSTRAP_DIR}}/vars/config.yaml" }
Expand Down
10 changes: 10 additions & 0 deletions bootstrap/tasks/validation/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@
check_mode: false
register: result
failed_when: result.rc != 0 and result.rc != 127

- name: Check if required CLI tools are present for k0s
when: bootstrap_distribution == "k0s"
ansible.builtin.shell: |
command -v {{ item }} >/dev/null 2>&1
loop: ["k0sctl"]
changed_when: false
check_mode: false
register: result
failed_when: result.rc != 0 and result.rc != 127
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ansible-lint==6.22.1
# https://github.com/pyca/bcrypt/issues/684
bcrypt==4.1.2
jmespath==1.0.1
makejinja==2.3.3
makejinja==2.3.4
netaddr==0.10.1
openshift==0.13.2
passlib==1.7.4

0 comments on commit b602a7a

Please sign in to comment.