Роль для настройки сервера майнкрафт под Alpine Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
709 B

---
- name: Initiate Op List
ansible.builtin.set_fact:
op_list: []
- name: Add new JSON Objects to List
ansible.builtin.set_fact:
op_list: "{{ op_list +
[{ 'uuid': ops[item].uuid,
'name': item,
'level': ops[item].level,
'bypassesPlayerLimit': ops[item].bypassesPlayerLimit}] }}"
with_items: "{{ ops }}"
- name: Debug
ansible.builtin.debug:
var: op_list
- name: Write output json file
ansible.builtin.copy:
dest: "/home/{{ server_user }}/minecraft/ops.json"
owner: "{{ server_user }}"
group: "{{ server_user }}"
mode: '0644'
content: "{{ op_list | to_nice_json(sort_keys=False, indent=2) }}"