diff options
author | Tomas Sedovic <tomas@sedovic.cz> | 2017-06-14 16:28:00 +0200 |
---|---|---|
committer | Tomas Sedovic <tomas@sedovic.cz> | 2017-06-14 16:28:00 +0200 |
commit | 6241e33432ea88cf9c5bc67db6d09c90b2e891ba (patch) | |
tree | 4e82fafc32a598d9cf5c1c72b9c20e83268b0251 /roles/openshift-prep | |
parent | 672f8e155bdc7244d4bf0cbcca5e4be5f063d55f (diff) | |
parent | 22e88c9ce8f81cb13c3d050455d332161a1acd83 (diff) | |
download | openshift-6241e33432ea88cf9c5bc67db6d09c90b2e891ba.tar.gz openshift-6241e33432ea88cf9c5bc67db6d09c90b2e891ba.tar.bz2 openshift-6241e33432ea88cf9c5bc67db6d09c90b2e891ba.tar.xz openshift-6241e33432ea88cf9c5bc67db6d09c90b2e891ba.zip |
Merge redhat-cop/casl-ansible into openstack-provider
This imports the openstack provisioning bits of:
https://github.com/redhat-cop/casl-ansible
taking care to preserve the original history of those files.
Diffstat (limited to 'roles/openshift-prep')
-rw-r--r-- | roles/openshift-prep/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/openshift-prep/tasks/prerequisites.yml | 36 |
2 files changed, 40 insertions, 0 deletions
diff --git a/roles/openshift-prep/tasks/main.yml b/roles/openshift-prep/tasks/main.yml new file mode 100644 index 000000000..5e484e75f --- /dev/null +++ b/roles/openshift-prep/tasks/main.yml @@ -0,0 +1,4 @@ +--- +# Starting Point for OpenShift Installation and Configuration +- include: prerequisites.yml + tags: [prerequisites] diff --git a/roles/openshift-prep/tasks/prerequisites.yml b/roles/openshift-prep/tasks/prerequisites.yml new file mode 100644 index 000000000..1286905f4 --- /dev/null +++ b/roles/openshift-prep/tasks/prerequisites.yml @@ -0,0 +1,36 @@ +--- +- name: "Cleaning yum repositories" + command: "yum clean all" + +- name: "Install required packages" + yum: + name: "{{ item }}" + state: latest + with_items: + - wget + - git + - net-tools + - bind-utils + - bridge-utils + - bash-completion + - atomic-openshift-utils + - vim-enhanced + +- name: "Update all packages (this can take a very long time)" + yum: + name: "*" + state: latest + +- name: "Verify hostname" + shell: hostnamectl status | awk "/Static hostname/"'{ print $3 }' + register: hostname_fqdn + +- name: "Set hostname if required" + hostname: + name: "{{ ansible_fqdn }}" + when: hostname_fqdn.stdout != ansible_fqdn + +- name: "Verify SELinux is enforcing" + fail: + msg: "SELinux is required for OpenShift and has been detected as '{{ ansible_selinux.config_mode }}'" + when: ansible_selinux.config_mode != "enforcing" |