Files
fedora-infra_ansible/roles/openqa/worker/tasks/nfs-client.yml
Ryan Lerch 47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00

30 lines
966 B
YAML

# Required vars
# - openqa_hostname
## string - hostname of the openQA server (we assume it is hosting the NFS mount)
---
- name: Install NFS client
ansible.builtin.package: name=nfs-utils state=present
tags:
- packages
# We don't check ownership as, after mounting, it's owned by whatever the
# UID of geekotest is on the server
- name: Ensure mount target exists
ansible.builtin.file: path=/var/lib/openqa/share state=directory mode=0755
- name: Create mount unit
ansible.builtin.template: src=var-lib-openqa-share.mount.j2 dest=/etc/systemd/system/var-lib-openqa-share.mount owner=root group=root mode=0644
register: sharemount
tags:
- config
- name: Enable and start mount
service: name={{ item }} enabled=yes state=started
with_items:
- var-lib-openqa-share.mount
- remote-fs.target
- name: Restart mount if unit changed
systemd: name=var-lib-openqa-share.mount state=restarted daemon_reload=yes
when: sharemount is changed