Is there a way to fix this "debconf-show" path issue?

287 views Asked by At

I am trying to set a root password for a MYSQL DB using ansible. Iam using debconf however, it errors me out saying:

Failed to find required executable debconf-show in paths: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin

My yaml file contains:

- name: set root password
  become: yes
  debconf:
    name: 'mysql-server'
    question: 'mysql-server/root_password'
    value: '{{mysql_password}}'
    vtype: 'password'

I am using centos7. Does anyone have an idea?

1

There are 1 answers

0
Ryan On BEST ANSWER

It looks like you are missing some host requirements that the debconf Ansible module requires.

Did you try adding them?

- name: Install debconf requirements
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - debconf
    - debconf-utils