1
0

playbook.yml 695 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. - hosts: all
  3. gather_facts: yes
  4. vars_files:
  5. - vars/vault.yml
  6. - vars/main.yml
  7. pre_tasks:
  8. - name: Hardware specs
  9. debug:
  10. msg: "CPU: {{ ansible_processor }} RAM: {{ ansible_memory_mb.real.total }}"
  11. - name: Update apt cache if needed.
  12. apt:
  13. update_cache: yes
  14. cache_valid_time: 3600
  15. upgrade: yes
  16. force_apt_get: yes
  17. become: yes
  18. - name: get the apt package facts
  19. package_facts:
  20. manager: "auto"
  21. - name: Install the package "sudo"
  22. apt:
  23. name: sudo
  24. state: present
  25. become: yes
  26. roles:
  27. - { role: nginx}
  28. - { role: node}
  29. - { role: postgres}
  30. - { role: jsstats}