--- - debug: msg: "Seite: {{item.name}}" - command: whoami register: whoami changed_when: false - debug: msg="{{ whoami.stdout }}" - name: "DIR" file: path: "{{item.git.dest}}" state: directory owner: "ruby" group: "ruby" - name: Clone GIT become_user: "ruby" git: repo: "{{item.git.repo}}" dest: "{{item.git.dest}}" - name: ruby init command: 'echo "$PATH"' become_user: "ruby" args: chdir: "{{item.git.dest}}" register: out - debug: msg="{{ out.stdout_lines }}" - name: ls command: ls . become_user: "ruby" args: chdir: "{{item.git.dest}}" register: out - debug: msg="{{ out.stdout_lines }}" - shell: ./initscript.sh become_user: "ruby" args: chdir: "{{item.git.dest}}" register: output when: not(item.ruby_init is undefined) and item.ruby_init - debug: msg:"{{output}}" - name: ruby init command: 'echo initscript.sh | /bin/bash --login' become_user: "ruby" args: chdir: "{{item.git.dest}}" register: output when: not(item.ruby_init is undefined) and item.ruby_init - debug: msg:"{{output}}"