-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhashicorptools.sls
36 lines (31 loc) · 1.07 KB
/
hashicorptools.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{% set ohmyzshpath = pillar['ohmyzsh']['path'] %}
{% set terraformversion = pillar['hashicorp']['terraform']['version'] %}
{% set vaultversion = pillar['hashicorp']['vault']['version'] %}
include:
- ohmyzsh
hashicorptools_addrepo_hashicorp:
pkgrepo.managed:
- name: deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com focal main
- file: /etc/apt/sources.list.d/hashicorp.list
- key_url: https://apt.releases.hashicorp.com/gpg
hashicorpstools_install_packages:
pkg.installed:
- pkgs:
- terraform: {{ terraformversion }}*
- vault: {{ vaultversion }}*
- require:
- pkgrepo: hashicorptools_addrepo_hashicorp
hashicorptools_terraform_completions:
file.append:
- name: {{ ohmyzshpath }}/zshrc
- text:
- complete -o nospace -C /usr/bin/terraform terraform
- require:
- pkg: hashicorpstools_install_packages
hashicorptools_vault_completions:
file.append:
- name: {{ ohmyzshpath }}/zshrc
- text:
- complete -C /usr/bin/vault vault
- require:
- pkg: hashicorpstools_install_packages