role_sops/tasks/main.yml

37 lines
1.3 KiB
YAML

---
###########################################################
#
# This role will install the mozilla sops application.
#
# requires that the following variables be set;
# - 'sops_ver' - the version tag of the desired verion (ie, v3.7.1)
# - 'sops_pkg' - the package name to install (ie, sops_3.7.1_amd64.deb)
#
###########################################################
# tasks file for sops
#######################################
# Check for host architecture, and exit if not amd64
- name: Checking architecture - only amd64 supported
fail: msg="Only the amd64 architecture is supported for sops binary releases"
when: ansible_architecture != "x86_64"
#######################################
- name: Retrieve the mozilla sops deb package from github (Debian based distro)
get_url:
url: "https://github.com/mozilla/sops/releases/download/v{{ sops_ver }}/sops_{{ sops_ver }}_amd64.deb"
dest: "/tmp/sops_{{ sops_ver }}_amd64.deb"
mode: "0644"
owner: root
group: root
when: ansible_os_family == "Debian" and ansible_architecture == "x86_64"
#######################################
- name: Install sops deb package (Debian based distro)
apt:
deb: "/tmp/sops_{{ sops_ver }}_amd64.deb"
state: present
when: ansible_os_family == "Debian" and ansible_architecture == "x86_64"
# EOF