From 74ffa577fc8375c71dc3b7e2164410a8f7cadee4 Mon Sep 17 00:00:00 2001 From: neillturner Date: Wed, 30 Nov 2016 13:29:18 +0000 Subject: [PATCH] amazon linux --- lib/kitchen-ansible/version.rb | 2 +- lib/kitchen/provisioner/ansible_playbook.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/kitchen-ansible/version.rb b/lib/kitchen-ansible/version.rb index e49845f..a9d782d 100644 --- a/lib/kitchen-ansible/version.rb +++ b/lib/kitchen-ansible/version.rb @@ -1,6 +1,6 @@ # -*- encoding: utf-8 -*- module Kitchen module Ansible - VERSION = '0.45.5' + VERSION = '0.45.6' end end diff --git a/lib/kitchen/provisioner/ansible_playbook.rb b/lib/kitchen/provisioner/ansible_playbook.rb index 89588e3..eb97855 100644 --- a/lib/kitchen/provisioner/ansible_playbook.rb +++ b/lib/kitchen/provisioner/ansible_playbook.rb @@ -87,12 +87,10 @@ def install_command if [ ! $(which ansible) ]; then if [ -f /etc/fedora-release ]; then #{Kitchen::Provisioner::Ansible::Os::Fedora.new('fedora', config).install_command} + elif [ `grep -q 'Amazon Linux' /etc/system-release` ]; then + #{Kitchen::Provisioner::Ansible::Os::Amazon.new('amazon', config).install_command} elif [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then - if [ -z `grep -q 'Amazon Linux' /etc/system-release` ]; then #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_command} - else - #{Kitchen::Provisioner::Ansible::Os::Amazon.new('amazon', config).install_command} - fi elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then #{Kitchen::Provisioner::Ansible::Os::Suse.new('suse', config).install_command} elif [[ "$OSTYPE" == "darwin"* ]]; then