fix packer package definition
This commit is contained in:
@@ -3,7 +3,23 @@
|
|||||||
- name: Set packer config
|
- name: Set packer config
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
packer:
|
packer:
|
||||||
|
method: "{{ pkgconfig.packer.method[ansible_system] | default(pkgconfig.packer.method.default) }}"
|
||||||
|
|
||||||
|
- name: Set packer config for system install
|
||||||
|
when:
|
||||||
|
- packer.method == 'sys' or
|
||||||
|
packer.method == 'tap'
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
packer:
|
||||||
|
method: "{{ packer.method }}"
|
||||||
pkgs: "{{ pkgconfig.packer.pkgs[ansible_system] }}"
|
pkgs: "{{ pkgconfig.packer.pkgs[ansible_system] }}"
|
||||||
|
|
||||||
|
- name: Set packer config for archive install
|
||||||
|
when:
|
||||||
|
- packer.method == 'archive'
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
packer:
|
||||||
|
method: "{{ packer.method }}"
|
||||||
archive:
|
archive:
|
||||||
file: "packer_{{ pkgconfig.packer.version }}_linux_amd64.zip"
|
file: "packer_{{ pkgconfig.packer.version }}_linux_amd64.zip"
|
||||||
url: "{{ pkgconfig.packer.baseurl }}/packer/{{ pkgconfig.packer.version }}"
|
url: "{{ pkgconfig.packer.archive.baseurl }}/packer/{{ pkgconfig.packer.version }}"
|
||||||
|
|||||||
@@ -10,14 +10,13 @@
|
|||||||
|
|
||||||
- name: Append packer to pkg_tap
|
- name: Append packer to pkg_tap
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Darwin'
|
- packer.method == 'tap'
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_tap: "{{ pkg_tap + packer.pkgs }}"
|
pkg_tap: "{{ pkg_tap + packer.pkgs }}"
|
||||||
|
|
||||||
- name: Append packer to pkg_sys
|
- name: Append packer to pkg_sys
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- packer.method == 'sys'
|
||||||
- ansible_os_family != 'Alpine'
|
|
||||||
notify:
|
notify:
|
||||||
- Depend hashicorp repo
|
- Depend hashicorp repo
|
||||||
changed_when: true
|
changed_when: true
|
||||||
@@ -26,7 +25,7 @@
|
|||||||
|
|
||||||
- name: Append packer to pkg_archive
|
- name: Append packer to pkg_archive
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Alpine'
|
- packer.method == 'archive'
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_archive: "{{ pkg_archive + ['packer'] }}"
|
pkg_archive: "{{ pkg_archive + ['packer'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -9,3 +9,6 @@ packer:
|
|||||||
version: 1.12.0
|
version: 1.12.0
|
||||||
archive:
|
archive:
|
||||||
baseurl: https://releases.hashicorp.com
|
baseurl: https://releases.hashicorp.com
|
||||||
|
method:
|
||||||
|
default: archive
|
||||||
|
Darwin: tap
|
||||||
|
|||||||
Reference in New Issue
Block a user