feat(role): add GitHub CLI (gh)
Based on https: //github.com/cli/cli/blob/19427d8819e36021c877b6e4cd855e060433f6ef/docs/install_linux.md. Fixes: #28
This commit is contained in:
parent
3591a72612
commit
291a8df6d0
|
@ -8,6 +8,7 @@
|
|||
- role: dconf
|
||||
- role: docker
|
||||
- role: fzf
|
||||
- role: github-cli
|
||||
- role: gnome-tweak-tools
|
||||
- role: git
|
||||
- role: htop
|
||||
|
|
26
roles/github-cli/tasks/main.yaml
Normal file
26
roles/github-cli/tasks/main.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- name: Existing install
|
||||
ansible.builtin.stat:
|
||||
path: /usr/bin/gh
|
||||
register: install
|
||||
|
||||
- name: Keyring
|
||||
ansible.builtin.get_url:
|
||||
dest: /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
mode: 644
|
||||
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
|
||||
when: not install.stat.exists
|
||||
become: true
|
||||
|
||||
- name: Repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main"
|
||||
when: not install.stat.exists
|
||||
become: true
|
||||
|
||||
- name: Install
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- gh
|
||||
state: latest
|
||||
become: true
|
Loading…
Reference in a new issue