File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
roles/davinci_resolve/tasks Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 502
502
ansible.builtin.file :
503
503
path : " /opt/{{ package }}/squashfs-root/"
504
504
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()"
You can’t perform that action at this time.
0 commit comments