This repository has been archived on 2024-04-30. You can view files and clone it, but cannot push or open issues or pull requests.
setup/roles/system/tasks/main.yml
2023-02-26 01:17:16 +01:00

62 lines
1.5 KiB
YAML

- name: Install APT packages
become: true
apt:
pkg:
- git
- make
- ripgrep
- curl
- unzip
- libreoffice-calc
- libreoffice-impress
- libreoffice-writer
- gimp
- tree
- wireshark
- units
- unrar
- name: Install .gitconfig
template:
src: "{{ role_path }}/templates/.gitconfig.j2"
dest: ~/.gitconfig
- name: Create repos directory
file:
path: ~/repos
state: directory
- name: Download Hashicorp signing key
become: true
apt_key:
keyserver: keyserver.ubuntu.com
id: "798AEC654E5C15428C8E42EEAA16FCBCA621E701"
keyring: /etc/apt/trusted.gpg.d/hashicorp.gpg
- name: Install Hashicorp repository
become: true
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com {{ distribution_release }} main"
register: apt_repository
- name: Update APT cache
become: true
apt:
update_cache: true
when: apt_repository.changed
- name: Create ssh config directory
file:
path: ~/.ssh
state: directory
mode: 0700
- name: Copy ssh config
copy:
src: "{{ role_path }}/files/ssh_config"
dest: ~/.ssh/config
mode: 0600
- name: Copy systemd ssh-agent service
become: true
template:
src: "{{ role_path }}/templates/ssh-agent.service.j2"
dest: /etc/systemd/user/ssh-agent.service
- name: Enable ssh-agent service
systemd:
name: ssh-agent
enabled: true
scope: user
state: started