mountpartition.yml
1 KB
---
- hosts: vdc-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdc1, path: /opt }
- { device: /dev/vdc2, path: /upload }
- { device: /dev/vdc3, path: /archive }
- { device: /dev/vdc4, path: /data }
- hosts: vdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdb1, path: /opt }
- { device: /dev/vdb2, path: /upload }
- { device: /dev/vdb3, path: /archive }
- { device: /dev/vdb4, path: /data }