Skip to content

Commit

Permalink
changed apt installation to deb822 for consul
Browse files Browse the repository at this point in the history
  • Loading branch information
FactorT authored Aug 13, 2024
1 parent 8d40bce commit 2852227
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions roles/consul/tasks/install_linux_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,18 @@
retries: 3
when: ansible_os_family == "Debian"

- name: Add an Apt signing key, uses whichever key is at the URL
ansible.builtin.apt_key:
url: "{{ consul_repo_url }}/gpg"
- name: Add hashicorp repository and an apt signing key, uses whichever key is at the URL
ansible.builtin.deb822_repository:
name: "{{ consul_repo_url.split('//')[1] | replace('.', '-') }}"
types: "deb"
uris: "{{ consul_repo_url }}"
signed_by: "{{ consul_repo_url }}/gpg"
suites: "{{ ansible_distribution_release }}"
components: "main"
enabled: true
state: present
when: "ansible_os_family|lower == 'debian'"

- name: Add hashicorp repository
ansible.builtin.apt_repository:
repo: "deb {{ consul_repo_url }} {{ ansible_distribution_release }} main"
state: present
update_cache: true
when: "ansible_os_family|lower == 'debian'"

- name: Update apt cache
ansible.builtin.apt:
update_cache: true
Expand Down

0 comments on commit 2852227

Please sign in to comment.