- name: Remove access_log and error_log entries from host configs
  lineinfile:
    regexp: '\b(access|error)_log\b'
    state: absent
    backup: yes
  with_fileglob:
    - "/etc/nginx/conf.d/*.conf"

- name: Remove access_log and error_log entries from host configs
  lineinfile:
    regexp: '\b(access|error)_log\b'
    state: absent
    backup: yes
    path: "{{ item }}"
    validate: nginx -s reload
  with_fileglob:
    - "/etc/nginx/conf.d/*.conf"


Set path parameter for lineinfile entry in the upgrade role
Set path parameter for lineinfile entry in the upgrade role
