-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.11 KB
/
deploy_ovpn_server.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
35
36
37
38
name: Deploy OVPN server
on:
workflow_dispatch:
inputs:
server_ip:
description: Server IP
required: true
type: string
client_tag:
description: Client tag
required: true
type: string
jobs:
setup-runner:
runs-on: ubuntu-latest
name: Setup runner
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
- name: Install runner dependencies
run: |
python -m pip install --upgrade pip
pip install -r runner-packages.txt
deploy-ovpn:
runs-on: ubuntu-latest
name: Deploy OpenVPN server
needs: [setup-runner]
steps:
- uses: actions/checkout@v3
- name: Configure Ansible
run: |
echo "ANSIBLE_CONFIG=ansible.cfg" >> $GITHUB_ENV
- name: Run playbook
run: |
ansible-playbook playbook.yml -i ${{ inputs.server_ip }}, -e ansible_user=root -e ansible_ssh_pass=${{ secrets.SSH_PASS }} -e client_tag=${{ inputs.client_tag }} -e tg_bot_token=${{ secrets.TG_BOT_TOKEN }} -e tg_chat_id=${{ secrets.TG_CHAT_ID }} -vv