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
本文标题:Ansible 挂载模块mount、格式化磁盘模块filesys
本文链接:https://www.haomeiwen.com/subject/onzlcftx.html
网友评论