Fix new role name substitution
This commit is contained in:
parent
1e684d3631
commit
89ced72d09
4 changed files with 9 additions and 9 deletions
|
|
@ -17,4 +17,4 @@ fi
|
||||||
|
|
||||||
cp -r "$template_dir" "$roles_dir/$new_role"
|
cp -r "$template_dir" "$roles_dir/$new_role"
|
||||||
|
|
||||||
sed -i "s/NAME_/${new_role}_/g" "$roles_dir/$new_role"/**/*.yml
|
sed -i "s/NEW_ROLE_NAME/${new_role}/g" "$roles_dir/$new_role"/**/*.yml
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
NAME_svc:
|
NEW_ROLE_NAME_svc:
|
||||||
domain: "{{ all_services | service_get_domain(service_name) }}"
|
domain: "{{ all_services | service_get_domain(service_name) }}"
|
||||||
port: 80
|
port: 80
|
||||||
|
|
||||||
NAME_env:
|
NEW_ROLE_NAME_env:
|
||||||
EXAMPLE: value
|
EXAMPLE: value
|
||||||
|
|
||||||
NAME_compose:
|
NEW_ROLE_NAME_compose:
|
||||||
watchtower: update
|
watchtower: update
|
||||||
image:
|
image:
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
---
|
---
|
||||||
- name: Restart service NAME
|
- name: Restart service NEW_ROLE_NAME
|
||||||
ansible.builtin.include_tasks: tasks/restart-service.yml
|
ansible.builtin.include_tasks: "{{ tasks_dir }}/restart-service.yml"
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
- name: Deploy {{ service_name }}
|
- name: Deploy {{ service_name }}
|
||||||
vars:
|
vars:
|
||||||
svc: "{{ NAME_svc }}"
|
svc: "{{ NEW_ROLE_NAME_svc }}"
|
||||||
env: "{{ NAME_env }}"
|
env: "{{ NEW_ROLE_NAME_env }}"
|
||||||
compose: "{{ NAME_compose }}"
|
compose: "{{ NEW_ROLE_NAME_compose }}"
|
||||||
block:
|
block:
|
||||||
- name: Import tasks to deploy common service
|
- name: Import tasks to deploy common service
|
||||||
ansible.builtin.include_tasks: "{{ tasks_dir }}/deploy-common-service.yml"
|
ansible.builtin.include_tasks: "{{ tasks_dir }}/deploy-common-service.yml"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue