-1

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.

U880D
  • 8,601
  • 6
  • 24
  • 40
Kakuye
  • 15
  • 4
  • 1
    Hi Kakuye welcome to SO. This site is no a consultancy, it is to help you solve your own problems. Your question does not show any effort, which is why your question is at risk of closure. Having said that, are you sure [`debconf:`](https://docs.ansible.com/ansible/7/collections/ansible/builtin/debconf_module.html#examples) isn't what you're after? – mdaniel Jan 18 '23 at 05:15

1 Answers1

0

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

U880D
  • 8,601
  • 6
  • 24
  • 40