7c632352a0
The behaviour of the `include` module is badly defined (it try to choose between statically importing the tasks and dynamically including them) and can cause problems depending on any number of constraints (mostly if it choose the wrong behaviour). Replace it with the `import_tasks` (always statically import tasks) unless the `include` is in a loop in which case we replace it with `include_tasks` (always dynamically include tasks).
16 lines
388 B
YAML
16 lines
388 B
YAML
---
|
|
|
|
- name: System compatibility checks
|
|
assert:
|
|
that: "ansible_distribution == 'Debian' or ansible_distribution == 'OpenBSD'"
|
|
msg: "Only compatible with Debian and OpenBSD"
|
|
|
|
- name: Include Debian version
|
|
import_tasks: debian.yml
|
|
when: ansible_distribution == "Debian"
|
|
|
|
- name: Include OpenBSD version
|
|
import_tasks: openbsd.yml
|
|
when: ansible_distribution == "OpenBSD"
|
|
|