|
@@ -3,5 +3,93 @@
|
|
|
# - PXE config
|
|
|
# - install-config.yaml
|
|
|
# - network customization
|
|
|
-- name:
|
|
|
+#
|
|
|
+# REQUIRES:
|
|
|
+# - variable "node" according to vms structure
|
|
|
+#
|
|
|
+# Publish PXE config stuff
|
|
|
+- name: Deploy PXE config file
|
|
|
+ template:
|
|
|
+ src: templates/pxe-sno.j2
|
|
|
+ dest: /var/lib/tftpboot/pxelinux.cfg/{{ node.cluster }}-{{ node.name }}
|
|
|
+
|
|
|
+- name: Create symbolic link to PXE boot entry
|
|
|
+ file:
|
|
|
+ path: /var/lib/tftpboot/pxelinux.cfg/{{ node.mac }}
|
|
|
+ src: "{{ node.cluster }}-{{ node.name }}"
|
|
|
+ state: link
|
|
|
+
|
|
|
+# Create the OCP installation directory and populate it
|
|
|
+- name: Make sure workdir exists
|
|
|
+ become: no
|
|
|
+ file:
|
|
|
+ path: /home/lab/{{ node.cluster }}
|
|
|
+ state: directory
|
|
|
+ mode: 0755
|
|
|
+ owner: lab
|
|
|
+ group: lab
|
|
|
+
|
|
|
+- name: Place the install config to workdir
|
|
|
+ become: no
|
|
|
+ template:
|
|
|
+ src: templates/install-config-sno.yaml.j2
|
|
|
+ dest: /home/lab/{{ node.cluster }}/install-config.yaml
|
|
|
+ mode: 0644
|
|
|
+ owner: lab
|
|
|
+ group: lab
|
|
|
+
|
|
|
+- name: Create a backup copy of install config
|
|
|
+ become: no
|
|
|
+ copy:
|
|
|
+ src: /home/lab/{{ node.cluster }}/install-config.yaml
|
|
|
+ dest: /home/lab/install-config-{{ node.cluster }}.yaml
|
|
|
+ remote_src: yes
|
|
|
+ mode: 0644
|
|
|
+ owner: lab
|
|
|
+ group: lab
|
|
|
+
|
|
|
+- name: Create installation manifests
|
|
|
+ become: no
|
|
|
+ shell: openshift-install create manifests
|
|
|
+ args:
|
|
|
+ chdir: /home/lab/{{ node.cluster }}
|
|
|
+
|
|
|
+- name: Deploy the network config customization
|
|
|
+ become: no
|
|
|
+ template:
|
|
|
+ src: templates/netcfg.bu.j2
|
|
|
+ dest: /home/lab/netcfg.bu
|
|
|
+ mode: 0644
|
|
|
+ owner: lab
|
|
|
+ group: lab
|
|
|
+
|
|
|
+- name: Process network config with butane
|
|
|
+ become: no
|
|
|
+ shell: butane netcfg.bu -o {{ node.cluster }}/openshift/01-master-network.yaml
|
|
|
+ args:
|
|
|
+ chdir: /home/lab
|
|
|
+
|
|
|
+- name: Create the ignition file
|
|
|
+ become: no
|
|
|
+ shell: openshift-install create single-node-ignition-config
|
|
|
+ args:
|
|
|
+ chdir: /home/lab/{{ node.cluster }}
|
|
|
+
|
|
|
+- name: Make sure the publish directory is there
|
|
|
+ file:
|
|
|
+ path: "{{ ignitions_directory }}/{{ cluster_name }}"
|
|
|
+ state: directory
|
|
|
+ mode: 0755
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+
|
|
|
+#- name: Publish ignition configs
|
|
|
+# copy:
|
|
|
+# src: /home/lab/{{ node.cluster }}/{{ node.name }}.ign
|
|
|
+# dest: "{{ ignitions_directory }}/{{ cluster_name }}/{{ role }}.ign"
|
|
|
+# remote_src: yes
|
|
|
+# mode: 0644
|
|
|
+# owner: root
|
|
|
+# group: root
|
|
|
+
|
|
|
...
|