Remove requiretty for sudo on centos base image.
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: Iab2408267fdcb1c19c3c560d2f86181a6fc180e0
This commit is contained in:
parent
de6d37f2d3
commit
cf65c6736b
@ -106,3 +106,13 @@
|
|||||||
tags:
|
tags:
|
||||||
- lxc-cache
|
- lxc-cache
|
||||||
- lxc-cache-apt-keys
|
- lxc-cache-apt-keys
|
||||||
|
|
||||||
|
- name: Remove requiretty for sudo on centoos
|
||||||
|
template:
|
||||||
|
dest: "/var/lib/lxc/LXC_NAME/rootfs/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…
x
Reference in New Issue
Block a user