蔬菜小程序的开发全流程详解
1040
2022-10-07
ansible模块--mount模块
fstype 指定挂载文件的系统类型,必须指定path 定义挂载到哪个目录,必须指定src 定义挂载内容state 挂载状态 mounted进行挂载,修改/etc/fstab信息 unmounted临时卸载,不修改/etc/fstab信息 absent永久性卸载,并修改 /etc/fstab信息
name: 永久挂载
mount: src=/dev/sdb path=/data state=mounted fstype=iso9660
1.永久挂载
[root@ansible
2.临时卸载
[root@ansible ~]# ansible mysql -m mount -a 'fstype=iso9660 src=/dev/sr0 path=/mnt state=unmounted'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": true, "dump": "0", "fstab": "/etc/fstab", "fstype": "iso9660", "name": "/mnt", "opts": "defaults", "passno": "0", "src": "/dev/sr0"}
3.永久卸载
[root@ansible ~]# ansible mysql -m mount -a 'fstype=iso9660 src=/dev/sr0 path=/mnt state=absent'192.168.56.88 | CHANGED => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": true, "dump": "0", "fstab": "/etc/fstab", "fstype": "iso9660", "name": "/mnt", "opts": "defaults", "passno": "0", "src": "/dev/sr0"}
ansible
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~