-
Notifications
You must be signed in to change notification settings - Fork 0
/
sterziev_move_sudo.yml
37 lines (33 loc) · 1.03 KB
/
sterziev_move_sudo.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
- hosts: all
strategy: free
remote_user: roothp
become: yes
become_method: sudo
serial: 100
gather_facts: yes
tasks:
- name: Copy the sudo file performing a check for RHEL 6
copy:
src: "/home/ansible/ansible/UAM/sudoers/sudoers_files/{{ app_name }}_RHEL6"
remote_src: no
dest: /etc/sudoers.d/{{ app_name }}
owner: root
group: root
mode: 0440
validate: '/usr/sbin/visudo -cf %s'
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version == "6"
- name: Copy the sudo file performing a check for RHEL 7
copy:
src: "/home/ansible/ansible/UAM/sudoers/sudoers_files/{{ app_name }}_RHEL7"
remote_src: no
dest: /etc/sudoers.d/{{ app_name }}
owner: root
group: root
mode: 0440
validate: '/usr/sbin/visudo -cf %s'
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version == "7"
- ansible_distribution_major_version == "8"