2025-03-08 18:06:19 +01:00
|
|
|
on: push
|
2025-03-08 18:05:32 +01:00
|
|
|
jobs:
|
|
|
|
|
checkout:
|
|
|
|
|
runs-on: docker
|
2025-03-10 18:59:26 +01:00
|
|
|
# container:
|
|
|
|
|
# image: cytopia/ansible
|
2025-03-08 18:05:32 +01:00
|
|
|
steps:
|
|
|
|
|
- name: checkóut
|
|
|
|
|
uses: actions/checkout@v4
|
2025-03-10 18:57:05 +01:00
|
|
|
|
|
|
|
|
# install ansbile
|
|
|
|
|
- name: Install Ansible
|
|
|
|
|
run: |
|
|
|
|
|
apt update -y
|
|
|
|
|
apt install python3-pip -y
|
|
|
|
|
python3 -m pip install ansible
|
|
|
|
|
python3 -m pip install ansible-lint
|
2025-03-08 18:05:32 +01:00
|
|
|
|
|
|
|
|
- name: Run playbook
|
2025-03-08 18:07:41 +01:00
|
|
|
uses: https://github.com/dawidd6/action-ansible-playbook@v3
|
2025-03-08 18:05:32 +01:00
|
|
|
with:
|
|
|
|
|
# Required, playbook filepath
|
|
|
|
|
playbook: deploy.yml
|
|
|
|
|
# Optional, directory where playbooks live
|
|
|
|
|
directory: ./
|
|
|
|
|
# Optional, ansible configuration file content (ansible.cfg)
|
|
|
|
|
configuration: |
|
|
|
|
|
[defaults]
|
|
|
|
|
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
|
|
|
|
|
stdout_callback = yaml
|
|
|
|
|
nocows = false
|
|
|
|
|
# Optional, SSH private key
|
|
|
|
|
key: ${{secrets.SSH_PRIVATE_KEY}}
|
|
|
|
|
# Optional, additional flags to pass to ansible-playbook
|
|
|
|
|
options: |
|
2025-03-10 19:24:25 +01:00
|
|
|
--inventory inventory
|
2025-03-12 11:52:56 +01:00
|
|
|
-u anyops
|
2025-03-13 10:43:20 +01:00
|
|
|
--extra-vars DOCKER_IO_PASSWORD=${{secrets.DOCKER_IO_PASSWORD}}
|
2025-03-10 21:49:25 +01:00
|
|
|
#--verbose
|