ansible web01 -m mount -a 'src=172.16.1.31:/code/blog path=/mnt fstype=nfs state=absent'
模块:
mount:
src: 挂载的源(172.16.1.31:/code/blog)
path: 挂载到本地的目录
state:
present # 只写入到/etc/fstab 不能直接挂载
unumounted # 只卸载不删除/etc/fstab中的配置
absent # 卸载并且删除/etc/fstab配置
mounted # 挂载并且写入到/etc/fstab
欢迎来撩 : 汇总all