diff --git a/playbooks/provision.yml b/playbooks/provision.yml index 9e4c62489..5e5727ff4 100644 --- a/playbooks/provision.yml +++ b/playbooks/provision.yml @@ -29,6 +29,9 @@ - role: app_user # Create unprivileged user to run the app tags: app_user + - role: config # System config to help things run smoothly + tags: config + - role: common # Install common apps and libraries, and setup shell. tags: common diff --git a/roles/config/README.md b/roles/config/README.md new file mode 100644 index 000000000..5f9ea9c4e --- /dev/null +++ b/roles/config/README.md @@ -0,0 +1 @@ +General system config to keep things running smoothly. diff --git a/roles/config/handlers/main.yml b/roles/config/handlers/main.yml new file mode 100644 index 000000000..7ec78ed3d --- /dev/null +++ b/roles/config/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: Restart journald + service: name=systemd-journald state=restarted + become: yes diff --git a/roles/config/tasks/main.yml b/roles/config/tasks/main.yml new file mode 100644 index 000000000..754c0b145 --- /dev/null +++ b/roles/config/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- name: "Set journal log size limit" # to avoid hard drive filling up! + lineinfile: + path: /etc/systemd/journald.conf + regexp: '^#\s*SystemMaxUse=' + line: 'SystemMaxUse=100M' + notify: Restart journald + become: yes