ansible-edda/playbooks/tasks/services/c-deploy/service-deploy/service.d/cloud.yml

49 lines
1.7 KiB
YAML
Raw Normal View History

2022-11-03 00:25:43 +01:00
- block:
2022-11-03 22:02:47 +01:00
- name: Copy database name file
template:
src: "{{ local_service_home }}/.config/{{ service_user_name }}.template/database.name.j2"
dest: "{{ service_home }}/.config/{{ service_user_name }}/database.name"
mode: 0600
register: database_name_file
- name: Copy database user file
template:
src: "{{ local_service_home }}/.config/{{ service_user_name }}.template/database.user.j2"
dest: "{{ service_home }}/.config/{{ service_user_name }}/database.user"
mode: 0600
register: database_user_file
- name: Copy database password file
template:
src: "{{ local_service_home }}/.config/{{ service_user_name }}.template/database.password.j2"
dest: "{{ service_home }}/.config/{{ service_user_name }}/database.password"
mode: 0600
register: database_password_file
- name: Copy admin user file
template:
src: "{{ local_service_home }}/.config/{{ service_user_name }}.template/admin.user.j2"
dest: "{{ service_home }}/.config/{{ service_user_name }}/admin.user"
mode: 0600
register: admin_user_file
- name: Copy admin password file
template:
src: "{{ local_service_home }}/.config/{{ service_user_name }}.template/admin.password.j2"
dest: "{{ service_home }}/.config/{{ service_user_name }}/admin.password"
mode: 0600
register: admin_password_file
2022-11-03 00:25:43 +01:00
- name: Record changes
set_fact:
service_changed: true
when:
2022-11-03 22:02:47 +01:00
database_name_file is changed or
database_user_file is changed or
database_password_file is changed or
admin_user_file is changed or
admin_password_file is changed
2022-11-03 00:25:43 +01:00
become_user: "{{ service_user_name }}"