Add gh role for macOS, Windows, and Debian
This commit is contained in:
parent
63ff47c3b2
commit
2abc38f696
@ -14,6 +14,7 @@
|
|||||||
- role: bat
|
- role: bat
|
||||||
- role: curl
|
- role: curl
|
||||||
- role: fzf
|
- role: fzf
|
||||||
|
- role: gh
|
||||||
- role: git
|
- role: git
|
||||||
- role: htop
|
- role: htop
|
||||||
- role: jp
|
- role: jp
|
||||||
|
@ -14,8 +14,9 @@
|
|||||||
- role: bat
|
- role: bat
|
||||||
- role: curl
|
- role: curl
|
||||||
- role: fzf
|
- role: fzf
|
||||||
- role: tree
|
- role: gh
|
||||||
- role: jq
|
- role: jq
|
||||||
|
- role: tree
|
||||||
- role: yq
|
- role: yq
|
||||||
|
|
||||||
- role: llvm
|
- role: llvm
|
||||||
|
5
roles/gh/tasks/Darwin.yaml
Normal file
5
roles/gh/tasks/Darwin.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install homebrew package
|
||||||
|
homebrew:
|
||||||
|
name: gh
|
||||||
|
state: latest
|
31
roles/gh/tasks/Debian.yaml
Normal file
31
roles/gh/tasks/Debian.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- set_fact:
|
||||||
|
arch_map:
|
||||||
|
aarch64: arm64
|
||||||
|
armv6l: armhf
|
||||||
|
armv7l: armhf
|
||||||
|
i386: i386
|
||||||
|
x86_64: amd64
|
||||||
|
- set_fact:
|
||||||
|
arch: '{{ [ansible_architecture] | map("extract", arch_map) | first }}'
|
||||||
|
|
||||||
|
- name: download apt repository key
|
||||||
|
become: true
|
||||||
|
get_url:
|
||||||
|
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
|
||||||
|
dest: /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: add apt repository list
|
||||||
|
become: true
|
||||||
|
apt_repository:
|
||||||
|
filename: github-cli
|
||||||
|
repo: 'deb [arch={{arch}} signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main'
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: install apt package
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name: gh
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
5
roles/gh/tasks/Windows.yaml
Normal file
5
roles/gh/tasks/Windows.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install chocolatey package
|
||||||
|
win_chocolatey:
|
||||||
|
name: gh
|
||||||
|
state: latest
|
2
roles/gh/tasks/main.yaml
Normal file
2
roles/gh/tasks/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: '{{ansible_os_family}}.yaml'
|
Loading…
x
Reference in New Issue
Block a user