123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- ---
- # 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/{{ node.cluster }}/auth/{{ item }}
- dest: /home/lab/{{ item }}-{{ node.cluster }}
- remote_src: yes
- owner: lab
- group: lab
- mode: 0644
- loop:
- - kubeadmin-password
- - kubeconfig
- ...
|