mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 22:11:01 +08:00
Replaces references to template: with ansible.builtin.template Signed-off-by: Ryan Lerch <rlerch@redhat.com>
30 lines
966 B
YAML
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
|