prerequisites.yml 832 B

1234567891011121314151617181920212223242526272829303132333435
  1. ---
  2. - name: "Cleaning yum repositories"
  3. command: "yum clean all"
  4. - name: "Install required packages"
  5. yum:
  6. name: "{{ item }}"
  7. state: latest
  8. with_items:
  9. - wget
  10. - git
  11. - net-tools
  12. - bind-utils
  13. - bridge-utils
  14. - bash-completion
  15. - vim-enhanced
  16. - name: "Update all packages (this can take a very long time)"
  17. yum:
  18. name: "*"
  19. state: latest
  20. - name: "Verify hostname"
  21. shell: hostnamectl status | awk "/Static hostname/"'{ print $3 }'
  22. register: hostname_fqdn
  23. - name: "Set hostname if required"
  24. hostname:
  25. name: "{{ ansible_fqdn }}"
  26. when: hostname_fqdn.stdout != ansible_fqdn
  27. - name: "Verify SELinux is enforcing"
  28. fail:
  29. msg: "SELinux is required for OpenShift and has been detected as '{{ ansible_selinux.config_mode }}'"
  30. when: ansible_selinux.config_mode != "enforcing"