标签:ansible filesystem和mount模块用法
远程格式化其他主机上硬盘
用法选项
[root@ansible ~]# ansible-doc -s filesystem less 436 Copyright (C) 1984-2009 Mark Nudelman less comes with NO WARRANTY, to the extent permitted by law. For information about the terms of redistribution, see the file named README in the less distribution. Homepage: http://www.greenwoodsoftware.com/less - name: Makes file system on block device action: filesystem dev= # Target block device. force # If yes, allows to create new filesystem on devices that already has filesystem. fstype= # File System type to be created. opts # List of options to be passed to mkfs command. resizefs # If yes, if the block device and filessytem size differ, grow the filesystem into the space. Note, XFS Will only grow if mounted.
选项:
dev:目标块设备
force:在一个已有文件系统的设备上强制创建
fstype:文件系统的类型
opts:传递给mkfs命令的选项
查看远程主机上硬盘类型是/dev/sdb
格式化,挂载。并会写入fstab文件。。
查看fstab文件
mount用法选项,使用ansible-doc -s mount来查看更多的方法。先这样吧。睡觉觉去了。
本文出自 “村里的男孩” 博客,请务必保留此出处http://noodle.blog.51cto.com/2925423/1769547
标签:ansible filesystem和mount模块用法
原文地址:http://noodle.blog.51cto.com/2925423/1769547