Module: VagrantPlugins::Ansible::Cap::Guest::Debian::AnsibleInstall

Defined in:
lib/cap/guest/debian/ansible_install.rb

Class Method Summary collapse

Class Method Details

.ansible_install(machine) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cap/guest/debian/ansible_install.rb', line 9

def self.ansible_install(machine)

install_backports_if_wheezy_release = <<INLINE_CRIPT
CODENAME=`lsb_release -cs`
if [ x$CODENAME == 'xwheezy' ]; then
  echo 'deb http://http.debian.net/debian wheezy-backports main' > /etc/apt/sources.list.d/wheezy-backports.list
fi
INLINE_CRIPT

  machine.communicate.sudo(install_backports_if_wheezy_release)
  machine.communicate.sudo("apt-get update -y -qq")
  machine.communicate.sudo("apt-get install -y -qq ansible")
end