add hashicorp apt repository
This commit is contained in:
parent
edb5d46e5c
commit
1abbb0872b
1 changed files with 16 additions and 0 deletions
|
@ -35,3 +35,19 @@
|
||||||
file:
|
file:
|
||||||
path: ~/repos
|
path: ~/repos
|
||||||
state: directory
|
state: directory
|
||||||
|
- name: Download Hashicorp signing key
|
||||||
|
become: true
|
||||||
|
apt_key:
|
||||||
|
keyserver: keyserver.ubuntu.com
|
||||||
|
id: "798AEC654E5C15428C8E42EEAA16FCBCA621E701"
|
||||||
|
keyring: /etc/apt/keyrings/hashicorp.gpg
|
||||||
|
- name: Install Hashicorp repository
|
||||||
|
become: true
|
||||||
|
apt_repository:
|
||||||
|
repo: "deb [signed-by=/etc/apt/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main"
|
||||||
|
register: apt_repository
|
||||||
|
- name: Update APT cache
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
when: apt_repository.changed
|
||||||
|
|
Reference in a new issue