浏览代码
ansible playbook to install log2ram
Merge pull request #156 from smu/master
pull/162/head
azlux
3 年前
committed by
GitHub
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有
1 个文件被更改,包括
32 次插入 和
0 次删除
-
ansible_playbook/install_log2ram.yml
|
|
@@ -0,0 +1,32 @@ |
|
|
|
--- |
|
|
|
- hosts: all |
|
|
|
become: true |
|
|
|
tasks: |
|
|
|
- name: Add apt-key for new repository |
|
|
|
apt_key: |
|
|
|
keyserver: keyserver.ubuntu.com |
|
|
|
id: CA548A0A0312D8E6 |
|
|
|
- name: Add log2ram to sources.list |
|
|
|
apt_repository: |
|
|
|
repo: deb http://packages.azlux.fr/debian/ buster main |
|
|
|
state: present |
|
|
|
- name: update pkg database |
|
|
|
apt: |
|
|
|
upgrade: yes |
|
|
|
update_cache: yes |
|
|
|
- name: Install log2ram |
|
|
|
apt: |
|
|
|
pkg: |
|
|
|
- log2ram |
|
|
|
|
|
|
|
- name: modify config |
|
|
|
lineinfile: |
|
|
|
path: /etc/log2ram.conf |
|
|
|
regexp: '^SIZE=(.*)$' |
|
|
|
line: 'SIZE=80M' |
|
|
|
backrefs: yes |
|
|
|
|
|
|
|
- name: Start log2ram service |
|
|
|
systemd: |
|
|
|
state: started |
|
|
|
name: log2ram |