This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/playbooks/thecloud.yml

26 lines
696 B
YAML
Raw Normal View History

---
- name: Create databases and NFS shares
hosts: thecloud
handlers:
- name: reload nfs
systemd:
name: nfs-kernel-server
state: restarted
tasks:
- name: Create nfs shares
with_items: "{{ nfs_shares }}"
copy:
dest: "/etc/exports.d/{{ item.name }}.exports"
content: "{{ item.path }} *(rw,sync,no_subtree_check,no_root_squash)"
notify: reload nfs
- name: Create databases
with_items: "{{ database_passwords | dict2items }}"
include_role:
2023-06-17 12:26:35 +00:00
name: postgresql_database
vars:
database_name: "{{ item.key }}"
2023-06-17 12:26:35 +00:00
database_user: "{{ item.key }}"
database_password: "{{ item.value }}"