You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9 KiB

- 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