Ver código fonte

do not include 50-install-prepare from 60-agent-installation, rename some playbooks, add agent-ipi stub

Grega Bremec 1 mês atrás
pai
commit
8f21fb31dd

+ 0 - 0
playbooks/52-coreos-installer.yml → playbooks/55-coreos-installer.yml


+ 1 - 7
playbooks/62-agent-installation.yml → playbooks/60-agent-installation.yml

@@ -1,15 +1,9 @@
 ---
 # Configure the agent installation artifacts for SNO.
-# Mostly the same as 52-coreos-installer.yml, but some changes.
+# Mostly the same as 55-coreos-installer.yml, but some changes.
 # 
 # NOTE: If you want to skip the dangerous parts, use --skip-tags=destroy
 #
-# Perform the preparation tasks for agent-based installation.
-# Basically the same as 50-coreos-inst-prep.yml plus a couple of steps.
-#
-# TODO: somehow skip the reset of the DNS zones and DHCP config.
-- import_playbook: 50-install-prepare.yml
-
 - name: Prepare the files required for a SNO installation using agent install.
   hosts: workstation.lab.example.com
   become: no

+ 46 - 0
playbooks/65-agent-ipi-multinode.yml

@@ -0,0 +1,46 @@
+---
+# Configure the agent installation artifacts for multi-node PXE installation.
+- name: Prepare the files required for a multi-node installation using agent install.
+  hosts: workstation.lab.example.com
+  become: no
+  gather_subset: min
+  tasks:
+    # NOTE: This one is actually a prep item, but it's only needed for agent installs.
+    - name: Ensure nmstate is installed.
+      become: yes
+      ansible.builtin.yum:
+        name: nmstate
+        state: present
+
+    - name: Check the dependency status.
+      ansible.builtin.stat:
+        path: "{{ ansible_facts['user_dir'] }}/{{ item }}"
+        get_attributes: no
+        get_checksum: no
+        get_mime: no
+      register: dependencies
+      loop:
+        - install-pull-secret
+        - .ssh/openshift.pub
+        - ca/ca-cert.pem
+        - mirror/working-dir/cluster-resources/idms-oc-mirror.yaml
+        - Downloads/rhcos-418.94.202501221327-0-live.x86_64.iso
+
+    - ansible.builtin.assert:
+        that:
+          - dependencies.results[0].stat.exists
+          - dependencies.results[1].stat.exists
+          - dependencies.results[2].stat.exists
+          - dependencies.results[3].stat.exists
+          - dependencies.results[4].stat.exists
+        fail_msg: |
+          ERROR: Either pull secret, SSH keypair, CA certificate, RHCOS ISO, or mirror artifacts are missing.
+          Ensure all the relevant preceding tasks have been completed:
+            - Quay prerequisites,
+            - Quay deployment,
+            - oc-mirror prerequisites,
+            - oc-mirror execution,
+            - coreos-installer prerequisites
+          Exiting.
+        success_msg: "OK, dependencies exist."
+...

+ 3 - 3
playbooks/site.yml

@@ -24,7 +24,7 @@
 - import_playbook: 45-oc-mirror.yml
 
 - import_playbook: 50-install-prepare.yml
-- import_playbook: 52-coreos-installer.yml
-- import_playbook: 60-agent-inst-prep.yml
-- import_playbook: 62-agent-installation.yml
+- import_playbook: 55-coreos-installer.yml
+- import_playbook: 60-agent-installation.yml
+- import_playbook: 65-agent-ipi-multinode.yml
 ...