Add a simple sudo task.
This commit is contained in:
parent
7b0e2d913a
commit
ea7d9bd3ef
2 changed files with 25 additions and 0 deletions
|
@ -17,3 +17,5 @@
|
|||
- include: $tasks/hosts.yml
|
||||
# This task includes our common scripts
|
||||
- include: $tasks/common_scripts.yml
|
||||
# This task includes our sudo config
|
||||
- include: $tasks/sudo.yml
|
||||
|
|
23
tasks/sudo.yml
Normal file
23
tasks/sudo.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
#
|
||||
# This task sets up /etc/sudoers.d/fedora on a machine.
|
||||
#
|
||||
|
||||
#
|
||||
# Put in place the default sysadmin-main sudoers file.
|
||||
#
|
||||
- name: setup /etc/sudoers.d/sysadmin-main-sudoers
|
||||
action: copy src=$private/files/sudo/sysadmin-main-sudoers dest=/etc/sudoers.d/ owner=root group=root mode=0600
|
||||
tags:
|
||||
- config
|
||||
#
|
||||
# This will move a /etc/sudoers.d/ file in place
|
||||
#
|
||||
- name: setup /etc/sudoers.d/fedora for client use
|
||||
action: copy src=$item dest=/etc/sudoers.d/ owner=root group=root mode=0600
|
||||
with_first_found:
|
||||
- $private/files/sudo/${ansible_fqdn}-sudoers
|
||||
- $private/files/sudo/${ansible_hostname}-sudoers
|
||||
- $private/files/sudo/${ansible_domain}-sudoers
|
||||
tags:
|
||||
- config
|
Loading…
Add table
Add a link
Reference in a new issue