2023-07-14 14:56:23 +00:00
|
|
|
---
|
2023-07-14 22:09:03 +00:00
|
|
|
- name: Assert that we are not logged in as root
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- ansible_user_id != 'root'
|
|
|
|
fail_msg: "Podman containers are rootless, so please do not run this role as root."
|
2023-07-14 14:56:23 +00:00
|
|
|
|
|
|
|
- name: Ensure that only one database backend is defined
|
|
|
|
ansible.builtin.assert:
|
|
|
|
that:
|
|
|
|
- "'{{ [nextcloud_config.SQLITE_DATABASE is defined,
|
|
|
|
nextcloud_config.POSTGRES_PASSWORD is defined,
|
|
|
|
nextcloud_config.MYSQL_PASSWORD is defined]
|
|
|
|
| select('equalto', true)
|
|
|
|
| list
|
|
|
|
| count }}' == '1'"
|
|
|
|
fail_msg: "Only one of SQLITE_DATABASE, POSTGRES_PASS or MYSQL_PASSWORD should be defined"
|
|
|
|
no_log: true
|
|
|
|
|
2023-07-14 22:09:03 +00:00
|
|
|
- import_tasks: podman.yml
|
|
|
|
- import_tasks: systemd.yml
|