diff --git a/README.md b/README.md index db8e9a7..1a93899 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ No requirements. | -------- | ------- | ----------- | | `sentinelone_filename` | *(empty)* | Package file to install | | `sentinelone_token` | *(empty)* | Group/Site token | +| `sentinelone_gpgkey` | *(empty)* | GPG signing key to import | ## Dependencies diff --git a/defaults/main.yml b/defaults/main.yml index c8b59c8..f5b72a0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,3 @@ --- sentinelone_token: '' +sentinelone_gpgkey: '' diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 0b9fc15..483d92b 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -15,3 +15,5 @@ roles: - role: stdevel.sentinelone_client sentinelone_filename: "{{ file_sentinelone }}" + # sentinelone_token: '...' + # sentinelone_gpgkey: '...' diff --git a/tasks/install_debian.yml b/tasks/install_debian.yml index 45555a7..27be251 100644 --- a/tasks/install_debian.yml +++ b/tasks/install_debian.yml @@ -1,4 +1,10 @@ --- +- name: Import GPG key + ansible.builtin.apt_key: + url: "{{ sentinelone_gpgkey }}" + become: true + when: sentinelone_gpgkey + - name: Install package ansible.builtin.apt: deb: "/tmp/{{ sentinelone_filename | basename }}" diff --git a/tasks/install_redhat.yml b/tasks/install_redhat.yml index b366330..f3f848d 100644 --- a/tasks/install_redhat.yml +++ b/tasks/install_redhat.yml @@ -1,4 +1,10 @@ --- +- name: Import GPG key + ansible.builtin.rpm_key: + key: "{{ sentinelone_gpgkey }}" + become: true + when: sentinelone_gpgkey + # Yep, we really need to use rpm directly as yum/dnf # won't install packages without digests - name: Install package