Search code examples
ansiblepasswordsmattermostdebconf

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


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?


Solution

  • 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