PATH for Vagrant provisioners
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Invalid
|
Low
|
Unassigned |
Bug Description
On Vagrant, trying to do this simple provisioning:
config.vm.provision "shell", inline: <<-SHELL
echo PATH=$PATH
snappy install docker
docker pull errordeveloper/curl
SHELL
Results in:
==> default: stdin: is not a tty
==> default: PATH=/usr/
docker 4 MB [======
==> default: Part Tag Installed Available Fingerprint Active
==> default: docker edge 1.3.3.001 - 60b98945e5fc1d *
==> default: /tmp/vagrant-shell: line 3: docker: command not found
So looks like the way PATH is set, it's would expect snappy to install packages in root's home, but he instals them in ubuntu's home.
I have no problem working around this, but it's just needs fixing. This happen to manifest itself on Vargant, but it's just a more general bug anyway.
Changed in snappy-ubuntu: | |
assignee: | nobody → Ben Howard (utlemming) |
affects: | snappy-ubuntu → snappy |
Changed in snappy: | |
status: | Triaged → Invalid |
The root cause is that the Vagrant user on Snappy is "ubuntu," not root.
So you will need to use "sudo" or switch to the root user. The root
user is not configured for SSH due to security issues, and as a result,
the provisioner will not work against root.