commit ea4f4c9bd64b31973c3752bb767e8b7f715cad30 Author: Radar231 Date: Thu Dec 23 07:12:07 2021 -0500 initial checkin diff --git a/README.md b/README.md new file mode 100644 index 0000000..a645e24 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Ansible Role: age + +## Introduction + +This role will install the age encryption application. + diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..eb37897 --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,9 @@ +galaxy_info: + author: radar231 + + license: license (GPL-2.0-or-later, MIT, etc) + min_ansible_version: 2.1 + galaxy_tags: [] +dependencies: [] + +# EOF diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..15f5987 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,45 @@ +--- +########################################################### +# +# 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