This commit is contained in:
2026-03-14 18:25:44 +01:00
parent a2f75cdafd
commit 99fc6ba04c
19 changed files with 703 additions and 0 deletions

44
tasks/facts.yml Normal file
View File

@@ -0,0 +1,44 @@
---
- name: Ensure facts directory exists
ansible.builtin.file:
path: /etc/ansible/facts.d
state: directory
owner: root
group: root
mode: "0755"
- name: Write n8n facts
ansible.builtin.copy:
dest: "{{ n8n_fact_path }}"
owner: root
group: root
mode: "0644"
content: |
{{ {
"name": n8n_name,
"deploy_type": n8n_site.deploy_type,
"path": n8n_home,
"user": n8n_user,
"group": n8n_group,
"systemd": n8n_systemd,
"host": n8n_host,
"protocol": n8n_protocol,
"listen_port": n8n_listen_port,
"webhook_url": n8n_webhook_url,
"image": (
n8n_docker_image if n8n_site.deploy_type == "docker" else ""
),
"repo": (
n8n_repo_path if n8n_site.deploy_type == "repo" else ""
),
"package": (
n8n_package_name if n8n_site.deploy_type == "package" else ""
),
"db": {
"host": n8n_db_host,
"port": n8n_db_port,
"name": n8n_db_name,
"user": n8n_db_user,
"type": n8n_db_kind
}
} | to_nice_json }}