| 123456789101112131415161718192021222324252627282930 |
- # - name: Copy containerd config
- # template:
- # src: containerd_config.toml.j2
- # dest: /etc/yunion/containerd/config.toml
- # mode: '0644'
- # become: true
- - name: Configure containerd runtime for NVIDIA
- shell: |
- nvidia-ctk runtime configure --runtime=containerd --set-as-default --config /etc/yunion/containerd/config.toml
- become: true
- args:
- executable: /bin/bash
- register: runtime_config_result
- - debug: var=runtime_config_result.stdout_lines
- - name: Set default_runtime_name to nvidia in yunion-containerd config
- replace:
- path: /etc/yunion/containerd/config.toml
- regexp: '(default_runtime_name\s*=\s*)"[^"]*"'
- replace: '\1"nvidia"'
- become: true
- - name: Restart yunion-containerd service
- systemd:
- name: yunion-containerd.service
- state: restarted
- enabled: true
- become: true
|