aboutsummaryrefslogtreecommitdiff
path: root/roles/sudo/tasks/2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sudo/tasks/2')
-rw-r--r--roles/sudo/tasks/225
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/sudo/tasks/2 b/roles/sudo/tasks/2
new file mode 100644
index 0000000..5dd7b7f
--- /dev/null
+++ b/roles/sudo/tasks/2
@@ -0,0 +1,25 @@
+---
+- name: sudo get vars
+ include_vars: default.yml
+
+- name: sudo get OS vars
+ include_vars: '{{ item }}'
+ with_first_found:
+ - '{{ ansible_distribution }}.yml'
+ - default.yml
+
+- debug: msg="{{ item | regex_replace('^.*\/','') }}"
+ with_items:
+ - '{{ sudo_files }}'
+
+- name: sudo deploy rules from files
+ template:
+ src: "roles/sudo/files/{{ item.file }}"
+ dest: "{{ sudo_rules_dir }}/{{ item.file | regex_replace('^.*\/','a') }}"
+ mode: 0440
+ owner: '{{ sudo_root_user }}'
+ group: '{{ sudo_root_group }}'
+ with_items:
+ - '{{ sudo_files }}'
+ when:
+ - sudo_files is defined
bgstack15