aboutsummaryrefslogtreecommitdiff
path: root/roles/sudo/tasks/2
blob: 5dd7b7f70237ff44a941773b7e2b412ea933ee3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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