Files
ansible/roles/create_folder_structure/tasks/create_postgres_folder_structure.yml
2026-03-10 08:57:20 +01:00

24 lines
750 B
YAML

#- name: create file structure for postgres docker installation
- name: check if directory exists
ansible.builtin.stat:
path: /home/"{{ ansible_user }}"/home-assistant-components
register: ha_comp_folder
- name: create file structure for home-assistant docker installation
ansible.builtin.file:
path: /home/"{{ ansible_user }}"/home-assistant-components
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: "0755"
when: not ha_comp_folder.stat.exists
- name: create subfolder home-assistant
ansible.builtin.file:
path: /home/"{{ ansible_user }}"/home-assistant-components/postgres
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: "0755"