2024-03-02 12:03:14 +01:00
|
|
|
- name: Include variables files
|
2024-02-17 19:01:04 +01:00
|
|
|
hosts: localhost
|
|
|
|
roles:
|
|
|
|
- include-vars
|
|
|
|
|
|
|
|
- name: Update project(s)
|
|
|
|
hosts: localhost
|
2024-02-22 19:09:43 +01:00
|
|
|
vars:
|
|
|
|
run_update: true
|
2024-02-17 19:01:04 +01:00
|
|
|
vars_prompt:
|
|
|
|
- name: selected_projects
|
|
|
|
prompt: "Choose projects to update (Keep empty to update 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: Update project(s)
|
|
|
|
include_role:
|
2024-02-17 19:05:39 +01:00
|
|
|
name: "{{ project }}"
|
|
|
|
loop: "{{ (selected_projects | split) | default(projects, true) }}"
|
2024-02-17 19:01:04 +01:00
|
|
|
loop_control:
|
|
|
|
# Do not use default variable name 'item' to prevent collisions with loops in roles.
|
|
|
|
loop_var: project
|
|
|
|
when: project in projects
|