0

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

Kevin Nelson
  • 185
  • 3
  • 11
  • 3
    In what way did you try to add an environment variable? What variable, what value? In what way didn't it work, did you see any change? Please add more detail. – Calum Halpin Nov 10 '21 at 16:30
  • 2
    I added an environment block with ACCEPT_EULA: 'y' to the task. It did not fail, but it did not work either – Kevin Nelson Nov 10 '21 at 18:24
  • 2
    @KevinNelson: please don't add this info in a comment, edit your question. – Zeitounator Nov 10 '21 at 18:30

1 Answers1

3

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
U880D
  • 8,601
  • 6
  • 24
  • 40