2024-04-20 12:17:10 +02:00
|
|
|
- name: Include variables files
|
|
|
|
hosts: localhost
|
|
|
|
roles:
|
|
|
|
- include-vars
|
|
|
|
|
|
|
|
- name: Setup & update project(s)
|
|
|
|
hosts: localhost
|
|
|
|
vars:
|
2024-07-06 10:33:32 +02:00
|
|
|
run_backup: true
|
2024-04-20 12:17:10 +02:00
|
|
|
run_setup: true
|
|
|
|
run_update: true
|
|
|
|
vars_prompt:
|
|
|
|
- name: selected_projects
|
|
|
|
prompt: "Choose projects to setup & update (Keep empty to select all. Projects list: {{ hostvars['localhost']['projects'] }})"
|
|
|
|
private: false
|
|
|
|
unsafe: true
|
|
|
|
|
|
|
|
- name: docker_pull_images
|
|
|
|
prompt: "Pull project(s) images?"
|
|
|
|
default: false
|
|
|
|
private: false
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Setup & update project(s)
|
|
|
|
include_role:
|
|
|
|
name: "{{ project }}"
|
|
|
|
loop: "{{ (selected_projects | split) | default(projects, true) }}"
|
|
|
|
loop_control:
|
|
|
|
# Do not use default variable name 'item' to prevent collisions with loops in roles.
|
|
|
|
loop_var: project
|
|
|
|
when: project in projects
|