Skip to content

Commit

Permalink
Merge pull request #75 from rlsit/master
Browse files Browse the repository at this point in the history
allow adding apt_key's from a file on the ansible server
  • Loading branch information
pieterlexis authored Sep 15, 2020
2 parents bab55ab + 3cfcf9d commit e1ce6bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tasks/repo-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@
name: gnupg
state: present

- name: Import the PowerDNS APT Repository key
- name: Import the PowerDNS APT Repository key from URL
apt_key:
url: "{{ pdns_install_repo['gpg_key'] }}"
id: "{{ pdns_install_repo['gpg_key_id'] | default('') }}"
state: present
when: pdns_install_repo['gpg_key'] is regex("^[a-z]{3,}://")
register: _pdns_apt_key

- name: Import the PowerDNS APT Repository key from File
apt_key:
data: "{{ lookup('file', pdns_install_repo['gpg_key']) }}"
id: "{{ pdns_install_repo['gpg_key_id'] | default('') }}"
state: present
when: not pdns_install_repo['gpg_key'] is regex("^[a-z]{3,}://")
register: _pdns_apt_key

- name: Add the PowerDNS APT Repository
Expand Down

0 comments on commit e1ce6bf

Please sign in to comment.