diff --git a/ansible/.github/workflows/kira-restart.yml b/.github/workflows/ansible_kira_restart.yml similarity index 91% rename from ansible/.github/workflows/kira-restart.yml rename to .github/workflows/ansible_kira_restart.yml index 4984e4165..e341e9cb4 100644 --- a/ansible/.github/workflows/kira-restart.yml +++ b/.github/workflows/ansible_kira_restart.yml @@ -1,4 +1,4 @@ -name: Kira | Restart +name: 🏗️ Ansible | Restart Kira on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: kira-restart: runs-on: ubuntu-latest diff --git a/ansible/.github/workflows/ping.yml b/.github/workflows/ansible_ping.yml similarity index 91% rename from ansible/.github/workflows/ping.yml rename to .github/workflows/ansible_ping.yml index d8c713c5e..0852d5a1a 100644 --- a/ansible/.github/workflows/ping.yml +++ b/.github/workflows/ansible_ping.yml @@ -1,4 +1,4 @@ -name: Ping +name: 🏗️ Ansible | Ping on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: ping: runs-on: ubuntu-latest diff --git a/ansible/.github/workflows/Setup Server.yml b/.github/workflows/ansible_setup_server.yml similarity index 91% rename from ansible/.github/workflows/Setup Server.yml rename to .github/workflows/ansible_setup_server.yml index dbafd6b6d..703e446e3 100644 --- a/ansible/.github/workflows/Setup Server.yml +++ b/.github/workflows/ansible_setup_server.yml @@ -1,4 +1,4 @@ -name: Setup Server +name: 🏗️ Ansible | Setup Server on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: setup-server: runs-on: ubuntu-latest diff --git a/ansible/.github/workflows/Start Server.yml b/.github/workflows/ansible_start_server.yml similarity index 91% rename from ansible/.github/workflows/Start Server.yml rename to .github/workflows/ansible_start_server.yml index 948bce6e3..fb04d2b03 100644 --- a/ansible/.github/workflows/Start Server.yml +++ b/.github/workflows/ansible_start_server.yml @@ -1,4 +1,4 @@ -name: Start Server +name: 🏗️ Ansible | Start Server on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: start-server: runs-on: ubuntu-latest diff --git a/ansible/.github/workflows/Stop Server.yml b/.github/workflows/ansible_stop_server.yml similarity index 91% rename from ansible/.github/workflows/Stop Server.yml rename to .github/workflows/ansible_stop_server.yml index 8e78978ca..1b8a7f2ed 100644 --- a/ansible/.github/workflows/Stop Server.yml +++ b/.github/workflows/ansible_stop_server.yml @@ -1,4 +1,4 @@ -name: Stop Server +name: 🏗️ Ansible | Stop Server on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: stop-server: runs-on: ubuntu-latest diff --git a/ansible/.github/workflows/Update Server.yml b/.github/workflows/ansible_update_server.yml similarity index 91% rename from ansible/.github/workflows/Update Server.yml rename to .github/workflows/ansible_update_server.yml index 34c27af32..d49ec0545 100644 --- a/ansible/.github/workflows/Update Server.yml +++ b/.github/workflows/ansible_update_server.yml @@ -1,4 +1,4 @@ -name: Update Server +name: 🏗️ Ansible | Update Server on: workflow_dispatch: inputs: @@ -8,6 +8,10 @@ on: required: true default: Test +defaults: + run: + working-directory: ./ansible + jobs: update-server: runs-on: ubuntu-latest diff --git a/ansible/LICENSE.txt b/ansible/LICENSE.txt deleted file mode 100644 index 78f216253..000000000 --- a/ansible/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 SoundTech - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/ansible/README.md b/ansible/README.md index e789252ba..32e403710 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -1,10 +1,13 @@ # CivAnsible ## Prerequisites -1. Inventory created -2. Github Settings: environments defined with SSH_KNOWN_HOSTS, SSH_PRIVATE_KEY, SUDO PASSWORD -3. Actions secret defined with SECRETS_YML -4. SINGLE manager node +1. Create a user on the server named `actions` with sudo privileges +2. Create Environments in Github settings with the following environment secrets: + - SSH_KNOWN_HOSTS + - SSH_PRIVATE_KEY + - SUDO_PASSWORD +3. Create a repo scoped secret with the contents of your secrets.yml called SECRETS_YML +4. Create an ansible inventory named after the environment ## TODOs - Private Config