-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtasks_github_cli.yml
More file actions
77 lines (69 loc) · 1.9 KB
/
Copy pathtasks_github_cli.yml
File metadata and controls
77 lines (69 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
- name: GitHub CLI | Ensure wget is installed
ansible.builtin.apt:
name: wget
state: present
update_cache: yes
become: true
tags:
- github_cli
- name: GitHub CLI | Create /etc/apt/keyrings directory
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
become: true
tags:
- github_cli
- name: GitHub CLI | Download GitHub CLI GPG key
ansible.builtin.get_url:
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
dest: /etc/apt/keyrings/githubcli-archive-keyring.gpg
mode: '0644'
become: true
tags:
- github_cli
- name: GitHub CLI | Ensure GPG key is world-readable
ansible.builtin.file:
path: /etc/apt/keyrings/githubcli-archive-keyring.gpg
mode: '0644'
become: true
tags:
- github_cli
- name: GitHub CLI | Create /etc/apt/sources.list.d directory
ansible.builtin.file:
path: /etc/apt/sources.list.d
state: directory
mode: '0755'
become: true
tags:
- github_cli
- name: GitHub CLI | Get system architecture
ansible.builtin.command:
cmd: dpkg --print-architecture
register: github_cli_arch
changed_when: false
tags:
- github_cli
- name: GitHub CLI | Add GitHub CLI repository
ansible.builtin.copy:
content: |
deb [arch={{ github_cli_arch.stdout }} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main
dest: /etc/apt/sources.list.d/github-cli.list
mode: '0644'
become: true
tags:
- github_cli
- name: GitHub CLI | Update apt package index
ansible.builtin.apt:
update_cache: yes
become: true
tags:
- github_cli
- name: GitHub CLI | Install GitHub CLI
ansible.builtin.apt:
name: gh
state: present
become: true
tags:
- github_cli