Restrict Ansible script module using sudoers on the remote node

前端 未结 3 1851
遇见更好的自我
遇见更好的自我 2020-12-21 21:43

I have a playbook that performs some prechecks on the database as the Oracle user. The remote node is an AIX server and so I created a shell script that is ran via the playb

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-21 22:05

    Replying to @techraf's answer: sudo seems to truncate the extra space and you can see it with sudo -l. I was able to get around this by escaping the spaces with \ as instructed in sudo's man page:

    \x For any character ‘x’, evaluates to ‘x’.

提交回复
热议问题