2022-10-10 14:05:48 +00:00
|
|
|
- name: Configure 'needrestart' package
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/needrestart/needrestart.conf
|
|
|
|
regexp: "{{ item.regexp }}"
|
|
|
|
line: "{{ item.line }}"
|
|
|
|
loop:
|
|
|
|
- regexp: "^#\\$nrconf\\{restart\\} = 'i';"
|
|
|
|
line: "$nrconf{restart} = 'a';"
|
|
|
|
- regexp: "^#\\$nrconf\\{kernelhints\\} = -1;"
|
|
|
|
line: "$nrconf{kernelhints} = -1;"
|
2022-11-07 01:18:54 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.line }}"
|
2022-10-10 14:05:48 +00:00
|
|
|
|
2021-06-08 19:27:08 +00:00
|
|
|
- name: Install additional packages
|
|
|
|
ansible.builtin.apt:
|
2022-08-03 11:53:54 +00:00
|
|
|
pkg: "{{ packages.apt }}"
|
2021-06-08 19:27:08 +00:00
|
|
|
state: latest
|
|
|
|
update_cache: yes
|
2022-06-25 16:44:43 +00:00
|
|
|
install_recommends: no
|
2022-06-25 06:49:53 +00:00
|
|
|
|
2021-06-08 19:56:06 +00:00
|
|
|
- name: Upgrade all packages
|
|
|
|
ansible.builtin.apt:
|
2022-06-25 16:44:43 +00:00
|
|
|
name: '*'
|
2021-06-08 19:56:06 +00:00
|
|
|
state: latest
|
|
|
|
update_cache: yes
|
2022-06-25 06:49:53 +00:00
|
|
|
|
2022-08-03 11:53:54 +00:00
|
|
|
- name: Install additional python packages
|
|
|
|
ansible.builtin.pip:
|
2022-08-03 12:39:36 +00:00
|
|
|
name: "{{ item }}"
|
|
|
|
executable: pip3
|
2022-08-03 11:53:54 +00:00
|
|
|
state: latest
|
2022-08-03 12:39:36 +00:00
|
|
|
loop: "{{ packages.pip }}"
|
2022-08-03 11:53:54 +00:00
|
|
|
|
2022-11-29 13:32:44 +00:00
|
|
|
- name: Create folder
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/ansible
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Configure Ansible defaults
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: ansible.j2
|
|
|
|
dest: /etc/ansible/ansible.cfg
|
|
|
|
|
2021-06-08 19:56:06 +00:00
|
|
|
- name: Cleanup
|
|
|
|
ansible.builtin.apt:
|
|
|
|
autoremove: yes
|
2021-06-11 12:44:43 +00:00
|
|
|
purge: yes
|