main
Alpha Chen 4 months ago
parent dd58ffddd7
commit bbe328132b
No known key found for this signature in database

@ -31,6 +31,9 @@
- name: Import macos playbook
import_playbook: macos.yml
- name: Import ubuntu playbook
import_playbook: ubuntu.yml
- name: Misc macOS things
hosts: os_MacOSX
tasks:

@ -0,0 +1,58 @@
- name: Set up Ubuntu
hosts: os_Ubuntu
tasks:
- name: Add myself to sudoers
become: true
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: '^alpha ALL='
line: 'alpha ALL=(ALL) NOPASSWD: ALL'
validate: /usr/sbin/visudo -cf %s
- name: Install git
become: true
block:
- name: Add PPA
ansible.builtin.apt_repository:
repo: "ppa:git-core/ppa"
state: present
- name: Install git # noqa: package-latest
ansible.builtin.apt:
name: git
update_cache: true
state: latest
- name: Install git-lfs
become: true
block:
# https://packagecloud.io/github/git-lfs/install#manual-deb
- name: Install dependencies
ansible.builtin.apt:
name:
- debian-archive-keyring
- curl
- gnupg
- apt-transport-https
update_cache: true
- name: Add the GPG key # noqa: command-instead-of-module risky-shell-pipe
ansible.builtin.shell: >
curl -fsSL https://packagecloud.io/github/git-lfs/gpgkey
| gpg --dearmor
> /etc/apt/keyrings/github_git-lfs-archive-keyring.gpg
args:
creates: /etc/apt/keyrings/github_git-lfs-archive-keyring.gpg
- name: Add apt repo
ansible.builtin.copy:
dest: /etc/apt/sources.list.d/github_git-lfs.list
mode: '0644'
content: |
deb [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/ubuntu jammy main
deb-src [signed-by=/etc/apt/keyrings/github_git-lfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/ubuntu jammy main
- name: Install git-lfs
ansible.builtin.apt:
name: git-lfs
update_cache: true
# vim: ft=yaml.ansible
Loading…
Cancel
Save