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:
parent
909cc137ad
commit
ab8dda9dfb
3 changed files with 7 additions and 19 deletions
|
@ -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::{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue