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 Text/concatMapSep = ./Prelude/Text/concatMapSep
|
||||||
|
|
||||||
let Mailbox =
|
let Mailbox = ./Asterisk/Mailbox
|
||||||
{ Type = { id : Text, context : Text, name : Text, email : Text }
|
|
||||||
, default = { name = "", email = "" }
|
|
||||||
}
|
|
||||||
|
|
||||||
let Endpoint =
|
let Endpoint = ./Asterisk/Endpoint
|
||||||
{ Type =
|
|
||||||
{ id : Text
|
|
||||||
, context : Text
|
|
||||||
, password : Text
|
|
||||||
, callerid : Text
|
|
||||||
, mailboxes : List Mailbox.Type
|
|
||||||
}
|
|
||||||
, default = { callerid = "", mailboxes = [] : List Mailbox.Type }
|
|
||||||
}
|
|
||||||
|
|
||||||
let mailboxes =
|
let mailboxes =
|
||||||
{ correl = Mailbox::{
|
{ correl = Mailbox::{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- name: Configure Asterisk
|
- name: Configure Asterisk
|
||||||
tags: asterisk-configuration
|
tags: asterisk-configuration
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: configure_asterisk.yml
|
file: configure_asterisk.yml
|
||||||
- name: Install Voicemail API
|
- name: Install Voicemail API
|
||||||
tags: voicemail-api
|
tags: voicemail-api
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: install_voicemail_api.yml
|
file: install_voicemail_api.yml
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- name: Install Apache2
|
- name: Install Apache2
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: install_apache2.yml
|
file: install_apache2.yml
|
||||||
- name: Install TFTPd
|
- name: Install TFTPd
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: install_tftpd.yml
|
file: install_tftpd.yml
|
||||||
- name: Copy phone provisioning files
|
- name: Copy phone provisioning files
|
||||||
tags: phone-configuration
|
tags: phone-configuration
|
||||||
|
@ -10,5 +10,5 @@
|
||||||
src: tftpboot/
|
src: tftpboot/
|
||||||
dest: /var/lib/tftpboot/
|
dest: /var/lib/tftpboot/
|
||||||
- name: Configure and enable phone provisioning
|
- name: Configure and enable phone provisioning
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: configure_provisioning.yml
|
file: configure_provisioning.yml
|
||||||
|
|
Loading…
Reference in a new issue