Verified Commit 2236716c authored by Tomáš Sapák's avatar Tomáš Sapák
Browse files

Run Ansible provisioning inside VM

parent 118e0e34
......@@ -101,7 +101,7 @@ bcrypt | `pip3 install bcrypt` | 3.2+
```shell
$ vagrant box update
$ EXTRA_VARS=./local-demo-extra-vars.yml,./local-demo-secrets.yml vagrant up
$ EXTRA_VARS=/vagrant/local-demo-extra-vars.yml,/vagrant/local-demo-secrets.yml vagrant up
```
## Use KYPO
......
......@@ -11,8 +11,17 @@ PLAYBOOK_ANSIBLE='provisioning/playbook.yml'
OIDC_LOCAL_PROVIDER_EXTRA_VARS="oidc-local-provider.yml"
GUACAMOLE_EXTRA_VARS="guacamole-remote-desktop.yml"
$deps = <<SCRIPT
apt update
apt install python3-pip -y
pip3 install ansible
ansible-galaxy collection install community.docker
apt install python3-passlib -y
pip3 install bcrypt
SCRIPT
def ansible_provision(config, playbook, raw_arguments)
config.vm.provision :ansible do |provisioner|
config.vm.provision :ansible_local do |provisioner|
provisioner.compatibility_mode = "2.0"
provisioner.playbook = playbook
provisioner.galaxy_roles_path = 'provisioning/roles_required'
......@@ -31,7 +40,9 @@ Vagrant.configure("2") do |config|
vb.memory = 8192
vb.cpus = 4
end
config.vm.provision "shell", inline: $deps
ansible_provision(config, DOCKER_ANSIBLE, raw_arguments)
ansible_provision(config, OIDC_ANSIBLE, raw_arguments)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment