REFACTOR: move base system installation into a separated role
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
---
|
||||
- name: Installing basic utils for comfort work (apt-based system)
|
||||
when: (ansible_facts['distribution'] == "Debian") or
|
||||
(ansible_facts['distribution'] == "Ubuntu")
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- vim
|
||||
- neovim
|
||||
- ranger
|
||||
- zsh
|
||||
- rsync
|
||||
- git
|
||||
- curl
|
||||
- kitty
|
||||
- unattended-upgrades
|
||||
- ssh
|
||||
- openssh-server
|
||||
update-cache: true # Run apt update before installation
|
||||
become: true
|
||||
remote_user: ansible
|
||||
|
||||
- name: Install qemu-guest-agent on VM
|
||||
when:
|
||||
- ansible_facts['os_family'] == "Debian"
|
||||
- ansible_facts['virtualization_type'] == "kvm"
|
||||
ansible.builtin.apt:
|
||||
name: qemu-guest-agent
|
||||
state: present
|
||||
update-cache: true # Run apt update before installation
|
||||
become: true
|
||||
remote_user: ansible
|
||||
tags:
|
||||
- kvm-guests
|
||||
- packages
|
||||
|
||||
|
||||
# The same commands for Alpine
|
||||
- name: Update and install packages on Alpine
|
||||
when: (ansible_facts['distribution'] == "Alpine")
|
||||
community.general.apk:
|
||||
name: neovim vim ranger zsh rsync git curl kitty openssh
|
||||
update_cache: true
|
||||
remote_user: ansible
|
||||
Reference in New Issue
Block a user