--- # Deploying: # - PXE config # - install-config.yaml # - network customization # # 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: Publish ignition configs copy: src: /home/lab/{{ node.cluster }}/bootstrap-in-place-for-live-iso.ign dest: "{{ ignitions_directory }}/{{ node.cluster }}-{{ node.name }}.ign" remote_src: yes mode: 0644 owner: root group: root # Create a backup copy of cluster auth files - name: Create a backup copy of cluster auth files become: no copy: src: /home/lab/{{ cluster_name }}/auth/{{ item }} dest: /home/lab/{{ item }}-{{ cluster_name }} remote_src: yes owner: lab group: lab mode: 0644 loop: - kubeadmin-password - kubeconfig ...