--- - name: Container Setup vars: lxc_base: ansible-alpine3.11 lxc_name: postgresql import_playbook: ../common/tasks/lxc.yml - name: Installing PostgreSQL server hosts: postgresql vars: config_path: /etc/postgresql tasks: - name: Installing the application apk: state: present update_cache: yes name: - postgresql - name: Copying main configuration file copy: src: postgresql.conf owner: postgres group: postgres dest: "{{ config_path }}" mode: '0600' - name: Copying client authentication configuration file copy: src: pg_hba.conf owner: postgres group: postgres dest: "{{ config_path }}" mode: '0600' - name: Ensuring PostgreSQL has been enabled and started service: name: postgresql state: started enabled: yes