diff --git a/tasks/openstack_host_install_yum.yml b/tasks/openstack_host_install_yum.yml index a399a005..a3185272 100644 --- a/tasks/openstack_host_install_yum.yml +++ b/tasks/openstack_host_install_yum.yml @@ -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' diff --git a/templates/sudoers.j2 b/templates/sudoers.j2 new file mode 100644 index 00000000..a3ea93d1 --- /dev/null +++ b/templates/sudoers.j2 @@ -0,0 +1,2 @@ +# {{ ansible_managed }} +Defaults:root !requiretty