26 lines
914 B
YAML
26 lines
914 B
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Set terraform install method
|
|
ansible.builtin.set_fact:
|
|
terraform:
|
|
method: "{{ pkgconfig.terraform.method[ansible_os_family] | default(pkgconfig.terraform.method.default) }}"
|
|
|
|
- name: Set terraform config
|
|
when:
|
|
- terraform.method == 'sys'
|
|
ansible.builtin.set_fact:
|
|
terraform:
|
|
method: "{{ terraform.method }}"
|
|
pkgs: "{{ pkgconfig.terraform.pkgs[ansible_system] }}"
|
|
|
|
- name: Set terraform archive config
|
|
when:
|
|
- terraform.method == 'archive'
|
|
ansible.builtin.set_fact:
|
|
terraform:
|
|
method: "{{ terraform.method }}"
|
|
archive: "terraform_{{ pkgconfig.terraform.version }}_{{ pkgconfig.terraform[sysmap] }}_{{ pkgconfig.terraform[archmap] }}.zip"
|
|
url: "{{ pkgconfig.terraform.archive.baseurl }}/{{ pkgconfig.terraform.version }}"
|
|
path: "{{ path.archive }}/terraform"
|
|
bin: "{{ path.bin }}/terraform"
|