Class: Kitchen::Provisioner::Ansible::Os::Suse

Inherits:
Kitchen::Provisioner::Ansible::Os show all
Defined in:
lib/kitchen/provisioner/ansible/os/suse.rb

Instance Attribute Summary

Attributes inherited from Kitchen::Provisioner::Ansible::Os

#name

Instance Method Summary collapse

Methods inherited from Kitchen::Provisioner::Ansible::Os

#initialize, make, #sudo, #sudo_env

Constructor Details

This class inherits a constructor from Kitchen::Provisioner::Ansible::Os

Instance Method Details

#install_commandObject



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/kitchen/provisioner/ansible/os/suse.rb', line 25

def install_command
  <<-INSTALL

  if [ ! $(which ansible) ]; then
    #{sudo_env('zypper')} ar #{@config[:python_sles_repo]}
    #{sudo_env('zypper')} ar #{@config[:ansible_sles_repo]}
    #{update_packages_command}
    #{sudo_env('zypper')} --non-interactive install ansible
  fi
  INSTALL
end

#update_packages_commandObject



37
38
39
# File 'lib/kitchen/provisioner/ansible/os/suse.rb', line 37

def update_packages_command
  @config[:update_package_repos] ? "#{sudo_env('zypper')} --gpg-auto-import-keys ref" : nil
end