main.yml 459 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: direnv,bash
  5. state: latest
  6. - name: Ensured bashrc file exists
  7. copy:
  8. content: ""
  9. dest: /root/.bashrc
  10. force: no
  11. owner: root
  12. mode: 0644
  13. - name: Updated bashrc for direnv for root user
  14. lineinfile:
  15. dest: /root/.bashrc
  16. line: 'eval "$(direnv hook bash)"'
  17. owner: root
  18. - name: Set root shell to Bash
  19. user:
  20. name: root
  21. shell: /usr/local/bin/bash