diff --git a/project/roles/common/tasks/packages.yml b/project/roles/common/tasks/packages.yml index bde8318..f3ab8ef 100644 --- a/project/roles/common/tasks/packages.yml +++ b/project/roles/common/tasks/packages.yml @@ -6,11 +6,12 @@ - htop - xfsprogs - iotop + state: present - name: Ensure debian-specific packages are installed import_tasks: packages_debian.yml - when: ansible_facts['os-family']|lower == 'debian' + when: ansible_facts['os-family'] == 'Debian' - name: Ensure rhel-specific packages are installed import_tasks: packages_redhat.yml - when: ansible_facts['os-family']|lower == 'redhat' + when: ansible_facts['os-family'] == 'RedHat' diff --git a/project/roles/common/tasks/packages_debian.yml b/project/roles/common/tasks/packages_debian.yml index ccb3c81..d1ab7e1 100644 --- a/project/roles/common/tasks/packages_debian.yml +++ b/project/roles/common/tasks/packages_debian.yml @@ -3,4 +3,4 @@ ansible.builtin.package: name: - vim - - xfsprogs \ No newline at end of file + state: present \ No newline at end of file diff --git a/project/roles/common/tasks/packages_redhat.yml b/project/roles/common/tasks/packages_redhat.yml index 40b40cc..5ef218e 100644 --- a/project/roles/common/tasks/packages_redhat.yml +++ b/project/roles/common/tasks/packages_redhat.yml @@ -4,3 +4,4 @@ name: - vim-enhanced - yum-cron + state: present