Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MUNI-KYPO-CRP
devops
kypo-crp-deployment
Commits
2236716c
Verified
Commit
2236716c
authored
Jan 31, 2022
by
Tomáš Sapák
Browse files
Run Ansible provisioning inside VM
parent
118e0e34
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
2236716c
...
...
@@ -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
...
...
Vagrantfile
View file @
2236716c
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment