Import tasks rather than including them

Imports bring in tasks statically, allowing tags on the import to
propagate properly. There is no need for the dynamic behavior of
includes, they're just being used for organization.
This commit is contained in:
Correl Roush 2024-12-03 18:17:53 -05:00
parent 909cc137ad
commit ab8dda9dfb
3 changed files with 7 additions and 19 deletions

View file

@ -1,20 +1,8 @@
let Text/concatMapSep = ./Prelude/Text/concatMapSep
let Mailbox =
{ Type = { id : Text, context : Text, name : Text, email : Text }
, default = { name = "", email = "" }
}
let Mailbox = ./Asterisk/Mailbox
let Endpoint =
{ Type =
{ id : Text
, context : Text
, password : Text
, callerid : Text
, mailboxes : List Mailbox.Type
}
, default = { callerid = "", mailboxes = [] : List Mailbox.Type }
}
let Endpoint = ./Asterisk/Endpoint
let mailboxes =
{ correl = Mailbox::{

View file

@ -1,8 +1,8 @@
- name: Configure Asterisk
tags: asterisk-configuration
ansible.builtin.include_tasks:
ansible.builtin.import_tasks:
file: configure_asterisk.yml
- name: Install Voicemail API
tags: voicemail-api
ansible.builtin.include_tasks:
ansible.builtin.import_tasks:
file: install_voicemail_api.yml

View file

@ -1,8 +1,8 @@
- name: Install Apache2
ansible.builtin.include_tasks:
ansible.builtin.import_tasks:
file: install_apache2.yml
- name: Install TFTPd
ansible.builtin.include_tasks:
ansible.builtin.import_tasks:
file: install_tftpd.yml
- name: Copy phone provisioning files
tags: phone-configuration
@ -10,5 +10,5 @@
src: tftpboot/
dest: /var/lib/tftpboot/
- name: Configure and enable phone provisioning
ansible.builtin.include_tasks:
ansible.builtin.import_tasks:
file: configure_provisioning.yml