diff --git a/defaults/main.yml b/defaults/main.yml index 8c2e074..42f07b7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,25 +1,12 @@ --- -basic_packages_redhat: - - git - - curl +essential_packages_redhat_only: - libselinux-python3 - yum-utils - - mlocate - - htop - - iotop - - make - - multitail - - ncdu - - nload - - pv - - tree - - unzip - - bc - - screen - - jq - - net-tools -basic_packages_ubuntu: +essential_packages_ubuntu_only: + - nmon + +essential_packages_common: - git - curl - htop @@ -28,7 +15,6 @@ basic_packages_ubuntu: - multitail - ncdu - nload - - nmon - pv - tree - unzip @@ -38,4 +24,8 @@ basic_packages_ubuntu: - mlocate - net-tools +basic_packages_redhat: "{{ essential_packages_common + essential_packages_redhat_only }}" + +basic_packages_ubuntu: "{{ essential_packages_common + essential_packages_ubuntu_only }}" + set_bash_history_timestamps: true diff --git a/tasks/ubuntu.yml b/tasks/Debian.yml similarity index 100% rename from tasks/ubuntu.yml rename to tasks/Debian.yml diff --git a/tasks/redhat.yml b/tasks/RedHat.yml similarity index 100% rename from tasks/redhat.yml rename to tasks/RedHat.yml diff --git a/tasks/main.yml b/tasks/main.yml index 2cd488c..d07e5f3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: Include Ubuntu tasks - include_tasks: "ubuntu.yml" - when: ansible_os_family == 'Debian' - -- name: Include Redhat tasks - include_tasks: "redhat.yml" - when: ansible_os_family == 'RedHat' +- name: Install packages + include_tasks: "{{ ansible_os_family }}.yml" - name: Make sure bash history records and displays timestamps by default # Tested on Red Hat + Ubuntu