Sha256: cc9fa475f1b6bdc2d647d30e329d0c18607450dfae830f3c1d558a1543f200bb

Contents?: true

Size: 1022 Bytes

Versions: 12

Compression:

Stored size: 1022 Bytes

Contents

export DEBIAN_FRONTEND="noninteractive"

<% if !@apt[:multiarch].nil? && (@apt[:multiarch] == false) -%>
rm -fv /etc/dpkg/dpkg.cfg.d/multiarch || true
<% end -%>

apt-get -y update
apt-get -y install apt-transport-https

<% if !@apt[:sources].nil? && @apt[:sources].count > 0 -%>
rm -fv /etc/apt/sources.list || true
<% @apt[:sources].flatten.compact.each do |source| -%>
echo '<%= source %>' | tee -a /etc/apt/sources.list
<% end -%>
apt-get -y update
<% end -%>

<% if !@apt[:install].nil? -%>
<% @apt[:install].flatten.compact.each do |package| -%>
dpkg --status <%= package %> &> /dev/null || apt-get -y install <%= package %>
<% end -%>
<% end -%>

<% if !@apt[:remove].nil? -%>
<% @apt[:remove].flatten.compact.each do |package| -%>
dpkg --status <%= package %> &> /dev/null && apt-get -y remove <%= package %>
<% end -%>
<% end -%>

<% if !@apt[:purge].nil? -%>
<% @apt[:purge].flatten.compact.each do |package| -%>
dpkg --status <%= package %> &> /dev/null && apt-get -y purge <%= package %>
<% end -%>
<% end -%>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
testlab-1.20.6 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.5 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.4 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.3 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.2 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.1 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.20.0 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.19.0 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.18.1 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.18.0 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.17.0 lib/testlab/provisioners/templates/apt/provision.erb
testlab-1.16.1 lib/testlab/provisioners/templates/apt/provision.erb