ansiblecentos7eulamsodbcsql17

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


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


Solution

  • 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