Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Refactor the ansible roles #91

Closed
kpouget opened this issue Mar 17, 2021 · 3 comments
Closed

Refactor the ansible roles #91

kpouget opened this issue Mar 17, 2021 · 3 comments

Comments

@kpouget
Copy link
Collaborator

kpouget commented Mar 17, 2021

We are currently using some roles (eg nv_gpu) to perform many different tasks, depending on the flags we activate:

  - name: Install NFD-operator from OperatorHub
    include_tasks: roles/nv_gpu/tasks/install_nfd.yml
    when: install_nfd_operator_from_hub == "yes"

  - name: Wait for NFD-labeled GPU nodes to appear
    include_tasks: roles/nv_gpu/tasks/test_nfd_gpu.yml
    when: nfd_test_gpu_nodes == "yes"

  - name: Install GPU-operator from OperatorHub
    include_tasks: roles/nv_gpu/tasks/install_nv.yml
    when: install_gpu_operator_from_hub == "yes"

I don't think this is the way ansible roles are supposed to be used, as it causes many tasks to be shown as "skipped", but still visible in the logs.

This ticket will track the refactoring of these big roles into smaller chunks, doing only one task (=one role per toolbox script, more or less).

@kpouget
Copy link
Collaborator Author

kpouget commented Mar 17, 2021

My main interrogation is related to the variables that we define for each role, and how they will be distributed into the smaller roles, eg when using the same files (with a constant defining its path) between the install and uninstall meta-tasks ...

@kpouget
Copy link
Collaborator Author

kpouget commented Mar 26, 2021

will be fixed by #100 #98 #97 #96

@kpouget
Copy link
Collaborator Author

kpouget commented Apr 7, 2021

Closing as #100 #98 #97 #96 are merged.

@kpouget kpouget closed this as completed Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant