--- - hosts: all become: true tasks: - name: Preparation depots ansible.builtin.shell: curl -1sLf 'https://dl.cloudsmith.io/public/isc/stork/cfg/setup/bash.deb.sh' | sudo bash - name: Update apt ansible.builtin.apt: update_cache: yes - name: Installation isc-stork-server postgresql et postgresql-contrib ansible.builtin.apt: pkg: - isc-stork-server - postgresql - postgresql-contrib # - name: Lance la commande de création de la base de donnees stork # ansible.builtin.shell: sudo postgresql-setup --initdb - name : lancement postgres ansible.builtin.service: name: postgresql state: restarted enabled: yes - name: Lance la commande de création de la base de donnees stork ansible.builtin.shell: su postgres --command "stork-tool db-create --db-name {{ stork_db_name }} --db-user {{ stork_db_user }} --db-password {{ stork_db_passwd }}" - name: Generation du fichier de configuration server.env ansible.builtin.template: src: server.env.j2 dest: /etc/stork/server.env notify: - Restart isc-stork-server.service handlers: - name: Restart isc-stork-server.service ansible.builtin.service: name: isc-stork-server.service state: restarted enabled: yes