optimize APT usage
This commit is contained in:
parent
73105db948
commit
bc8c4eac8a
4 changed files with 22 additions and 4 deletions
|
@ -21,3 +21,11 @@ Should probably start creating a seperate cert for each subdomain.
|
||||||
### Git server
|
### Git server
|
||||||
|
|
||||||
GitLab? Gitea?
|
GitLab? Gitea?
|
||||||
|
|
||||||
|
### Firewall
|
||||||
|
|
||||||
|
Seems to be a little annoying with all the docker stuff
|
||||||
|
|
||||||
|
### Mastodon
|
||||||
|
|
||||||
|
Fix cache filling up so much space: cronjob to remove them?
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
- name: APT upgrade
|
||||||
|
apt:
|
||||||
|
autoremove: true
|
||||||
|
upgrade: yes
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 86400 # One day
|
||||||
- name: Create /data directory
|
- name: Create /data directory
|
||||||
file:
|
file:
|
||||||
path: /data
|
path: /data
|
||||||
|
|
|
@ -6,14 +6,17 @@
|
||||||
- gnupg
|
- gnupg
|
||||||
- lsb-release
|
- lsb-release
|
||||||
- python3-pip
|
- python3-pip
|
||||||
state: latest
|
|
||||||
update_cache: true
|
|
||||||
- name: Add Docker APT key
|
- name: Add Docker APT key
|
||||||
apt_key:
|
apt_key:
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
url: https://download.docker.com/linux/ubuntu/gpg
|
||||||
- name: Add Docker repository
|
- name: Add Docker repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
||||||
|
register: apt_repository
|
||||||
|
- name: Update APT cache
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
when: apt_repository.changed
|
||||||
- name: Install Docker packages
|
- name: Install Docker packages
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
pkg:
|
||||||
|
@ -21,8 +24,6 @@
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- containerd.io
|
- containerd.io
|
||||||
- docker-compose-plugin
|
- docker-compose-plugin
|
||||||
state: latest
|
|
||||||
update_cache: true
|
|
||||||
- name: Install Docker modules for Python
|
- name: Install Docker modules for Python
|
||||||
pip:
|
pip:
|
||||||
name:
|
name:
|
||||||
|
|
2
roles/ssh/meta/main.yml
Normal file
2
roles/ssh/meta/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
dependencies:
|
||||||
|
- role: common
|
Reference in a new issue