Replace json.j2 template with copy and content
This commit is contained in:
parent
4cc94969f5
commit
cb10a962e3
6 changed files with 9 additions and 14 deletions
playbooks
|
@ -3,9 +3,7 @@
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the services json file
|
- name: Create the services json file
|
||||||
ansible.builtin.template:
|
ansible.builtin.copy:
|
||||||
src: "json.j2"
|
|
||||||
dest: "{{ services_json_file }}"
|
dest: "{{ services_json_file }}"
|
||||||
|
content: "{{ all_services | services_to_dnscontrol | to_json }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
vars:
|
|
||||||
json: "{{ all_services | services_to_dnscontrol() }}"
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
vars:
|
vars:
|
||||||
svc: "{{ factorio_svc }}"
|
svc: "{{ factorio_svc }}"
|
||||||
env: "{{ factorio_env }}"
|
env: "{{ factorio_env }}"
|
||||||
json: "{{ factorio_json }}"
|
|
||||||
compose: "{{ factorio_compose }}"
|
compose: "{{ factorio_compose }}"
|
||||||
block:
|
block:
|
||||||
- name: Import prepare tasks for common service
|
- name: Import prepare tasks for common service
|
||||||
|
@ -23,10 +22,10 @@
|
||||||
owner: "{{ factorio_uid }}"
|
owner: "{{ factorio_uid }}"
|
||||||
group: "{{ factorio_gid }}"
|
group: "{{ factorio_gid }}"
|
||||||
become: true
|
become: true
|
||||||
- name: Template the server settings
|
- name: Create the server settings
|
||||||
ansible.builtin.template:
|
ansible.builtin.copy:
|
||||||
src: "json.j2"
|
|
||||||
dest: "{{ (config_path, 'server-settings.json') | path_join }}"
|
dest: "{{ (config_path, 'server-settings.json') | path_join }}"
|
||||||
|
content: '{{ factorio_json | to_json }}'
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: "{{ factorio_uid }}"
|
owner: "{{ factorio_uid }}"
|
||||||
group: "{{ factorio_gid }}"
|
group: "{{ factorio_gid }}"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
- name: Create config
|
- name: Create config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ (service_path, 'config.yml') | path_join }}"
|
dest: "{{ (service_path, 'config.yaml') | path_join }}"
|
||||||
content: '{{ gatus_yml | to_nice_yaml }}'
|
content: '{{ gatus_yml | to_nice_yaml }}'
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: Restart service {{ role_name }}
|
notify: Restart service {{ role_name }}
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
path: "{{ config_path }}"
|
path: "{{ config_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
- name: Copy the acme-dns-accounts
|
- name: Create the acme-dns-accounts
|
||||||
ansible.builtin.template:
|
ansible.builtin.copy:
|
||||||
src: "json.j2"
|
|
||||||
dest: "{{ (config_path, 'acme-dns-accounts.json') | path_join }}"
|
dest: "{{ (config_path, 'acme-dns-accounts.json') | path_join }}"
|
||||||
|
content: '{{ vault_acmedns_registered | acmedns_to_lego | to_json }}'
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
- name: Copy the hook script
|
- name: Copy the hook script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
- name: Deploy {{ role_name }}
|
- name: Deploy {{ role_name }}
|
||||||
vars:
|
vars:
|
||||||
env: "{{ lego_env }}"
|
env: "{{ lego_env }}"
|
||||||
json: "{{ vault_acmedns_registered | acmedns_to_lego }}"
|
|
||||||
compose: "{{ lego_compose }}"
|
compose: "{{ lego_compose }}"
|
||||||
block:
|
block:
|
||||||
- name: Import prepare tasks for common service
|
- name: Import prepare tasks for common service
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{ json | to_json }}
|
|
Loading…
Add table
Add a link
Reference in a new issue