我喜欢在这种情况下使用template
(或copy
)功能:
- name: Template a file to /etc/files.conf
template:
src: /mytemplates/foo.j2
dest: /etc/file.conf
问题是,我没有对远程文件/etc/file.conf
的直接写入权限,只能通过sudoedit
对其进行修改>
是否可以通过template
传递sudoedit
命令并像这样修改或复制文件?
我喜欢在这样的环境中使用模板(或复制)功能:-名称:将文件模版到/etc/files.conf模板:src:/mytemplates/foo.j2目标:/etc/file.conf问题是,我没有...
没有这是不可能的。 Privilege escalation must be general: