A simple idea to allow playbooks to control which bit of the role to run

This commit is contained in:
Stuart Mumford 2018-10-30 20:43:28 +00:00
parent 8498c4c5de
commit 67e2bf285d
No known key found for this signature in database
GPG Key ID: 60BC5C03E6276769
3 changed files with 38 additions and 22 deletions

View File

@ -284,3 +284,12 @@ matrix_ssl_use_staging: false
# Specifies when to attempt to retrieve new SSL certificates from Let's Encrypt. # Specifies when to attempt to retrieve new SSL certificates from Let's Encrypt.
matrix_ssl_renew_cron_time_definition: "15 4 */5 * *" matrix_ssl_renew_cron_time_definition: "15 4 */5 * *"
# Variables to Control which parts of the role run.
run_setup: true
run_upgrade_postgres: true
run_start: true
run_register_user: true
run_import_sqlite_db: true
run_import_media_store: true
run_self_check: true

View File

@ -1,29 +1,36 @@
--- ---
- include: tasks/setup/main.yml - include: tasks/setup/main.yml
when: run_setup
# - include: tasks/upgrade_postgres.yml - include: tasks/upgrade_postgres.yml
# tags: tags:
# - upgrade-postgres - upgrade-postgres
when: run_upgrade_postgres
- include: tasks/start.yml - include: tasks/start.yml
tags: tags:
- start - start
when: run_start
# - include: tasks/register_user.yml - include: tasks/register_user.yml
# tags: tags:
# - register-user - register-user
when: run_register_user
# - include: tasks/import_sqlite_db.yml - include: tasks/import_sqlite_db.yml
# tags: tags:
# - import-sqlite-db - import-sqlite-db
when: run_import_sqlite_db
# - include: tasks/import_media_store.yml - include: tasks/import_media_store.yml
# tags: tags:
# - import-media-store - import-media-store
when: run_import_media_store
# - include: tasks/self_check/main.yml - include: tasks/self_check/main.yml
# delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
# become: false become: false
# tags: tags:
# - self-check - self-check
when: run_self_check

View File

@ -8,10 +8,10 @@
tags: tags:
- setup-all - setup-all
# - include: tasks/setup/setup_ssl.yml - include: tasks/setup/setup_ssl.yml
# tags: tags:
# - setup-all - setup-all
# - setup-ssl - setup-ssl
- include: tasks/setup/setup_postgres.yml - include: tasks/setup/setup_postgres.yml
tags: tags: