SSH Agent Forwarding with Ansible

前端 未结 4 562
野性不改
野性不改 2020-12-02 06:12

I’m using Ansible 1.5.3 and Git with ssh agent forwarding (https://help.github.com/articles/using-ssh-agent-forwarding). I can log into the server that I am managing with A

4条回答
  •  再見小時候
    2020-12-02 07:13

    To expand on @j.freckle's answer, the ansible way to change sudoers file is:

    - name: Add ssh agent line to sudoers
      lineinfile: 
        dest: /etc/sudoers
        state: present
        regexp: SSH_AUTH_SOCK
        line: Defaults env_keep += "SSH_AUTH_SOCK"
    

提交回复
热议问题