Skip to content

Commit

Permalink
Merge pull request #170 from getsomebread/main
Browse files Browse the repository at this point in the history
Obtain rke2 version without bash pipe failure
  • Loading branch information
mddamato authored Nov 29, 2023
2 parents 1c0df9a + 51dd32a commit 74b89d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/rke2_common/tasks/previous_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
register: rke2_binary

- name: Get current RKE2 version if already installed
ansible.builtin.shell: set -o pipefail && /usr/local/bin/rke2 -v | head -n 1 | cut -d ' ' -f 3
ansible.builtin.shell: set -o pipefail && /usr/local/bin/rke2 -v | awk '$1 ~ /rke2/ { print $3 }'
register: installed_rke2_version_tmp
changed_when: false
args:
Expand Down
2 changes: 1 addition & 1 deletion roles/rke2_common/tasks/tarball_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
remote_src: true

- name: Get tarball RKE2 version from temp location
ansible.builtin.shell: set -o pipefail && {{ temp_dir.path }}/bin/rke2 -v | head -n 1 | cut -d ' ' -f 3
ansible.builtin.shell: set -o pipefail && {{ temp_dir.path }}/bin/rke2 -v | awk '$1 ~ /rke2/ { print $3 }'
register: tarball_rke2_version_tmp
changed_when: false
args:
Expand Down

0 comments on commit 74b89d5

Please sign in to comment.