forked from consuldemocracy/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.18 KB
/
ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: ubuntu
on:
push:
pull_request:
jobs:
ubuntu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
rails_env: [staging, production]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Update system packages
run: sudo apt-get update -y
- name: Install OpenSSH
run: sudo apt-get install -y openssh-server
- name: Install Ansible
run: pip3 install ansible
- name: Create hosts file
run: echo "localhost ansible_connection=local ansible_user=root" > hosts
- name: Generate dummy SSH key
run: ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
- name: Run CONSUL DEMOCRACY installer with Errbit
run: ansible-playbook consul.yml -i hosts --extra-vars "env=${{ matrix.rails_env }} domain=localhost errbit=True"
if: matrix.os == 'ubuntu-20.04'
- name: Run CONSUL DEMOCRACY installer without Errbit
run: ansible-playbook consul.yml -i hosts --extra-vars "env=${{ matrix.rails_env }} domain=localhost errbit=False"
if: matrix.os == 'ubuntu-22.04'