【问题标题】:how to add a ssh key to a bit bucket account via ansible?如何通过ansible将ssh密钥添加到位桶帐户?
【发布时间】:2016-05-02 20:07:59
【问题描述】:

我是 ansible 的新手。我正在尝试自动化部署。我可以手动执行此操作。不确定如何通过 Ansible 实现这一点

【问题讨论】:

标签: amazon-web-services ssh bitbucket ansible


【解决方案1】:

如果有 Rest-API,请使用 uri module

如果您需要更多帮助,您应该提供更多详细信息。

【讨论】:

    【解决方案2】:

    找到了更好的方法-

    - name: Upload ssh key to the Instance
      copy: src=yourSrc/.ssh/id_rsa_bitbucket dest=/yourDest/.ssh/id_rsa_bitbucket mode=600
    
    - name: Clone the git repo using GIT_SSH
      git: repolink dest=dest key_file=yourDest/.ssh/id_rsa_bitbucket accept_hostkey=true clone=yes force=yes
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-02
      • 2017-02-01
      • 1970-01-01
      • 2020-02-18
      • 2015-08-21
      • 2014-11-29
      • 2018-03-15
      • 1970-01-01
      相关资源
      最近更新 更多