From 940c34e117f0799933b7a54ca297b51712e0ce34 Mon Sep 17 00:00:00 2001 From: Matthew Ahrenstein Date: Fri, 17 Jul 2020 14:51:05 -0400 Subject: [PATCH] Fixing CentOS zsh install and testing for it --- tasks/prereqs.yml | 2 +- tests/smoke/repo-role/no-user-management/prereqs_test.rb | 5 +++++ tests/smoke/repo-role/standard/prereqs_test.rb | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/prereqs.yml b/tasks/prereqs.yml index ed59a9d..dc3ab17 100644 --- a/tasks/prereqs.yml +++ b/tasks/prereqs.yml @@ -27,7 +27,7 @@ yum: name: zsh state: present - when: ansible_distribution == "Ubuntu" + when: ansible_distribution == "CentOS" - name: Create an admin group for password-less sudo options group: diff --git a/tests/smoke/repo-role/no-user-management/prereqs_test.rb b/tests/smoke/repo-role/no-user-management/prereqs_test.rb index c1b42cb..1a672c4 100644 --- a/tests/smoke/repo-role/no-user-management/prereqs_test.rb +++ b/tests/smoke/repo-role/no-user-management/prereqs_test.rb @@ -13,6 +13,11 @@ if ['ubuntu', 'centos'].include?(os[:name]) + # Verify zsh is installed + describe package('zsh') do + it { should be_installed } + end + # Verify the sysadmins group exists describe group('sysadmins') do it { should exist } diff --git a/tests/smoke/repo-role/standard/prereqs_test.rb b/tests/smoke/repo-role/standard/prereqs_test.rb index f15da68..b5aa1e6 100644 --- a/tests/smoke/repo-role/standard/prereqs_test.rb +++ b/tests/smoke/repo-role/standard/prereqs_test.rb @@ -13,6 +13,11 @@ if ['ubuntu', 'centos'].include?(os[:name]) + # Verify zsh is installed + describe package('zsh') do + it { should be_installed } + end + # Verify the sysadmins group exists describe group('sysadmins') do it { should exist }