Skip to content

Commit 88d8cf0

Browse files
authored
Merge pull request #26 from leinardi/issue-15-davinci-license
Fix #15: Can't activate Resolve Studio with license key
2 parents 67e33e6 + 54c4b2e commit 88d8cf0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

roles/davinci_resolve/tasks/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,3 +502,42 @@
502502
ansible.builtin.file:
503503
path: "/opt/{{ package }}/squashfs-root/"
504504
state: absent
505+
506+
- name: Create the 'davinci' group
507+
become: true
508+
ansible.builtin.group:
509+
name: davinci
510+
state: present
511+
512+
- name: Ensure .license directory exists with correct permissions
513+
become: true
514+
ansible.builtin.file:
515+
path: "/opt/{{ package }}/.license"
516+
state: directory
517+
owner: root
518+
group: davinci
519+
mode: "0770"
520+
521+
- name: Check current groups of the user
522+
ansible.builtin.command:
523+
cmd: "id -nG {{ ansible_env.USER }}"
524+
register: current_groups
525+
changed_when: false
526+
527+
- name: Add the current user to the 'davinci' group
528+
become: true
529+
ansible.builtin.user:
530+
name: "{{ ansible_env.USER }}"
531+
groups: davinci
532+
append: true
533+
534+
- name: Re-check groups of the user
535+
ansible.builtin.command:
536+
cmd: "id -nG {{ ansible_env.USER }}"
537+
register: updated_groups
538+
changed_when: false
539+
540+
- name: Notify user to re-login if newly added to the 'davinci' group
541+
ansible.builtin.debug:
542+
msg: "You have been added to the 'davinci' group. Please log out and log back in for the changes to take effect."
543+
when: "'davinci' not in current_groups.stdout.split() and 'davinci' in updated_groups.stdout.split()"

0 commit comments

Comments
 (0)