Don't prompt for input when installing Ansible
Sets `DEBIAN_FRONTEND=noninteractive` and tells `dpkg` to take the old version of config files when installing Ansible, to prevent hangs waiting for user input. Fixes #10914
This commit is contained in:
parent
d27d7d5a2a
commit
e4ab40393e
|
@ -33,12 +33,12 @@ 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"
|
||||
machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" ansible"
|
||||
end
|
||||
|
||||
def self.pip_setup(machine, pip_install_cmd="")
|
||||
machine.communicate.sudo "apt-get update -y -qq"
|
||||
machine.communicate.sudo "apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev"
|
||||
machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev"
|
||||
Pip::get_pip machine, pip_install_cmd
|
||||
end
|
||||
|
||||
|
|
|
@ -21,13 +21,13 @@ module VagrantPlugins
|
|||
unless machine.communicate.test("test -x \"$(which add-apt-repository)\"")
|
||||
machine.communicate.sudo """
|
||||
apt-get update -y -qq && \
|
||||
apt-get install -y -qq software-properties-common
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq software-properties-common --option \"Dpkg::Options::=--force-confold\"
|
||||
"""
|
||||
end
|
||||
machine.communicate.sudo """
|
||||
add-apt-repository ppa:ansible/ansible -y && \
|
||||
apt-get update -y -qq && \
|
||||
apt-get install -y -qq ansible
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ansible --option \"Dpkg::Options::=--force-confold\"
|
||||
"""
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue