From: Michael Scherer <misc@xxxxxxxx> using the drop-in config snipper system, we can add configuration to systemd without replacing it, in case the systemd file is changed upstream. --- roles/fedmsg/gateway/files/fedmsg-gateway.service | 15 --------------- roles/fedmsg/gateway/files/fs-limits.conf | 2 ++ roles/fedmsg/gateway/tasks/main.yml | 11 ++++++++--- 3 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 roles/fedmsg/gateway/files/fedmsg-gateway.service create mode 100644 roles/fedmsg/gateway/files/fs-limits.conf diff --git a/roles/fedmsg/gateway/files/fedmsg-gateway.service b/roles/fedmsg/gateway/files/fedmsg-gateway.service deleted file mode 100644 index a72436c..0000000 --- a/roles/fedmsg/gateway/files/fedmsg-gateway.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Outbound fedmsg gateway -After=network.target -Documentation=http://fedmsg.readthedocs.org/en/latest/commands/ - -[Service] -ExecStart=/usr/bin/fedmsg-gateway -Type=simple -User=fedmsg -Group=fedmsg -LimitNOFILE=160000 -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/roles/fedmsg/gateway/files/fs-limits.conf b/roles/fedmsg/gateway/files/fs-limits.conf new file mode 100644 index 0000000..c31a466 --- /dev/null +++ b/roles/fedmsg/gateway/files/fs-limits.conf @@ -0,0 +1,2 @@ +[Service] +LimitNOFILE=160000 diff --git a/roles/fedmsg/gateway/tasks/main.yml b/roles/fedmsg/gateway/tasks/main.yml index cd34b26..6a82726 100644 --- a/roles/fedmsg/gateway/tasks/main.yml +++ b/roles/fedmsg/gateway/tasks/main.yml @@ -23,10 +23,15 @@ notify: - restart fedmsg-gateway -- name: bump fs limits by installing our own systemd service file +- name: create systemd drop-in directory + file: > + dest=/etc/systemd/system/fedmsg-gateway.service.d + state=directory + +- name: bump fs limits by installing a drop-in systemd config copy: > - src=fedmsg-gateway.service - dest=/usr/lib/systemd/system/fedmsg-gateway.service + src=fs-limits.conf + dest=/etc/systemd/system/fedmsg-gateway.service.d/fs-limits.conf tags: - config - fedmsg/gateway -- 1.8.3.1 _______________________________________________ infrastructure mailing list infrastructure@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx