Skip to content
Snippets Groups Projects

PiCloud (NAS) ansible scripts

General

# get dependencies
ansible-galaxy install -r requirements.yml -p roles --ignore-errors

# start vagrant test system
vagrant up

# reprovision test system
vagrant provision

# edit vault file
ansible-vault edit vars/lasersaur.vault.yml

# list all available facts for a host
ansible -m setup hostname

Testing

Installing and starting Vagrant on ArchLinux

Inside the cloned ansible folder, run these commands

CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' \
  GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH \
  vagrant plugin install vagrant-libvirt
sudo systemctl restart libvirtd
vagrant up