是否可以在sudoedit授予的文件上使用ansible模板/副本

问题描述 投票:0回答:1

我喜欢在这种情况下使用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问题是,我没有...

linux ansible privileges sudoers
1个回答
0
投票

没有这是不可能的。 Privilege escalation must be general

© www.soinside.com 2019 - 2024. All rights reserved.