`system-reinstall-bootc` needs `-y` and `--user` non-interactive installation
There should be an automatic way to do installation and for automation test.
-yis more likednf -y--useris for user key injection
Agreed in general, though for the use case of automated testing I think one of the tools listed from e.g. https://en.wikipedia.org/wiki/Expect would work too.
I tried expect, it does not work in our case... e.g. https://github.com/bootc-dev/bootc/issues/1206.
This's what I did:
diff --git i/playbooks/install.yaml w/playbooks/install.yaml
index 112673b..7eff66a 100644
--- i/playbooks/install.yaml
+++ w/playbooks/install.yaml
@@ -94,17 +94,22 @@
- bootc_version is version('1.1.3', '<')
- name: Single command deploys bootc image
- command:
- "podman run \
- --rm \
- --tls-verify=false \
- --privileged \
- --pid=host \
- {{ test_image_url }} \
- bootc install to-existing-root"
+ expect:
+ command: "system-reinstall-bootc {{ test_image_url }}"
+ responses:
+ "into the root user on the new bootc system":
+ - "Y"
+ - "Y"
+ - "Y"
+ "import into the root user of the new bootc system:":
+ - " "
+ "THIS WILL REINSTALL YOUR SYSTEM! Are you sure you want to continue":
+ - "y"
+ - "Y"
+ - "Y"
become: true
when:
- - bootc_version is version('1.1.3', '>=')
+ - bootc_version is version('1.1.6', '>=')
Oh right cool, Ansible has an expect module too.
But is it working?
expect module works, but system-reinstall-bootc interactive installation "issue"(not exactly an issue) like https://github.com/bootc-dev/bootc/issues/1206 blocked expect.