diff options
author | Georg Pfuetzenreuter | 2022-02-14 00:32:26 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2022-02-14 00:32:26 +0100 |
commit | 7e55910b27e877574e518fa1febc32405b129171 (patch) | |
tree | f23bb27b9cd7f0591ae7fc9dfc98bc1ac29fc0b0 /ansible/deployment_poc/tasks/autoyast_assistant.yml | |
parent | 2ce8450b893ad9f8a119a1ff24dcc7eb4ba78b82 (diff) | |
download | system-7e55910b27e877574e518fa1febc32405b129171.tar.gz system-7e55910b27e877574e518fa1febc32405b129171.tar.bz2 system-7e55910b27e877574e518fa1febc32405b129171.zip |
Deployment PoC - Add pexpect supervision
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
Diffstat (limited to 'ansible/deployment_poc/tasks/autoyast_assistant.yml')
-rw-r--r-- | ansible/deployment_poc/tasks/autoyast_assistant.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ansible/deployment_poc/tasks/autoyast_assistant.yml b/ansible/deployment_poc/tasks/autoyast_assistant.yml new file mode 100644 index 0000000..7a7542a --- /dev/null +++ b/ansible/deployment_poc/tasks/autoyast_assistant.yml @@ -0,0 +1,38 @@ +--- +- name: Monitor OS installation + block: + - name: Monitor first stage + ansible.builtin.expect: + command: "/usr/bin/virsh -c {{ libvirt_url }} console {{ vm_name }} --force" + responses: + "reboot: Restarting system": + - "\u001d" + timeout: 720 + ignore_errors: true + no_log: true + + - name: Destroy + community.libvirt.virt: + uri: "{{ libvirt_url }}" + command: destroy + name: "{{ vm_name }}" + state: destroyed + + - name: Start + community.libvirt.virt: + uri: "{{ libvirt_url }}" + command: start + name: "{{ vm_name }}" + state: running + + - name: Unlock + ansible.builtin.expect: + command: "/usr/bin/virsh -c {{ libvirt_url }} console {{ vm_name }} --force" + responses: + "Please enter passphrase for disk cr_root:": + - "{{ luks_passphrase }}" + - "\u001d" + ignore_errors: yes + no_log: true + + delegate_to: localhost |