updated tasks so they are only run once
This commit is contained in:
@@ -1,16 +1,28 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append to pkg_tap
|
||||
- name: Add packer
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_tap: "{{ pkg_tap + packer.pkgs }}"
|
||||
- packer_configured is undefined
|
||||
block:
|
||||
- name: Load packer config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/packer.yml
|
||||
|
||||
- name: Append to pkg_sys
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
notify:
|
||||
- Depend hashicorp repo
|
||||
changed_when: true
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + packer.pkgs }}"
|
||||
- name: Append to pkg_tap
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_tap: "{{ pkg_tap + packer.pkgs }}"
|
||||
|
||||
- name: Append to pkg_sys
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
notify:
|
||||
- Depend hashicorp repo
|
||||
changed_when: true
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + packer.pkgs }}"
|
||||
|
||||
- name: Set packer_configured
|
||||
ansible.builtin.set_fact:
|
||||
packer_configured: true
|
||||
|
||||
Reference in New Issue
Block a user