From 1756a07eb6ec7d368ba1e0428691cdef9c0493f8 Mon Sep 17 00:00:00 2001 From: VilleS1 Date: Mon, 18 Nov 2019 16:07:05 +0200 Subject: [PATCH] use systemd module instead off systemctl commands to make ansible galaxy happy v2 --- tasks/cuda_init.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/cuda_init.yml b/tasks/cuda_init.yml index 638f716..be0242f 100644 --- a/tasks/cuda_init.yml +++ b/tasks/cuda_init.yml @@ -51,7 +51,9 @@ # Due to ansible bug 21026, cannot use service module on RHEL 7 - name: enable the nvidia-persistenced systemd service in chroots - command: systemctl enable nvidia-persistenced + systemd: + name: nvidia-persistenced + enabled: yes when: - ansible_connection == 'chroot' - ansible_os_family == 'RedHat'