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