kitchen-ansible 0.46.6 → 0.46.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a7fcd96426d283605167691a5415456a5b457ba
4
- data.tar.gz: 0bffecdbcbcd84f91728db125f9ec9c262b2d9fd
3
+ metadata.gz: 8e3636006b7b01ceb1ddd0217009d47067174d6e
4
+ data.tar.gz: 469e713e76640d0f12101528b69a56b778bfd12a
5
5
  SHA512:
6
- metadata.gz: 5f0ce123e2e1bf2a96e8cadb517ae7d5703497db477064e9c8d857fef13509138144cf828f218e5e0bf86dfc019fe7bde936c75873818a0331641ca95e6e9603
7
- data.tar.gz: f54ff1cdce42952a088f4ba34f20f98c1bd0427abff6a52a9460cba232c62f57af38ca9ccb88208d40acfbaaf30f90bc61a326651e9335fa2c269da6b1830bcc
6
+ metadata.gz: 9e029e313ee88469b8793830f2f963133311911193d437905385ab27d2cbb0ed3ef1de94e57132a9ba8827ebe1a86e7375a5ebfbf226339ffc446a83e4e9092d
7
+ data.tar.gz: cc831046363a83a3930437c2be84c0ca4b7db170022f64cd0183941f35955a5063c3fa289568a526ef742eba6b1a8d7cf4c387f07158afd16da4b5b06441606d
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.46.6'.freeze
4
+ VERSION = '0.46.7'.freeze
5
5
  end
6
6
  end
@@ -112,24 +112,35 @@ module Kitchen
112
112
  result
113
113
  end
114
114
 
115
+ def detect_debug
116
+ if ARGV.include? 'debug'
117
+ result = "1"
118
+ else
119
+ result = "/dev/null"
120
+ end
121
+ return result
122
+ end
123
+
115
124
  def install_windows_support
116
125
  install = ''
117
126
  if require_windows_support
118
- install << <<-INSTALL
119
- if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
120
- #{sudo_env('yum')} -y install python-devel krb5-devel krb5-libs krb5-workstation gcc
121
- else
122
- if [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
123
- #{sudo_env('zypper')} ar #{python_sles_repo}
124
- #{sudo_env('zypper')} --non-interactive install python python-devel krb5-client pam_krb5
125
- else
126
- #{sudo_env('apt-get')} -y install python-dev libkrb5-dev build-essential
127
- fi
128
- fi
129
- #{export_http_proxy}
130
- #{sudo_env('easy_install')} pip
131
- #{sudo_env('pip')} install pywinrm kerberos
132
- INSTALL
127
+ info ("Installing Windows Support")
128
+ info ("Installing pip")
129
+ install << <<-INSTALL
130
+ if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
131
+ #{sudo_env('yum')} -y install python-devel krb5-devel krb5-libs krb5-workstation gcc > #{detect_debug}
132
+ else
133
+ if [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
134
+ #{sudo_env('zypper')} ar #{python_sles_repo} > #{detect_debug}
135
+ #{sudo_env('zypper')} --non-interactive install python python-devel krb5-client pam_krb5 > #{detect_debug}
136
+ else
137
+ #{sudo_env('apt-get')} -y install python-dev libkrb5-dev build-essential > #{detect_debug}
138
+ fi
139
+ fi
140
+ #{export_http_proxy}
141
+ #{sudo_env('easy_install')} pip > #{detect_debug}
142
+ #{sudo_env('pip')} install pywinrm kerberos > #{detect_debug}
143
+ INSTALL
133
144
  end
134
145
  install
135
146
  end
@@ -156,9 +167,9 @@ module Kitchen
156
167
  if [ -n "$rhelversion6" ] || [ -n "$rhelversion7" ]; then
157
168
  if [ ! -d "/opt/rh/ruby200" ]; then
158
169
  echo "-----> Installing ruby200 SCL in CentOS6/CentOS7/RHEL6/RHEL7 to install busser to run tests"
159
- #{sudo_env('yum')} install -y centos-release-scl
160
- #{sudo_env('yum')} install -y ruby200
161
- #{sudo_env('yum')} install -y ruby200-ruby-devel
170
+ #{sudo_env('yum')} install -y centos-release-scl > #{detect_debug}
171
+ #{sudo_env('yum')} install -y ruby200 > #{detect_debug}
172
+ #{sudo_env('yum')} install -y ruby200-ruby-devel > #{detect_debug}
162
173
  echo "-----> Enabling ruby200"
163
174
  source /opt/rh/ruby200/enable
164
175
  echo "/opt/rh/ruby200/root/usr/lib64" | sudo tee -a /etc/ld.so.conf
@@ -168,21 +179,21 @@ module Kitchen
168
179
  fi
169
180
  else
170
181
  if [ ! $(which ruby) ]; then
171
- #{update_packages_redhat_cmd}
172
- #{sudo_env('yum')} -y install ruby ruby-devel
182
+ #{update_packages_redhat_cmd} > #{detect_debug}
183
+ #{sudo_env('yum')} -y install ruby ruby-devel > #{detect_debug}
173
184
  fi
174
185
  fi
175
186
  else
176
- #{update_packages_redhat_cmd}
177
- #{sudo_env('yum')} -y install ruby ruby-devel gcc
187
+ #{update_packages_redhat_cmd} > #{detect_debug}
188
+ #{sudo_env('yum')} -y install ruby ruby-devel gcc > #{detect_debug}
178
189
  fi
179
190
  elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
180
- #{update_packages_suse_cmd}
181
- #{sudo_env('zypper')} --non-interactive install ruby ruby-devel ca-certificates ca-certificates-cacert ca-certificates-mozilla
191
+ #{update_packages_suse_cmd} > #{detect_debug}
192
+ #{sudo_env('zypper')} --non-interactive install ruby ruby-devel ca-certificates ca-certificates-cacert ca-certificates-mozilla > #{detect_debug}
182
193
  #{sudo_env('gem')} sources --add https://rubygems.org/
183
194
  elif [ -f /etc/alpine-release ] || [ -d /etc/apk ]; then
184
195
  #{update_packages_alpine_cmd}
185
- #{sudo_env('apk')} add ruby ruby-dev ruby-io-console ca-certificates
196
+ #{sudo_env('apk')} add ruby ruby-dev ruby-io-console ca-certificates > #{detect_debug}
186
197
  else
187
198
  if [ ! $(which ruby) ]; then
188
199
  #{update_packages_debian_cmd}
@@ -203,14 +214,14 @@ module Kitchen
203
214
  PACKAGES="ruby ruby-dev"
204
215
  fi
205
216
  fi
206
- #{sudo_env('apt-get')} -y install $PACKAGES
217
+ #{sudo_env('apt-get')} -y install $PACKAGES > #{detect_debug}
207
218
  if [ $debvers -eq 6 ]; then
208
219
  # in squeeze we need to update alternatives
209
220
  # for enable ruby1.9.1
210
221
  ALTERNATIVES_STRING="--install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 10 --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.1.1.gz --slave /usr/bin/erb erb /usr/bin/erb1.9.1 --slave /usr/bin/gem gem /usr/bin/gem1.9.1 --slave /usr/bin/irb irb /usr/bin/irb1.9.1 --slave /usr/bin/rake rake /usr/bin/rake1.9.1 --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 --slave /usr/bin/testrb testrb /usr/bin/testrb1.9.1 --slave /usr/share/man/man1/erb.1.gz erb.1.gz /usr/share/man/man1/erb1.9.1.1.gz --slave /usr/share/man/man1/gem.1.gz gem.1.gz /usr/share/man/man1/gem1.9.1.1.gz --slave /usr/share/man/man1/irb.1.gz irb.1.gz /usr/share/man/man1/irb1.9.1.1.gz --slave /usr/share/man/man1/rake.1.gz rake.1.gz /usr/share/man/man1/rake1.9.1.1.gz --slave /usr/share/man/man1/rdoc.1.gz rdoc.1.gz /usr/share/man/man1/rdoc1.9.1.1.gz --slave /usr/share/man/man1/testrb.1.gz testrb.1.gz /usr/share/man/man1/testrb1.9.1.1.gz"
211
222
  #{sudo_env('update-alternatives')} $ALTERNATIVES_STRING
212
223
  # need to update gem tool because gem 1.3.7 from ruby 1.9.1 is broken
213
- #{sudo_env('gem')} install rubygems-update
224
+ #{sudo_env('gem')} install rubygems-update > #{detect_debug}
214
225
  #{sudo_env('/var/lib/gems/1.9.1/bin/update_rubygems')}
215
226
  # clear local gem cache
216
227
  #{sudo_env('rm')} -r /home/vagrant/.gem
@@ -227,7 +238,7 @@ module Kitchen
227
238
  echo "-----> Installing Chef Omnibus to install busser to run tests"
228
239
  #{export_http_proxy}
229
240
  do_download #{chef_url} /tmp/install.sh
230
- #{sudo_env('sh')} /tmp/install.sh
241
+ #{sudo_env('sh')} /tmp/install.sh > #{detect_debug}
231
242
  fi
232
243
  INSTALL
233
244
  end
@@ -466,30 +477,30 @@ module Kitchen
466
477
  end
467
478
 
468
479
  def install_ansible_from_source_command
469
- <<-INSTALL
470
- if [ ! -d #{config[:root_path]}/ansible ]; then
471
- if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
472
- #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_epel_repo}
473
- #{update_packages_redhat_cmd}
474
- #{sudo_env('yum')} -y install libselinux-python python2-devel git python-setuptools python-setuptools-dev libffi-devel libssl-devel
475
- else
476
- if [ -f /etc/SUSE-brand ] || [ -f /etc/SuSE-release ]; then
477
- #{sudo_env('zypper')} ar #{python_sles_repo}
478
- #{update_packages_suse_cmd}
479
- #{sudo_env('zypper')} --non-interactive install python python-devel git python-setuptools python-pip python-six libyaml-devel libffi-devel libopenssl-devel
480
+ <<-INSTALL
481
+ if [ ! -d #{config[:root_path]}/ansible ]; then
482
+ if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
483
+ #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_epel_repo}
484
+ #{update_packages_redhat_cmd} > #{detect_debug}
485
+ #{sudo_env('yum')} -y install libselinux-python python2-devel git python-setuptools python-setuptools-dev libffi-devel libssl-devel > #{detect_debug}
480
486
  else
481
- #{update_packages_debian_cmd}
482
- #{sudo_env('apt-get')} -y install git python python-setuptools build-essential python-dev libffi-dev libssl-dev
487
+ if [ -f /etc/SUSE-brand ] || [ -f /etc/SuSE-release ]; then
488
+ #{sudo_env('zypper')} ar #{python_sles_repo} > #{detect_debug}
489
+ #{update_packages_suse_cmd} > #{detect_debug}
490
+ #{sudo_env('zypper')} --non-interactive install python python-devel git python-setuptools python-pip python-six libyaml-devel libffi-devel libopenssl-devel > #{detect_debug}
491
+ else
492
+ #{update_packages_debian_cmd} > #{detect_debug}
493
+ #{sudo_env('apt-get')} -y install git python python-setuptools build-essential python-dev libffi-dev libssl-dev > #{detect_debug}
494
+ fi
483
495
  fi
484
- fi
485
496
 
486
- #{export_http_proxy}
487
- git clone #{config[:ansible_source_url]} --recursive #{config[:root_path]}/ansible #{install_source_rev}
488
- #{sudo_env('easy_install')} pip
489
- #{sudo_env('pip')} install -U setuptools
490
- #{sudo_env('pip')} install six paramiko PyYAML Jinja2 httplib2
491
- fi
492
- INSTALL
497
+ #{export_http_proxy}
498
+ git clone #{config[:ansible_source_url]} --recursive #{config[:root_path]}/ansible #{install_source_rev}
499
+ #{sudo_env('easy_install')} pip > #{detect_debug}
500
+ #{sudo_env('pip')} install -U setuptools > #{detect_debug}
501
+ #{sudo_env('pip')} install six paramiko PyYAML Jinja2 httplib2 > #{detect_debug}
502
+ fi
503
+ INSTALL
493
504
  end
494
505
 
495
506
  def install_ansible_from_pip_command
@@ -498,30 +509,29 @@ module Kitchen
498
509
  else
499
510
  ansible_version = "==#{config[:ansible_version]}"
500
511
  end
512
+ <<-INSTALL
513
+ if [ ! $(which ansible) ]; then
514
+ if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
515
+ #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_epel_repo}
516
+ #{update_packages_redhat_cmd} > #{detect_debug}
517
+ #{sudo_env('yum')} -y install libselinux-python python2-devel git python-setuptools python-setuptools-dev libffi-devel openssl-devel gcc > #{detect_debug}
518
+ else
519
+ if [ -f /etc/SUSE-brand ] || [ -f /etc/SuSE-release ]; then
520
+ #{sudo_env('zypper')} ar #{python_sles_repo} > #{detect_debug}
521
+ #{update_packages_suse_cmd} > #{detect_debug}
522
+ #{sudo_env('zypper')} --non-interactive install python python-devel git python-setuptools python-pip python-six libyaml-devel libffi-devel libopenssl-devel > #{detect_debug}
523
+ else
524
+ #{update_packages_debian_cmd} > #{detect_debug}
525
+ #{sudo_env('apt-get')} -y install git python python-setuptools build-essential python-dev libffi-dev libssl-dev > #{detect_debug}
526
+ fi
527
+ fi
501
528
 
502
- <<-INSTALL
503
- if [ ! $(which ansible) ]; then
504
- if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
505
- #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_epel_repo}
506
- #{update_packages_redhat_cmd}
507
- #{sudo_env('yum')} -y install libselinux-python python2-devel git python-setuptools python-setuptools-dev libffi-devel openssl-devel gcc
508
- else
509
- if [ -f /etc/SUSE-brand ] || [ -f /etc/SuSE-release ]; then
510
- #{sudo_env('zypper')} ar #{python_sles_repo}
511
- #{update_packages_suse_cmd}
512
- #{sudo_env('zypper')} --non-interactive install python python-devel git python-setuptools python-pip python-six libyaml-devel libffi-devel libopenssl-devel
513
- else
514
- #{update_packages_debian_cmd}
515
- #{sudo_env('apt-get')} -y install git python python-setuptools build-essential python-dev libffi-dev libssl-dev
516
- fi
529
+ #{export_http_proxy}
530
+ #{sudo_env('easy_install')} pip > #{detect_debug}
531
+ #{sudo_env('pip')} install -U setuptools > #{detect_debug}
532
+ #{sudo_env('pip')} install ansible#{ansible_version} > #{detect_debug}
517
533
  fi
518
-
519
- #{export_http_proxy}
520
- #{sudo_env('easy_install')} pip
521
- #{sudo_env('pip')} install -U setuptools
522
- #{sudo_env('pip')} install ansible#{ansible_version}
523
- fi
524
- INSTALL
534
+ INSTALL
525
535
  end
526
536
 
527
537
  def install_omnibus_command
@@ -537,7 +547,7 @@ module Kitchen
537
547
  echo "-----> Installing Ansible Omnibus"
538
548
  #{export_http_proxy}
539
549
  do_download #{config[:ansible_omnibus_url]} /tmp/ansible_install.sh
540
- #{sudo_env(config[:shell_command])} /tmp/ansible_install.sh #{version}
550
+ #{sudo_env(config[:shell_command])} /tmp/ansible_install.sh #{version} > #{detect_debug}
541
551
  fi
542
552
  INSTALL
543
553
  end
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.46.6
4
+ version: 0.46.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-07 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen