From 18ee68f74ae2fca6c1c5c5a09e4c8a912d935bfb Mon Sep 17 00:00:00 2001 From: Maxim Vershinin Date: Mon, 6 Jul 2026 15:15:09 +0000 Subject: [PATCH] FEATURE: basic utils installation task added --- .../tasks/install_basic_utils.yaml | 26 +++++++++++++++++++ roles/0_basic_postinstall/tasks/main.yaml | 5 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 roles/0_basic_postinstall/tasks/install_basic_utils.yaml diff --git a/roles/0_basic_postinstall/tasks/install_basic_utils.yaml b/roles/0_basic_postinstall/tasks/install_basic_utils.yaml new file mode 100644 index 0000000..b0c386f --- /dev/null +++ b/roles/0_basic_postinstall/tasks/install_basic_utils.yaml @@ -0,0 +1,26 @@ +--- +- name: Installing basic utils for comfort work (apt-based system) + when: (ansible_facts['distribution'] == "Debian") or + (ansible_facts['distribution'] == "Ubuntu") + apt: + name: + - vim + - ranger + - zsh + - rsync + - git + - curl + - kitty + - unattended-upgrades + update-cache: yes # Run apt update before installation + become: yes + + +# The same commands for Alpine +- name: Update Alpine packages + when: (ansible_facts['distribution'] == "Alpine") + command: /sbin/apk update + +- name: Install the packages on Alpine + when: (ansible_facts['distribution'] == "Alpine") + command: /sbin/apk add vim ranger zsh rsync git curl kitty \ No newline at end of file diff --git a/roles/0_basic_postinstall/tasks/main.yaml b/roles/0_basic_postinstall/tasks/main.yaml index fc3092a..b42f03d 100644 --- a/roles/0_basic_postinstall/tasks/main.yaml +++ b/roles/0_basic_postinstall/tasks/main.yaml @@ -3,4 +3,7 @@ ansible.builtin.include_tasks: prepare_ansible_user.yaml - name: Improve SSH configuration - ansible.builtin.include_tasks: harden_ssh.yaml \ No newline at end of file + ansible.builtin.include_tasks: harden_ssh.yaml + +- name: Install basic utils + ansible.builtin.include_tasks: install_basic_utils.yaml \ No newline at end of file