kitchen-ansible 0.53.0 → 0.54.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 621c646a7a42d16e3401ec6f19f81db5c6fb80833364f00ffbc5513458eea3e8
4
- data.tar.gz: 2ffc7fc71b039fa565859c199d16b52d3f7a786049cb4032b9ac43a6405b3f0c
3
+ metadata.gz: 14915690b90c67925cde829c63de6b9198162986fc2637283f075ea7b37dc4c0
4
+ data.tar.gz: 86eca88881b0d5c2deb47a877576cc00ccf22e7cbf03cbd67782886bda64b54f
5
5
  SHA512:
6
- metadata.gz: f66c6917ac9dcf3629c9ed5d1498810806e7f8899d984f5b62def95bef9caa3617d81e3fe42f05f7af8f811c06f0e9b3fc576600476660390bf324f4aedd3fe6
7
- data.tar.gz: 325f1fd0213b1f6525afed073eed515fb0ab38b5b4e8fac23af931892f590f32fbafb6d98302cb6382c3bba3a92cd45cc8cc4a1977be6e945adfd3a7be506050
6
+ metadata.gz: 5952847769f6d7bca3b015d6b9853d29726d1a47d0d24390ffd1ab52ac1cb663efd9abd97bdb2c0f7863683ea7c30287e80804a7f5cdf9dc770cf838330a34b6
7
+ data.tar.gz: d9c508902611e6716e14e07813dd9ed1057db8d2e09306134d1d39afd06bd574461e82fef3afb20b2d5b2b807dee33182e7f8dff1fa830a00f730905c40e1ab8
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.53.0'.freeze
4
+ VERSION = '0.54.0'.freeze
5
5
  end
6
6
  end
@@ -28,10 +28,18 @@ module Kitchen
28
28
  if [ ! $(which ansible) ]; then
29
29
  #{install_epel_repo}
30
30
  #{sudo_env('yum-config-manager')} --enable epel/x86_64
31
- #{sudo_env('yum')} -y install #{ansible_package_name} git
32
- #{sudo_env('alternatives')} --set python /usr/bin/python2.6
33
- #{sudo_env('yum')} clean all
34
- #{sudo_env('yum')} install yum-python26 -y
31
+ #{sudo_env('yum')} -y install git
32
+
33
+ if `grep -q "Amazon Linux AMI" /etc/os-release`; then
34
+ ## Amazon Linux 1
35
+ #{sudo_env('yum')} -y install #{ansible_package_name}
36
+ #{sudo_env('alternatives')} --set python /usr/bin/python2.6
37
+ #{sudo_env('yum')} clean all
38
+ #{sudo_env('yum')} install yum-python26 -y
39
+ else
40
+ ## Amazon Linux 2
41
+ #{sudo_env('amazon-linux-extras')} install -y ansible2
42
+ fi
35
43
  fi
36
44
  INSTALL
37
45
  end
@@ -63,7 +63,11 @@ module Kitchen
63
63
  ## later versions require interaction from user, so we must specify --yes
64
64
  ## First try with -y flag, else if it fails, try without.
65
65
  ## "add-apt-repository: error: no such option: -y" is returned but is ok to ignore, we just retry
66
- #{sudo_env('add-apt-repository')} -y #{@config[:ansible_apt_repo]} || #{sudo_env('add-apt-repository')} #{@config[:ansible_apt_repo]}
66
+ ## There is no official Ubuntu 20.04 ansible release in the ppa, but Ubuntu has a package with the latest 2.9 Ansible
67
+ ## This "fixes" issue #321 for now
68
+ if ! `grep -q 'VERSION_ID=\"20.04\"' /etc/os-release`; then
69
+ #{sudo_env('add-apt-repository')} -y #{@config[:ansible_apt_repo]} || #{sudo_env('add-apt-repository')} #{@config[:ansible_apt_repo]}
70
+ fi
67
71
  fi
68
72
  #{sudo_env('apt-get')} update
69
73
  #{sudo_env('apt-get')} -y install ansible#{ansible_debian_version}
@@ -90,7 +90,7 @@ module Kitchen
90
90
  if [ ! $(which ansible) ]; then
91
91
  if [ -f /etc/fedora-release ]; then
92
92
  #{Kitchen::Provisioner::Ansible::Os::Fedora.new('fedora', config).install_command}
93
- elif [ -f /etc/system-release ] && [ `grep -q 'Amazon Linux' /etc/system-release` ]; then
93
+ elif [ -f /etc/system-release ] && `grep -q 'Amazon Linux' /etc/system-release`; then
94
94
  #{Kitchen::Provisioner::Ansible::Os::Amazon.new('amazon', config).install_command}
95
95
  elif [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
96
96
  #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_command}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.53.0
4
+ version: 0.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2020-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec