-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re- adding vagrant as provisioner in test
It can be really stressful dealing with docker when you want to containerize a service that makes use of systemd
- Loading branch information
1 parent
a3bbed1
commit 1ef616e
Showing
9 changed files
with
83 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ coverage.xml | |
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
.vagrant | ||
|
||
# Translations | ||
*.mo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.provision "ansible_local" do |ansible| | ||
ansible.playbook = "tests/test.yml" | ||
ansible.verbose = "vvv" | ||
ansible.galaxy_roles_path = ".vagrant/roles" | ||
ansible.galaxy_role_file = "requirements.yml" | ||
ansible.become = true | ||
ansible.galaxy_command = "sudo ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force" | ||
end | ||
|
||
config.vm.provider "virtualbox" do |v| | ||
v.memory = 1024 | ||
v.cpus = 1 | ||
end | ||
|
||
config.vm.network "forwarded_port", guest: 3000, host: 3333 | ||
config.vm.box = "ubuntu/xenial64" | ||
config.ssh.forward_agent = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[defaults] | ||
host_key_checking = False | ||
allow_world_readable_tmpfiles=True | ||
|
||
[ssh_connection] | ||
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ galaxy_info: | |
- name: ubuntu | ||
versions: | ||
- all | ||
|
||
# dependencies: | ||
# - src: weareinteractive.pm2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
- weareinteractive.pm2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,32 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
- name: Pre-install stuff | ||
hosts: all | ||
tasks: | ||
- name: Install python 2 if not there | ||
raw: | | ||
test -e /usr/bin/python || \ | ||
(apt -y update && apt install -y python-minimal) | ||
register: output | ||
changed_when: output.stdout|trim() != "" | ||
- name: Install sudo if not there | ||
raw: | | ||
test -e /usr/bin/sudo || apt install -y sudo | ||
register: output | ||
changed_when: output.stdout|trim() != "" | ||
gather_facts: False | ||
become: True | ||
|
||
- name: Test React role | ||
hosts: all | ||
vars: | ||
express_env_name: "prod" | ||
react_system_user: "express" | ||
express_node_version: 10.x | ||
express_git_url: "https://github.com/onaio/reveal-express" | ||
express_git_version: "master" | ||
express_app_settings: | ||
NODE_ENV: "production" | ||
gather_facts: True | ||
become: True | ||
roles: | ||
- ansible-express | ||
- role: ../.. |