Inchdev.github_deploy_key

役割名

この役割は、GitHubリポジトリのデプロイキーにSSHキーを追加または削除することを可能にします。GitHub APIを使用します: https://developer.github.com/v3/repos/keys/

要件

なし

役割の変数

この役割に渡すことができる変数と、その簡単な説明は以下の通りです:

github_deploy_key_readonly: true # デプロイキーが読み取り専用であるべきかどうか

github_api_url: https://api.github.com/repos/{{github_repository}}/keys # 上書きしないでください。GitHub APIのURLを解決するために使用されます

deploy_key_operation: present # present: キーを追加、absent: キーを削除

github_deploy_key_name: ansible-generated # あなたのキーのタイトル

github_deploy_key: ssh-rsa foobar # あなたのキーの内容(必須)

# ユーザー名とパスワードで認証することもできます(2FAが無効の場合):
github_username: myUsername
github_password: myPassword

# または、ここで作成できる認証トークンを使用することをお勧めします: https://github.com/settings/tokens

github_access_token: myAccessTokenThatIsSuperLongAndUsuallyInTheVault

依存関係

なし

例プレイブック

- hosts: servers
  roles:
    - role: github_deploy_key
      vars:
        github_repository: owner/repo_name
        github_access_token: myAccessTokenThatIsSuperLongAndUsuallyInTheVault
        github_deploy_key: ssh-rsa tototata
        github_deploy_key_readonly: false

- hosts: servers
  roles:
    - role: github_deploy_key
      vars:
        github_repository: owner/repo_name
        github_username: myUsername
        github_password: myPassword
        github_deploy_key: ssh-rsa tototata

- hosts: servers
  roles:
    - role: github_deploy_key
      vars:
        deploy_key_operation: absent
        github_repository: owner/repo_name
        github_deploy_key_id: 4242
        github_access_token: myAccessTokenThatIsSuperLongAndUsuallyInTheVault

ライセンス

BSD

著者情報

https://github.com/Uelb

プロジェクトについて

Developer

インストール
ansible-galaxy install Inchdev.github_deploy_key
ライセンス
Unknown
ダウンロード
127
所有者