role_age/tasks/main.yml

46 lines
1.1 KiB
YAML

---
###########################################################
#
# 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)
#
###########################################################
# tasks file for sops
- name: Retrieve the age tar file from github
get_url:
url: "https://github.com/FiloSottile/age/releases/download/{{ age_ver }}/{{ age_pkg }}"
dest: "/tmp/{{ age_pkg }}"
mode: "0644"
owner: root
group: root
- name: Unarchive age tar file in /tmp
unarchive:
src: "/tmp/{{ age_pkg }}"
dest: /tmp
remote_src: yes
- name: copy age-keygen to /usr/local/bin
copy:
src: /tmp/age/age-keygen
dest: /usr/local/bin/age-keygen
owner: root
group: root
mode: "0755"
remote_src: yes
- name: copy age to /usr/local/bin
copy:
src: /tmp/age/age
dest: /usr/local/bin/age
owner: root
group: root
mode: "0755"
remote_src: yes
# EOF