ansible模块-挂载模块
ansible查看帮助方法
# 查看所有模块帮助信息
ansible-doc -l
# 指定查看某个模块参数用法
ansible-doc copy
1.mount模块
[root@ansible ~]# ansible all -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=present"
[root@ansible ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=mounted"
[root@ansible ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=unmounted"
[root@ansible ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=absent"
mount模块参数