48 lines
1.1 KiB
YAML
Raw Normal View History

2022-10-10 16:05:48 +02: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 02:18:54 +01:00
loop_control:
label: "{{ item.line }}"
2022-10-10 16:05:48 +02:00
2021-06-08 21:27:08 +02:00
- name: Install additional packages
ansible.builtin.apt:
2022-08-03 13:53:54 +02:00
pkg: "{{ packages.apt }}"
2021-06-08 21:27:08 +02:00
state: latest
update_cache: yes
install_recommends: no
2022-06-25 08:49:53 +02:00
2021-06-08 21:56:06 +02:00
- name: Upgrade all packages
ansible.builtin.apt:
name: '*'
2021-06-08 21:56:06 +02:00
state: latest
update_cache: yes
2022-06-25 08:49:53 +02:00
2022-08-03 13:53:54 +02:00
- name: Install additional python packages
ansible.builtin.pip:
2022-08-03 14:39:36 +02:00
name: "{{ item }}"
executable: pip3
2022-08-03 13:53:54 +02:00
state: latest
2022-08-03 14:39:36 +02:00
loop: "{{ packages.pip }}"
2022-08-03 13:53:54 +02:00
2022-11-29 14:32:44 +01: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 21:56:06 +02:00
- name: Cleanup
ansible.builtin.apt:
autoremove: yes
2021-06-11 14:44:43 +02:00
purge: yes