mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 08:30:59 +00:00
Update Ansible Workflows
This commit is contained in:
38
.github/workflows/ansible_kira_restart.yml
vendored
Normal file
38
.github/workflows/ansible_kira_restart.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🏗️ Ansible | Restart Kira
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Restart'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
kira-restart:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Restart Kira
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/restart-kira.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
37
.github/workflows/ansible_ping.yml
vendored
Normal file
37
.github/workflows/ansible_ping.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: 🏗️ Ansible | Ping
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Ping'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
ping:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
|
||||
- name: Ping
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/ping.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
|
||||
38
.github/workflows/ansible_setup_server.yml
vendored
Normal file
38
.github/workflows/ansible_setup_server.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🏗️ Ansible | Setup Server
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Setup'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
setup-server:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Setup Server
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/setup-server.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
38
.github/workflows/ansible_start_server.yml
vendored
Normal file
38
.github/workflows/ansible_start_server.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🏗️ Ansible | Start Server
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Start'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
start-server:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Start Server
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/start-server.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
38
.github/workflows/ansible_stop_server.yml
vendored
Normal file
38
.github/workflows/ansible_stop_server.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🏗️ Ansible | Stop Server
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Stop'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
stop-server:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Stop Server
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/stop-server.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
38
.github/workflows/ansible_update_server.yml
vendored
Normal file
38
.github/workflows/ansible_update_server.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🏗️ Ansible | Update Server
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Environment to Update'
|
||||
type: environment
|
||||
required: true
|
||||
default: Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./ansible
|
||||
|
||||
jobs:
|
||||
update-server:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{inputs.environment}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Inject secrets
|
||||
run: 'echo "$SECRETS_YML" > variables/secrets.yml'
|
||||
shell: bash
|
||||
env:
|
||||
SECRETS_YML: ${{secrets.SECRETS_YML}}
|
||||
SUDO_PASSWORD: ${{secrets.SUDO_PASSWORD}}
|
||||
|
||||
- name: Update Server
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
playbook: playbooks/update-server.yml
|
||||
requirements: requirements.yml
|
||||
key: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||
options: |
|
||||
--inventory ./inventories/civmc-${{inputs.environment}}.yml
|
||||
-e "ansible_become_password=${{secrets.SUDO_PASSWORD}}"
|
||||
Reference in New Issue
Block a user