1

How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer? lists some ways to achieve this (GUI, script, puppet config).

But I am at loss how to handle echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true in Ansible.

Simply running this command on every run of Ansible playbook seems substandard.

2 Answers 2

3

Got this problem on Ubuntu 20.04 with Ansible 2.11 when trying to install ubuntu-restricted-extras meta package that includes ttf-mscorefonts-installer.

With @bstabens answer and comment, I figured out how to accept msttcorefonts license agreement.

On an already installed machine, I checked which question I add to agree during msttcorefonts install

debconf-show ttf-mscorefonts-installer command gave me this output

* msttcorefonts/accepted-mscorefonts-eula: true
  msttcorefonts/dldir:
  msttcorefonts/baddldir:
  msttcorefonts/error-mscorefonts-eula:
* msttcorefonts/present-mscorefonts-eula:
  msttcorefonts/dlurl:

Saying that I've answered true to msttcorefonts/accepted-mscorefonts-eula question.

I then wrote my playbook like this :

---
- hosts : dev
  tasks:
    - name: prepare eula 
      debconf:
        name: ttf-mscorefonts-installer
        question: msttcorefonts/accepted-mscorefonts-eula
        vtype: boolean
        value: true

    - name: Install a list of packages
      apt:
        update_cache: yes
        state: latest
        pkg:
        - ubuntu-restricted-extras
        - ... OTHER PACKAGES HERE

  become : yes
  become_method : sudo

Invoked it with ansible-playbook my_playbook.yaml --ask-become-pass and it worked like a charm.

0

With ansible:

- name: prepare eula 
  debconf:
    name: ttf-mscorefonts-installer
    question: msttcorefonts/accepted-mscorefonts-eula
    value: true

These things get configured with debconf, and you can see all options with

debconf-show package

Of course, then you'll have to install it at least once manually. Please note, debconf does not install the package, it simply prepares debconf for it.

2
  • "Of course, then you'll have to install it at least once manually." then how it is solving fact that I want to do it with Ansible? Feb 24, 2021 at 11:43
  • It solves it for every following installation. Besides, you're free to just google in advance what debconf questions that given package wants to have set so you don't have to install it.
    – bstabens
    Feb 24, 2021 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.