--- - name: Ensure di-timesheet-api is present apt: name: "{{ item }}" state: latest update_cache: yes cache_valid_time: 3600 with_items: - "di-timesheet-api" notify: - restart di-timesheet-api - name: Restrict /etc/di directory file: path: "/etc/di" owner: "root" group: "di-config" mode: "0750" state: directory - name: Template di-timesheet-api config template: src: "timesheet-api.conf.j2" dest: "/etc/di/timesheet-api.conf" owner: "di" group: "di-config" mode: "0640" notify: - restart di-timesheet-api - name: enable di-timesheet-api service: name: "di-timesheet-api" enabled: yes notify: - restart di-timesheet-api