This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
pi-ansible/roles/os_config/tasks/base.yml

52 lines
1.1 KiB
YAML
Raw Normal View History

2022-12-22 19:18:27 +00:00
# vim: ft=yaml.ansible
---
2022-12-25 18:20:23 +00:00
- name: Set hostname
2023-03-22 18:31:21 +00:00
ansible.builtin.hostname:
2022-12-25 18:20:23 +00:00
name: "{{ hostname }}"
- name: Set timezone
2023-03-22 18:31:21 +00:00
community.general.timezone:
2022-12-25 18:20:23 +00:00
name: "{{ timezone }}"
2022-12-22 19:18:27 +00:00
- name: Upgrade system packages
2023-03-22 18:31:21 +00:00
ansible.builtin.apt:
2022-12-22 19:18:27 +00:00
update_cache: true
upgrade: full
- name: Install packages via apt
2023-03-22 18:31:21 +00:00
ansible.builtin.apt:
2022-12-22 19:18:27 +00:00
name: "{{ pkgs }}"
state: present
vars:
pkgs:
- apparmor
2022-12-25 18:20:23 +00:00
- curl
- git
2022-12-22 19:18:27 +00:00
- haveged
2022-12-23 15:57:37 +00:00
- needrestart
- python3-pip
2022-12-22 19:18:27 +00:00
- ufw
2022-12-25 18:20:23 +00:00
- unattended-upgrades
2022-12-25 23:26:01 +00:00
- name: Clone apt-update-push
2023-03-22 18:31:21 +00:00
ansible.builtin.git:
2023-01-03 21:30:22 +00:00
dest: /home/{{ ansible_user }}/apt-update-push
2022-12-25 23:26:01 +00:00
repo: https://github.com/samsapti/apt-update-push.git
clone: true
update: true
single_branch: true
depth: 1
become: false
2022-12-31 14:53:24 +00:00
notify: apt-update-push
- name: Clone pi-fan-controller
2023-03-22 18:31:21 +00:00
ansible.builtin.git:
2023-01-03 21:30:22 +00:00
dest: /home/{{ ansible_user }}/pi-fan-controller
2022-12-31 14:53:24 +00:00
repo: https://github.com/Howchoo/pi-fan-controller.git
clone: true
update: false
single_branch: true
depth: 1
become: false
notify: pi-fan-controller