-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
8
-
False
-
None
-
False
-
-
-
Sprint 16-MMSDOCS 2024, Sprint 17-MMSDOCS 2024, Sprint 18-MMSDOCS 2024, Sprint 19-MMSDOCS 2024, Sprint 20-MMSDOCS 2024, Sprint 1-MMSDOCS 2025, Sprint 2-MMSDOCS 2025, Sprint 3-MMSDOCS 2025, Sprint 4-MMSDOCS 2025
We have to improve this section - https://docs.redhat.com/en/documentation/migration_toolkit_for_virtualization/2.7/html-single/installing_and_using_the_migration_toolkit_for_virtualization/index#about-api-hooks-in-migration-plans_mtv
Our documentation on this is really quite bad, especially if we want to encourage users to create a hook in the Console. The Console doesn't even have a way to specify a serviceAccount, which appears to be a mandatory field (at least, I couldn't get it to work using the default image and the default SA of forklift-controller).
- name: Main
hosts: localhost
tasks:
- name: Load Plan
include_vars:
file: plan.yml
name: plan
- name: Load Workload
include_vars:
file: workload.yml
name: workload
- name:
getent:
database: passwd
key: "{{ ansible_user_id }}"
split: ':'
- k8s_info:
api_version: v1
kind: Secret
name: privkey
namespace: openshift-mtv
register: ssh_credentials
- debug:
var: ssh_credentials
- name: Ensure SSH directory exists
file:
path: ~/.ssh
state: directory
mode: 0750
environment:
HOME: "{{ ansible_facts.getent_passwd[ansible_user_id][4] }}"
- name: Create SSH key
copy:
dest: ~/.ssh/id_rsa
content: "{{ ssh_credentials.resources[0].data.key | b64decode }}"
mode: 0600
- add_host:
name: "{{ workload.vm.ipaddress }}"
ansible_user: root
groups: vms
- name: Create Test File
copy:
dest: ~/test.txt
content: "Hello World"
mode: 0644
delegate_to: "{{ workload.vm.ipaddress }}"
- is related to
-
MTV-1592 Unable to specify serviceAccount for migration hook from the Console
-
- New
-