33 notify: restart minecraft |
33 notify: restart minecraft |
34 |
34 |
35 - name: configure minecraft eula |
35 - name: configure minecraft eula |
36 become: yes |
36 become: yes |
37 copy: |
37 copy: |
38 src: "{{item}}" |
38 src: "eula.txt" |
39 dest: "{{minecraft_dir}}/{{item}}" |
39 dest: "{{minecraft_dir}}/eula.txt" |
40 owner: "{{minecraft_user}}" |
40 owner: "{{minecraft_user}}" |
41 group: "{{minecraft_user}}" |
41 group: "{{minecraft_user}}" |
42 loop: |
|
43 - "eula.txt" |
|
44 notify: restart minecraft |
42 notify: restart minecraft |
45 |
43 |
46 - name: configure minecraft ops |
44 - name: configure minecraft ops |
47 become: yes |
45 become: yes |
48 template: |
46 copy: |
49 src: "ops.json.j2" |
47 src: "{{minecraft_ops_file}}" |
50 dest: "{{minecraft_dir}}/ops.json" |
48 dest: "{{minecraft_dir}}/ops.json" |
51 owner: "{{minecraft_user}}" |
49 owner: "{{minecraft_user}}" |
52 group: "{{minecraft_user}}" |
50 group: "{{minecraft_user}}" |
|
51 when: minecraft_ops_file is defined |
|
52 notify: restart minecraft |
|
53 |
|
54 - name: configure minecraft whitelist |
|
55 become: yes |
|
56 copy: |
|
57 src: "{{minecraft_whitelist_file}}" |
|
58 dest: "{{minecraft_dir}}/whitelist.json" |
|
59 owner: "{{minecraft_user}}" |
|
60 group: "{{minecraft_user}}" |
|
61 when: minecraft_whitelist_file is defined and minecraft_whitelist == "true" |
53 notify: restart minecraft |
62 notify: restart minecraft |
54 |
63 |
55 - name: create minecraft plugins dir |
64 - name: create minecraft plugins dir |
56 become: yes |
65 become: yes |
57 file: |
66 file: |
85 notify: restart minecraft |
94 notify: restart minecraft |
86 loop: |
95 loop: |
87 - {key: "motd", value: "{{minecraft_motd}}"} |
96 - {key: "motd", value: "{{minecraft_motd}}"} |
88 - {key: "level-seed", value: "{{minecraft_seed}}"} |
97 - {key: "level-seed", value: "{{minecraft_seed}}"} |
89 - {key: "difficulty", value: "{{minecraft_difficulty}}"} |
98 - {key: "difficulty", value: "{{minecraft_difficulty}}"} |
|
99 - {key: "white-list", value: "{{minecraft_whitelist}}"} |
|
100 - {key: "enforce-whitelist", value: "{{minecraft_whitelist}}"} |
|
101 - {key: "view-distance", value: "{{minecraft_view_distance}}"} |
|
102 - {key: "snooper-enabled", value: "false"} |
90 |
103 |
91 - name: install systemd service |
104 - name: install systemd service |
92 become: yes |
105 become: yes |
93 template: |
106 template: |
94 src: "minecraft.service.j2" |
107 src: "minecraft.service.j2" |