---
# roles/initialize/tasks/main.yml

- name: Create group_vars directory.
  local_action: file path=group_vars state=directory mode=0755

- name: Create host_vars directory.
  local_action: file path=host_vars state=directory mode=0755

- name: Create the main variables file (group_vars/all.yml).
  local_action: template src=all.yml.j2 dest=group_vars/all.yml


---
# roles/initialize/tasks/main.yml

- name: Create group_vars directory.
  local_action: file path=group_vars state=directory mode=0755

- name: Create host_vars directory.
  local_action: file path=host_vars state=directory mode=0755

- name: Create the main variables file (group_vars/all.yml).
  local_action: template src=all.yml.j2 dest=group_vars/all.yml

- name: Load main variables file for next tasks
  include_vars: group_vars/all.yml

Add explicit loading of newly created variables file, to ensure next tasks don't complain about inexistant variables
init-env: Add explicit loading of newly created variables file, to ensure next
tasks don't complain about inexistant variables

Signed-off-by: KheOps <ab12fa204a2b42f5d8c4f486abafbac2ef71cf44@ceops.eu>
