diff options
| author | spmfox <spmfox@foxwd.com> | 2024-05-30 10:24:59 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2024-05-30 10:24:59 -0400 |
| commit | b162149f00a03d79b6d6b24cdda95a6635828928 (patch) | |
| tree | 4b32ab2cf989d4bbf63f1e1175fe2c2996c66138 | |
| parent | e361767e854fd9b710ef0a8ba84b1a72b0ff0905 (diff) | |
removing un-needed 2nd build and deployment
| -rw-r--r-- | deploy.yml | 21 | ||||
| -rw-r--r-- | templates/bootcblade-deploy.sh.j2 | 4 | ||||
| -rw-r--r-- | templates/bootcblade-rebuild.service.j2 | 3 |
3 files changed, 11 insertions, 17 deletions
@@ -43,13 +43,6 @@ - name: Wait for connectivity after deployment ansible.builtin.wait_for_connection: - - name: Create /root/bootcblade.containerfile - ansible.builtin.template: - src: "bootcblade.containerfile.j2" - dest: "/root/bootcblade.containerfile" - loop: - - bootcblade.containerfile - - name: Create user ansible.builtin.user: name: "{{ create_user }}" @@ -74,11 +67,12 @@ state: present when: (create_user is defined) and (create_user_ssh_pub is defined) - - name: Build BootcBlade container image - ansible.builtin.shell: "podman build -t localhost/bootcblade -f /root/bootcblade.containerfile" - - - name: Invoke bootc-switch to switch from registry to local container storage - ansible.builtin.shell: "bootc switch --transport containers-storage localhost/bootcblade:latest" + - name: Create /root/bootcblade.containerfile + ansible.builtin.template: + src: "bootcblade.containerfile.j2" + dest: "/root/bootcblade.containerfile" + loop: + - bootcblade.containerfile - name: Add bootcblade-rebuild.service and .timer files for automatic update ansible.builtin.template: @@ -108,9 +102,6 @@ loop: - "bootc-fetch-apply-updates.timer" - "bootc-fetch-apply-updates.service" - - - name: Reboot into final BootcBlade environment - ansible.builtin.reboot: vars: ansible_user: "root" tags: configure diff --git a/templates/bootcblade-deploy.sh.j2 b/templates/bootcblade-deploy.sh.j2 index ecd91e3..9f4699f 100644 --- a/templates/bootcblade-deploy.sh.j2 +++ b/templates/bootcblade-deploy.sh.j2 @@ -6,4 +6,6 @@ podman run --rm --privileged \ --volume /:/target \ --entrypoint bootc \ localhost/bootcblade:latest \ - install to-filesystem --skip-fetch-check --replace=alongside /target --root-ssh-authorized-keys /target/root/.ssh/authorized_keys {{ '' if bootc_acknowledge is false else '--acknowledge-destructive' }} + install to-filesystem --skip-fetch-check --replace=alongside /target \ + --root-ssh-authorized-keys /target/root/.ssh/authorized_keys \ + --target-transport=containers-storage {{ '' if bootc_acknowledge is false else '--acknowledge-destructive' }} diff --git a/templates/bootcblade-rebuild.service.j2 b/templates/bootcblade-rebuild.service.j2 index 17aa89a..10e52ed 100644 --- a/templates/bootcblade-rebuild.service.j2 +++ b/templates/bootcblade-rebuild.service.j2 @@ -2,5 +2,6 @@ Description=BootcBlade rebuild service [Service] -ExecStart=/usr/bin/podman build -t localhost/bootcblade -f /root/bootcblade.containerfile --no-cache --pull=always +Type=oneshot +ExecStart=/usr/bin/bash -c "podman build -t localhost/bootcblade -f /root/bootcblade.containerfile --no-cache --pull=always" ExecStartPost=/usr/bin/bash -c "/usr/bin/sleep 10 ; /usr/bin/bootc update && /usr/bin/podman image prune -f" |
