summaryrefslogtreecommitdiffstats
path: root/roles/openshift_ami_prep
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-07-28 17:31:21 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-08-21 21:25:22 -0400
commit435bbcb4af02ddedaa2ebcbea48b00f2bbf4d164 (patch)
tree5041faeb9b23781c3befaac18dd64e104963a586 /roles/openshift_ami_prep
parent23da41c1fb3736b10e07774000e3a2bca028806e (diff)
downloadopenshift-435bbcb4af02ddedaa2ebcbea48b00f2bbf4d164.tar.gz
openshift-435bbcb4af02ddedaa2ebcbea48b00f2bbf4d164.tar.bz2
openshift-435bbcb4af02ddedaa2ebcbea48b00f2bbf4d164.tar.xz
openshift-435bbcb4af02ddedaa2ebcbea48b00f2bbf4d164.zip
First attempt at provisioning.
Diffstat (limited to 'roles/openshift_ami_prep')
-rw-r--r--roles/openshift_ami_prep/defaults/main.yml50
-rw-r--r--roles/openshift_ami_prep/tasks/main.yml42
-rw-r--r--roles/openshift_ami_prep/tasks/yum_repos.yml14
3 files changed, 106 insertions, 0 deletions
diff --git a/roles/openshift_ami_prep/defaults/main.yml b/roles/openshift_ami_prep/defaults/main.yml
new file mode 100644
index 000000000..2ba6d8eae
--- /dev/null
+++ b/roles/openshift_ami_prep/defaults/main.yml
@@ -0,0 +1,50 @@
+---
+
+
+r_openshift_ami_prep_packages:
+- atomic-openshift-master
+- atomic-openshift-node
+- atomic-openshift-docker-excluder
+- atomic-openshift-sdn-ovs
+- openvswitch
+- docker
+- etcd
+#- pcs
+- haproxy
+- dnsmasq
+- ntp
+- logrotate
+- httpd-tools
+- bind
+- firewalld
+- libselinux-python
+- conntrack-tools
+- openssl
+- cloud-init
+- iproute
+- python-dbus
+- PyYAML
+- yum-utils
+- python2-boto
+- python2-boto3
+- cloud-utils-growpart
+# gluster
+- glusterfs-fuse
+- heketi-client
+# nfs
+- nfs-utils
+- flannel
+- bash-completion
+# cockpit
+- cockpit-ws
+- cockpit-system
+- cockpit-bridge
+- cockpit-docker
+# iscsi
+- iscsi-initiator-utils
+# ceph
+- ceph-common
+# systemcontainer
+# - runc
+# - container-selinux
+# - atomic
diff --git a/roles/openshift_ami_prep/tasks/main.yml b/roles/openshift_ami_prep/tasks/main.yml
new file mode 100644
index 000000000..98f7bc0e2
--- /dev/null
+++ b/roles/openshift_ami_prep/tasks/main.yml
@@ -0,0 +1,42 @@
+---
+- name: install repositories
+ include: yum_repos.yml
+ static: yes
+
+- name: install needed rpm(s)
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items: "{{ r_openshift_ami_prep_packages }}"
+
+- name: create the directory for node
+ file:
+ state: directory
+ path: "/etc/systemd/system/{{ r_openshift_ami_prep_node }}.service.d"
+
+- name: laydown systemd override
+ copy:
+ dest: "/etc/systemd/system/{{ r_openshift_ami_prep_node }}.service.d/override.conf"
+ content: |
+ [Unit]
+ After=cloud-init.service
+
+- name: update the sysconfig to have KUBECONFIG
+ lineinfile:
+ dest: "/etc/sysconfig/{{ r_openshift_ami_prep_node }}"
+ line: "KUBECONFIG=/root/csr_kubeconfig"
+ regexp: "^KUBECONFIG=.*"
+
+- name: update the ExecStart to have bootstrap
+ lineinfile:
+ dest: "/usr/lib/systemd/system/{{ r_openshift_ami_prep_node }}.service"
+ line: "{% raw %}ExecStart=/usr/bin/openshift start node --bootstrap --kubeconfig=${KUBECONFIG} $OPTIONS{% endraw %}"
+ regexp: "^ExecStart=.*"
+
+- name: systemctl enable origin-node
+ systemd:
+ name: "{{ item }}"
+ enabled: no
+ with_items:
+ - "{{ r_openshift_ami_prep_node }}.service"
+ - "{{ r_openshift_ami_prep_master }}.service"
diff --git a/roles/openshift_ami_prep/tasks/yum_repos.yml b/roles/openshift_ami_prep/tasks/yum_repos.yml
new file mode 100644
index 000000000..c48c67ac2
--- /dev/null
+++ b/roles/openshift_ami_prep/tasks/yum_repos.yml
@@ -0,0 +1,14 @@
+---
+- name: Create our install repository
+ yum_repository:
+ description: "{{ item.description | default(omit) }}"
+ name: "{{ item.name }}"
+ baseurl: "{{ item.baseurl }}"
+ gpgkey: "{{ item.gpgkey | default(omit)}}"
+ gpgcheck: "{{ item.gpgcheck | default(1) }}"
+ sslverify: "{{ item.sslverify | default(1) }}"
+ sslclientkey: "{{ item.sslclientkey | default(omit) }}"
+ sslclientcert: "{{ item.sslclientcert | default(omit) }}"
+ file: "{{ item.file }}"
+ enabled: "{{ item.enabled }}"
+ with_items: "{{ r_openshift_ami_prep_yum_repositories }}"