Skip to content

Commit

Permalink
create systemd unit file for irods
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmeele committed Jan 20, 2025
1 parent 9334e7b commit 20a7db4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions playbooks/roles/irods_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
- irods-rule-engine-plugin-python
- irods-icommands

- name: Prepare systemd unit file for irods
ansible.builtin.template:
src: irods.service.j2
dest: /lib/systemd/system/irods.service
owner: root
group: root
mode: '0644'

- name: Reload systemd daemon
ansible.builtin.systemd:
daemon_reload: true

- name: Configure ODBC driver for Rocky 9+
ansible.builtin.set_fact:
irods_server_db_driver: "PostgreSQL"

Check failure on line 31 in playbooks/roles/irods_server/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[indentation]

Wrong indentation: expected 4 but found 5
Expand Down Expand Up @@ -84,6 +96,7 @@
- name: Run irods configuration script
when: irods_server_start == "start"
ansible.builtin.command: python3 /var/lib/irods/scripts/setup_irods.py --json_configuration_file /etc/irods/server_unattended_config.json

- name: Start and enable iRODS as service
when: irods_server_start == "start"
ansible.builtin.service:
Expand Down
20 changes: 20 additions & 0 deletions playbooks/roles/irods_server/templates/irods.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=iRODS Storage middleware
After=local-fs.target network.target

[Service]
WorkingDirectory=/var/lib/irods
User=irods
Group=irods
Environment="PATH=/bin:/usr/bin:/usr/sbin:/var/lib/irods:/var/lib/irods/iRODS"
ExecStart=/bin/bash -c "irodsctl start"
ExecReload=/usr/bin/touch /etc/irods/core.re
ExecStop=/bin/bash -c "irodsctl stop"
KillMode=control-group
Restart=on-failure
RestartPreventExitStatus=255
Type=forking
LimitNOFILE=16000

[Install]
WantedBy=multi-user.target

0 comments on commit 20a7db4

Please sign in to comment.