| --- |
| - hosts: 127.0.0.1 |
| connection: local |
| remote_user: chrome-bot |
| become_user: root |
| become: yes |
| become_method: sudo |
| vars: |
| # override with --extra-vars "nfs_mount_point=/opt/stage" |
| nfs_mount_point: /opt/prod |
| tasks: |
| |
| # Remove configurations that keep our files mounted |
| - lineinfile: dest=/etc/cron.d/opt_raspberrypi_root line="* * * * * root /bin/mount {{nfs_mount_point}}/root" create=no state=absent |
| - lineinfile: dest=/etc/rc.local line="mount {{nfs_mount_point}}/root" state=absent |
| - lineinfile: dest=/etc/rc.local line="mount {{nfs_mount_point}}/boot" state=absent |
| |
| - service: name=nfs-kernel-server state=stopped |
| |
| - mount: name="{{nfs_mount_point}}/boot" src="dontcare" fstype="auto" state="unmounted" |
| - mount: name="{{nfs_mount_point}}/root" src="dontcare" fstype="auto" state="unmounted" |
| |
| handlers: |
| |