- block: - 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 - name: Record changes set_fact: service_changed: true when: 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 become_user: "{{ service_user_name }}"