Remove requiretty for sudo on centos hosts.
In order to be able to use become: yes to execute command with ansible the requiretty option needs to be disabled on centos. Change-Id: Ifbba7153cf7d3d97daf86106c1f027787d76e865
This commit is contained in:
parent
94afa972a0
commit
738e88dcfd
@ -25,3 +25,13 @@
|
||||
tags:
|
||||
- openstack-yum-packages
|
||||
- openstack-packages
|
||||
|
||||
- name: Disable requiretty for root sudo on centos
|
||||
template:
|
||||
dest: /etc/sudoers.d/openstack-ansible
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0440"
|
||||
src: sudoers.j2
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
|
2
templates/sudoers.j2
Normal file
2
templates/sudoers.j2
Normal file
@ -0,0 +1,2 @@
|
||||
# {{ ansible_managed }}
|
||||
Defaults:root !requiretty
|
Loading…
Reference in New Issue
Block a user