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