Tramp installs docker with puppet

I am trying to install docker on trusty64 abusive image:

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.hostname = "apps.local"
  config.vm.provision "shell", inline: <<-SHELL
    puppet module install garethr-docker
  SHELL

  config.vm.provision "puppet"
end

      

exhibits /default.pp

include 'docker'

docker::image { 'ubuntu':
  image_tag => 'trusty'
}

      

And the output is vagrant up

:

==> default: Running provisioner: shell...
    default: Running: inline script
==> default: Notice: Preparing to install into /etc/puppet/modules ...
==> default: Notice: Downloading from https://forge.puppetlabs.com ...
==> default: Notice: Installing -- do not interrupt ...
==> default: /etc/puppet/modules
==> default: └─┬ garethr-docker (v5.3.0)
==> default:   β”œβ”€β”€ puppetlabs-apt (v3.0.0)
==> default:   β”œβ”€β”€ puppetlabs-stdlib (v4.17.0)
==> default:   └── stahnma-epel (v1.2.2)
==> default: Running provisioner: puppet...
==> default: Running Puppet with default.pp...
==> default: Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
==> default: Error: Syntax error at 'Variant'; expected ')' at /etc/puppet/modules/apt/manifests/init.pp:6 on node carcosa.local
==> default: Error: Syntax error at 'Variant'; expected ')' at /etc/puppet/modules/apt/manifests/init.pp:6 on node carcosa.local
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

      

Can someone tell me what I am doing wrong?

+3


source to share


2 answers


If your goal is to install docker on a virtual machine, the easiest way is to allow it to roam. Vagrant has a docker-compose device and if not installed it will try to install

This simple Vagrantfile



# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.provision "docker"
end

      

will install docker on trusty64 - the creator has many advantages if you want to work with docker images, etc.

+2


source


The latest version of the puppetlabs-apt module only supports the latest version of puppet

Latest version is compatible with:
 - Puppet Enterprise 2016.5.x, 2016.4.x
 - Puppet >= 4.7.0 < 5.0.0
 - Ubuntu, Debian

      

If you want to do, if working in your example then you need to force install the version supported by puppet 3.x (see https://forge.puppet.com/puppetlabs/apt/1.6.0/changelog )



The next one Vagrantfile

will do the job

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  #config.vm.provision "docker"

  config.vm.hostname = "apps.local"
  config.vm.provision "shell", inline: <<-SHELL
    puppet module install puppetlabs-apt --version 2.4.0
    puppet module install garethr-docker
  SHELL

  config.vm.provision "puppet"
end

      

+4


source







All Articles