Skip to content

Commit

Permalink
Add github cli install
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaweees committed May 18, 2024
1 parent bb2920e commit 900e122
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
- include: tasks/gui-setup.yml
- include: tasks/flatpak-setup.yml
- include: tasks/discord-setup.yml
- include: tasks/gh-setup.yml
- include: tasks/neovim-setup.yml
- include: tasks/zsh-setup.yml
# - include: tasks/dotfiles.yml
Expand Down
41 changes: 41 additions & 0 deletions tasks/gh-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
- name: Create keyring
become: true
ansible.builtin.shell:
cmd: "sudo mkdir -p -m 755 /etc/apt/keyrings"
tags:
- minimal-install
- install
- git-cli
- name: Download GitHub CLI
become: true
ansible.builtin.shell:
cmd: "wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null"
tags:
- minimal-install
- install
- git-cli
- name: Change git-cli keyring to read and execute for everyone
become: true
ansible.builtin.shell:
cmd: "chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg"
tags:
- minimal-install
- install
- git-cli
- name: git-cli
become: true
ansible.builtin.shell:
cmd: 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null'
tags:
- minimal-install
- install
- git-cli
- name: Install git cli
become: true
ansible.builtin.shell:
cmd: "sudo apt update && sudo apt install gh -y"
tags:
- minimal-install
- install
- git-cli

0 comments on commit 900e122

Please sign in to comment.