MOAR DEBUG
This commit is contained in:
@@ -153,7 +153,55 @@
|
||||
|
||||
- name: Display debug information
|
||||
ansible.builtin.debug:
|
||||
var: debug_git_info.stdout_lines
|
||||
msg: |
|
||||
Debug Git Information:
|
||||
{{ debug_git_info.stdout }}
|
||||
|
||||
Git Config Result:
|
||||
{{ git_config_result.stdout if git_config_result is defined else 'Not available' }}
|
||||
|
||||
Git Commit Result:
|
||||
{{ git_commit_result.stdout if git_commit_result is defined else 'Not available' }}
|
||||
|
||||
- name: Check if inventory file was created
|
||||
ansible.builtin.stat:
|
||||
path: "inventory/linode_hosts.json"
|
||||
register: inventory_file_check
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Display inventory file status
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Inventory file status:
|
||||
- Path: inventory/linode_hosts.json
|
||||
- Exists: {{ inventory_file_check.stat.exists }}
|
||||
- Size: {{ inventory_file_check.stat.size | default(0) }} bytes
|
||||
- Location: {{ ansible_env.PWD | default('unknown') }}/inventory/linode_hosts.json
|
||||
|
||||
- name: Show current Git status and try manual push
|
||||
ansible.builtin.shell: |
|
||||
echo "=== Current working directory ==="
|
||||
pwd
|
||||
echo "=== Git status ==="
|
||||
git status
|
||||
echo "=== Git log (last commit) ==="
|
||||
git log --oneline -1
|
||||
echo "=== Attempting to push ==="
|
||||
git push origin HEAD 2>&1 || echo "Push failed - check SSH access"
|
||||
register: manual_git_push
|
||||
delegate_to: localhost
|
||||
ignore_errors: true
|
||||
when: inventory_file_check.stat.exists
|
||||
|
||||
- name: Display Git push results
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
Manual Git Push Results:
|
||||
{{ manual_git_push.stdout }}
|
||||
|
||||
Error (if any):
|
||||
{{ manual_git_push.stderr | default('No errors') }}
|
||||
when: manual_git_push is defined
|
||||
|
||||
- name: Initialize Git if needed and configure
|
||||
ansible.builtin.shell: |
|
||||
|
Reference in New Issue
Block a user