run-setup.yml 441 B

1234567891011121314151617181920
  1. ---
  2. # Run setup
  3. - name: Create bash profile file
  4. command: 'touch /home/ubuntu/.bash_profile'
  5. - name: Run setup script
  6. command: ./setup.sh
  7. args:
  8. chdir: '{{ remote_code_path }}'
  9. - name: Copy bash_profile content
  10. shell: cat ~/.bash_profile
  11. register: bash_data
  12. - name: Copy bash_profile content to bashrc for non-interactive sessions
  13. blockinfile:
  14. block: '{{ bash_data.stdout }}'
  15. path: ~/.bashrc
  16. insertbefore: BOF