1
0

update
Some checks failed
/ deploy (push) Failing after 18s

This commit is contained in:
cuqmbr 2025-06-23 18:56:52 +03:00
parent e844e07877
commit e305d52f8c
Signed by: cuqmbr
GPG Key ID: 0AA446880C766199

View File

@ -15,31 +15,35 @@ jobs:
# repository: cuqmbr/homelab
- name: Clone homelab git repository
run: git clone https://git.cuqmbr.xyz/cuqmbr/homelab.git --depth 1 --branch main --single-branch
# - name: Change directory into ansible
# run: cd ./homelab/ansible
- name: Run playbook
uses: dawidd6/action-ansible-playbook@v4
with:
playbook: 20_main_page.yml
directory: ./homelab/ansible
# configuration: |
# [defaults]
# callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
# stdout_callback = yaml
# nocows = false
key: ${{secrets.ANSIBLE_SSH_KEY}}
# inventory: |
# [all]
# example.com
#
# [group1]
# example.com
# known_hosts: |
# example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
# vault_password: ${{secrets.VAULT_PASSWORD}}
# requirements: galaxy-requirements.yml
options: |
-u gitea-actions
--ssh-common-args "-o ProxyCommand='ssh -p 22 -W %h:%p -q ${user}@bastion.cuqmbr.home'"
-b --become-method doas
-i inventories/dev/hosts.yml
- name: Install ansible
run: apt-get update && apt-get install ansible-core
- name: Create ssh key file
run: echo -n ${{secrets.ANSIBLE_SSH_KEY}} > key
- name: Run ansible playbook
run: export user="ansible"; ansible-playbook -u "${user}" --ssh-common-args "-o ProxyCommand='ssh -p 22 -W %h:%p -q ${user}@bastion.cuqmbr.home'" --private-key key -b --become-method doas -i ./homelab/ansible/inventories/dev/hosts.yml ./homelab/ansible/00_init.yml
# - name: Run ansible playbook
# uses: dawidd6/action-ansible-playbook@v4
# with:
# playbook: 20_main_page.yml
# directory: ./homelab/ansible
# # configuration: |
# # [defaults]
# # callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
# # stdout_callback = yaml
# # nocows = false
# key: ${{secrets.ANSIBLE_SSH_KEY}}
# # inventory: |
# # [all]
# # example.com
# #
# # [group1]
# # example.com
# # known_hosts: |
# # example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
# # vault_password: ${{secrets.VAULT_PASSWORD}}
# # requirements: galaxy-requirements.yml
# options: |
# -u gitea-actions
# --ssh-common-args "-o ProxyCommand='ssh -p 22 -W %h:%p -q ${user}@bastion.cuqmbr.home'"
# -b --become-method doas
# -i inventories/dev/hosts.yml