---

- name: check if main.cf is default
  shell: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -'
  changed_when: False
  check_mode: no
  register: default_main_cf
  tags:
    - postfix

- name: add lines in /etc/.gitignore
  lineinfile:
    dest: /etc/.gitignore
    line: '{{ item }}'
    state: present
    create: no
  loop:
    - "postfix/sa-blacklist.access"
    - "postfix/*.db"
  tags:
    - postfix
    - etc-git
