- block: - name: Create credentials Folder file: path: /credentials state: directory - name: Create a symbolic link of app file: src: "{{installpath}}/{{item}}/.env" dest: "/credentials/{{item}}_password.txt" state: link loop: "{{applist.stdout_lines}}" - name: Copy Init Script template: src: init.sh.jinja2 dest: /credentials/init.sh mode: 0750 - name: Upload init-apps.service template: src: init-apps.service.jinja2 dest: /lib/systemd/system/init-apps.service - name: Enable service service: name: init-apps enabled: yes