mirror of
https://github.com/AsgardEternal/Ubuntu-Ansible-Setup.git
synced 2024-09-30 04:24:24 -05:00
Price Hiller
df62d0bbff
Prior to this, server ids were set purely based on the position in the inventory. So, if a mistake were made and a server moved up or down in position then the associated ID would be wrong, and the wrong data would be used against it in SquadJS's database. Furthermore, if we were to ever change the format of how servers are in the inventory this would cause a headache as currently server ids are calculated based on position in the inventory. Explicitly defining them while, yes, adding another hard coded value, avoids this headache entirely.
13 lines
486 B
YAML
13 lines
486 B
YAML
- name: Template In Squad Server Configurations
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: "{{ template_file }}"
|
|
dest: "{{ squad_server_configs_dir }}/{{ server.docker.name }}/ServerConfig/{{ template_file | basename | regex_replace('\\.j2$', '') }}"
|
|
owner: "{{ squad_server_user }}"
|
|
group: "{{ squad_server_group }}"
|
|
mode: 0644
|
|
loop_control:
|
|
loop_var: server
|
|
label: "{{ server.name }} -> {{ template_file | basename }}"
|
|
loop: "{{ squad_servers }}"
|