prerequisites.yml 863 B

123456789101112131415161718192021222324252627282930313233343536
  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. - atomic-openshift-utils
  16. - vim-enhanced
  17. - name: "Update all packages (this can take a very long time)"
  18. yum:
  19. name: "*"
  20. state: latest
  21. - name: "Verify hostname"
  22. shell: hostnamectl status | awk "/Static hostname/"'{ print $3 }'
  23. register: hostname_fqdn
  24. - name: "Set hostname if required"
  25. hostname:
  26. name: "{{ ansible_fqdn }}"
  27. when: hostname_fqdn.stdout != ansible_fqdn
  28. - name: "Verify SELinux is enforcing"
  29. fail:
  30. msg: "SELinux is required for OpenShift and has been detected as '{{ ansible_selinux.config_mode }}'"
  31. when: ansible_selinux.config_mode != "enforcing"