From: David Galloway Date: Fri, 17 Jun 2016 02:27:01 +0000 (-0400) Subject: gateway: Add logrotate functionality X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F249%2Fhead;p=ceph-cm-ansible.git gateway: Add logrotate functionality Signed-off-by: David Galloway --- diff --git a/roles/gateway/README.rst b/roles/gateway/README.rst index c335c409..565cae36 100644 --- a/roles/gateway/README.rst +++ b/roles/gateway/README.rst @@ -152,6 +152,5 @@ To Do - Support installation of new OpenVPN gateway from scratch - Generate and pull (to secrets?) CA, keys, and certificates -- Configure log rotation .. _Sepia: https://ceph.github.io/sepia/ diff --git a/roles/gateway/files/openvpn.logrotate b/roles/gateway/files/openvpn.logrotate new file mode 100644 index 00000000..e629e093 --- /dev/null +++ b/roles/gateway/files/openvpn.logrotate @@ -0,0 +1,9 @@ +/var/log/openvpn.log { + daily + size 100M + rotate 14 + compress + missingok + copytruncate + create 644 nobody nobody +} diff --git a/roles/gateway/tasks/main.yml b/roles/gateway/tasks/main.yml index 9629f6dd..f1f68619 100644 --- a/roles/gateway/tasks/main.yml +++ b/roles/gateway/tasks/main.yml @@ -49,3 +49,8 @@ name: "openvpn@{{ openvpn_server_name }}" state: started enabled: yes + +- name: Write logrotate conf file + copy: + src: files/openvpn.logrotate + dest: /etc/logrotate.d/openvpn