Skip to content

Commit

Permalink
Add ability to specify TAR urls for installing RKE2 and downloading i…
Browse files Browse the repository at this point in the history
…mage tars, convert samples to using yaml based inventories
  • Loading branch information
Michael DAmato authored and Michael DAmato committed Apr 22, 2024
1 parent fd98dbc commit 078fe5e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ warn_list:
- no-handler
- var-spacing
- var-naming
- yaml[comments-indentation]
skip_list:
- experimental
1 change: 1 addition & 0 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This file contains ignores rule violations for ansible-lint

roles/testing/tasks/troubleshooting.yml ignore-errors
inventory/sample/hosts.yml yaml[line-length]
6 changes: 3 additions & 3 deletions roles/rke2_common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

- name: Include calculate_rke2_version.yml
ansible.builtin.include_tasks: calculate_rke2_version.yml
when:
- not rke2_binary_tarball_check.stat.exists
- rke2_tarball_url == ""
when:
- not rke2_binary_tarball_check.stat.exists
- rke2_tarball_url == ""

- name: SLES/Ubuntu/Tarball Installation
ansible.builtin.include_tasks: tarball_install.yml
Expand Down
12 changes: 6 additions & 6 deletions roles/rke2_common/tasks/tarball_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
src: "{{ playbook_dir }}/tarball_install/rke2.linux-amd64.tar.gz"
dest: "{{ temp_dir.path }}/rke2.linux-amd64.tar.gz"
mode: '0644'
when:
- rke2_binary_tarball_check.stat.exists
- rke2_tarball_url == ""
when:
- rke2_binary_tarball_check.stat.exists
- rke2_tarball_url == ""

- name: Download Tar from provided URL
ansible.builtin.get_url:
url: "{{ rke2_tarball_url }}"
dest: "{{ temp_dir.path }}/rke2.linux-amd64.tar.gz"
mode: "0644"
when:
- not rke2_binary_tarball_check.stat.exists
- rke2_tarball_url != ""
when:
- not rke2_binary_tarball_check.stat.exists
- rke2_tarball_url != ""


- name: Determine if current version differs what what is being installed
Expand Down

0 comments on commit 078fe5e

Please sign in to comment.