+- name: Check backports
+ shell: "grep -Fc backports /etc/apt/sources.list || :"
+ register: apt_configured
+ changed_when: apt_configured.stdout == "0"
+
+- debug:
+ msg: "apt has already been configured"
+ when: apt_configured.stdout != "0"
+
- name: Configure apt
become: true
template:
owner: root
group: root
mode: '0640'
- force: no
+ when: apt_configured.stdout == "0"
- name: Install minimal software packages
become: true
autoclean: yes
autoremove: yes
install_recommends: no
- name: ['apt', 'aptitude', 'deborphan', 'dselect',
- 'bash', 'bash-completion',
- 'curl', 'mc', 'rsync', 'vim', 'wget',
- 'arj', 'bzip2', 'lzip', 'lzma', 'lzop', 'p7zip',
- 'unzip', 'zip', 'xz-utils',
- 'gnupg', 'gnupg2',
- 'adjtimex', 'logcheck',
- 'bsd-mailx', 'mutt', 'procmail',
- 'python', 'python2.7', 'python3',
+ name: ['adjtimex', 'apt', 'aptitude', 'arj',
+ 'bash', 'bash-completion', 'bsd-mailx', 'bzip2',
+ 'curl', 'deborphan', 'dnsutils', 'dselect', 'elinks',
+ 'gnupg', 'gnupg2', 'links2',
+ 'logcheck', 'lzip', 'lzma', 'lzop', 'mc', 'mutt',
+ 'p7zip', 'procmail', 'python', 'python2.7', 'python3',
+ 'rsync', 'unzip', 'vim', 'wget', 'xz-utils', 'zip',
]
purge: yes
state: latest