# SPDX-License-Identifier: MIT
---
# Find two words in ansible_managed and grep for them in the config file
- name: Grep the ansible_managed header in {{ __mssql_conf_path }}
  vars:
    __mssql_conf_path: /var/opt/mssql/mssql.conf
  command: >-
    grep
    {{ lookup('template', 'get_ansible_managed.j2') |
    regex_search('(\b\w+\s){2}') | quote }}
    {{ __mssql_conf_path }}
  changed_when: false
