1、格式化磁盘:
ansible all -m filesystem -a "fstype=ext4 dev=/dev/sdb"
2、创建挂载:
ansible all -m mount -a 'name=/tmp/app src=/dev/sdb fstype=ext4 state=mounted opts=rw'
其中state的可选值为:absent\mounted\umounted
1、格式化磁盘:
ansible all -m filesystem -a "fstype=ext4 dev=/dev/sdb"
2、创建挂载:
ansible all -m mount -a 'name=/tmp/app src=/dev/sdb fstype=ext4 state=mounted opts=rw'
其中state的可选值为:absent\mounted\umounted