openQA: try to make NFS mount changes more robust
On client end, restart mount unit (with daemon-reload) if mount file changes. On server end, run exportfs -r if export config file changes. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
e14052db33
commit
c2023d5560
2 changed files with 10 additions and 0 deletions
|
@ -213,12 +213,17 @@
|
|||
|
||||
- name: Create exports file
|
||||
template: src=exports.j2 dest=/etc/exports.d/openqa.exports owner=root group=root mode=0644
|
||||
register: exportsfile
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Enable and start NFS server
|
||||
service: name=nfs-server enabled=yes state=started
|
||||
|
||||
- name: Refresh exports
|
||||
command: exportfs -r
|
||||
when: exportsfile is changed
|
||||
|
||||
- name: Set up Apache config
|
||||
template: src=openqa.conf.httpd.j2 dest=/etc/httpd/conf.d/openqa.conf owner=root group=root mode=0644
|
||||
notify:
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
- name: Create mount unit
|
||||
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
|
||||
|
||||
|
@ -22,3 +23,7 @@
|
|||
with_items:
|
||||
- var-lib-openqa-share.mount
|
||||
- remote-fs.target
|
||||
|
||||
- name: Restart mount if unit changed
|
||||
systemd: name=var-lib-openqa-share.mount state=started daemon_reload=yes
|
||||
when: sharemount is changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue