How do I automatically accept EULA for MS ODBC for unix with Ansible?

1.9k Views Asked by At

I have a playbook that updates our Linux servers. One server (Centos 7) in this case, requires acceptance of the EULA for the MS odbc driver. I have seen how to do this on an install, but have not been able to make it work with update.

 tasks:
    - name: update OS
      dnf:
    name: '*'
        state: latest

I have tried adding an environment variable with no success. Any suggestions? Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

According Install the Microsoft ODBC driver for SQL Server (Linux) and the tag centos7.

tasks:

  - name: Update OS
    environment:
      ACCEPT_EULA: "Y"
    yum:
      name: '*'
      state: latest