我需要挂载smb共享才能访问Ansible中大型共享安装文件。使用CLI可以工作:
- name: Mount share
become: yes
shell: "mount.cifs {{ smb_share.path }} {{ smb_share.mount_point }} -o user={{ smb_share.user }},password={{ smb_share.password }},mfsymlinks,exec"
但是,这有两个缺点:
mount
]中的挂载点Ansible中有一个mount
模块。但是由于此共享仅用于安装并使用凭据,因此我不想将其永久挂载。 mount
参数看起来是我需要的,可惜不是Linux:
boot
我仍然尝试设置
Determines if the filesystem should be mounted on boot. Only applies to Solaris systems.
,但如文档所述,它仍然使用纯文本密码创建boot: no
条目。
是否可以通过任何Ansible模块将Windows共享临时安装在CentOS 7上?
我需要挂载smb共享才能访问Ansible中大型共享安装文件。可以在CLI下使用:-名称:挂载共享成为:yes shell:“ mount.cifs {{smb_share.path}} {{...
我不知道在ansible中有一些临时安装的特定模块。但是从文档中,您可以通过以下方式使用mount