---

# T226677 - fix apt configuration on all systems in April 2022

# This file is a duplicate of roles/base_install/templates/etc/apt/apt.conf.d/90perfact-custom
# Used only for playbook: playbooks/T226677_playbook_aptconf.yml

  - name: update 90perfact-custom
    template:
      src: 90perfact-custom
      dest: /etc/apt/apt.conf.d/90perfact-custom
    when: (not no_sshd | default(false)) and ( ansible_facts['distribution'] == "Ubuntu" and ( ansible_facts['distribution_major_version']|int >= 16 ))

  - name: Commit changes made by Ansible to git
    shell: git diff --quiet || { git add /etc/apt/apt.conf.d/90perfact-custom && git commit -m "T226677 adjust unattended upgrades [Changes made by ansible]" ; }
    args:
      chdir: /etc/
    when: (not no_sshd | default(false)) and ( ansible_facts['distribution'] == "Ubuntu" and ( ansible_facts['distribution_major_version']|int >= 16 ))
