Ansible with dpkg-reconfigure command

521 Views Asked by At

How to write Ansible YAML for tasks done using dpkg-reconfigure command that ask question during the process?

Example

sudo dpkg-reconfigure slapd

I was trying to write an Ansible playbook to automate reconfiguring slapd with default values.

1

There are 1 best solutions below

0
On BEST ANSWER

Since Ansible is mainly a Configuration Management Tool with which one declared a Desired State, a Version Control System should be used in general, a non-interactive approach should be the main goal and any interaction should be prevented.

To do so, the within the comments mentioned debconf module – Configure a .deb package could come in place and which can then be used like in How do I make Ansible actually compile a config file having changed my debconf settings for an application?.

Further Similar Q&A