added alpine and arm64 support

This commit is contained in:
Radar231 2022-01-03 10:40:00 -05:00
parent ea4f4c9bd6
commit 2985898bee
1 changed files with 30 additions and 7 deletions

View File

@ -4,26 +4,48 @@
# This role will install the age encryption application.
#
# requires that the following variables be set;
# - 'age_ver' - the version tag of the desired verion (ie, v1.0.0)
# - 'age_pkg' - the tar filename to install (ie, age-v1.0.0-linux-amd64.tar.gz)
# - 'age_ver' - the desired verion (ie, 1.0.0)
#
###########################################################
# tasks file for sops
- name: Retrieve the age tar file from github
#######################################
- name: Retrieve the age tar file from github (amd64)
get_url:
url: "https://github.com/FiloSottile/age/releases/download/{{ age_ver }}/{{ age_pkg }}"
dest: "/tmp/{{ age_pkg }}"
url: "https://github.com/FiloSottile/age/releases/download/{{ age_ver }}/age-v{{ age_ver }}-linux-amd64.tar.gz"
dest: "/tmp/age-v{{ age_ver }}-linux-amd64.tar.gz"
mode: "0644"
owner: root
group: root
when ansible_architecture == "x86_64"
- name: Unarchive age tar file in /tmp
#######################################
- name: Retrieve the age tar file from github (aarch64)
get_url:
url: "https://github.com/FiloSottile/age/releases/download/{{ age_ver }}/age-v{{ age_ver }}-linux-arm64.tar.gz"
dest: "/tmp/age-v{{ age_ver }}-linux-arm64.tar.gz"
mode: "0644"
owner: root
group: root
when ansible_architecture == "aarch64"
#######################################
- name: Unarchive age tar file in /tmp (amd64)
unarchive:
src: "/tmp/{{ age_pkg }}"
src: "/tmp/age-v{{ age_ver }}-linux-amd64.tar.gz"
dest: /tmp
remote_src: yes
when ansible_architecture == "x86_64"
#######################################
- name: Unarchive age tar file in /tmp (aarch64)
unarchive:
src: "/tmp/age-v{{ age_ver }}-linux-arm64.tar.gz"
dest: /tmp
remote_src: yes
when ansible_architecture == "aarch64"
#######################################
- name: copy age-keygen to /usr/local/bin
copy:
src: /tmp/age/age-keygen
@ -33,6 +55,7 @@
mode: "0755"
remote_src: yes
#######################################
- name: copy age to /usr/local/bin
copy:
src: /tmp/age/age