Skip to content

Commit

Permalink
feat: run ocis init if needed and enable service
Browse files Browse the repository at this point in the history
  • Loading branch information
karras committed Nov 11, 2023
1 parent ebb2e0b commit 1ea6202
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
group: root
mode: '0755'

- name: Configure ocis environment file
- name: Configure ocis environment config
ansible.builtin.template:
src: etc/ocis/ocis.env.j2
dest: /etc/ocis/ocis.env
Expand All @@ -67,3 +67,19 @@
group: root
mode: '0644'
notify: Reload systemd daemon

- name: Initialize ocis yaml config
ansible.builtin.command:
cmd: 'ocis init --insecure {{ ocis_env_insecure }} --config-path {{ ocis_config_path }}'
creates: '{{ ocis_config_path }}/ocis.yaml'
become: true
become_user: '{{ ocis_user }}'

# Service related tasks do not work well in molecule idempotence tests
- name: Enable ocis
ansible.builtin.service:
name: ocis
enabled: true
state: started
tags:
- molecule-idempotence-notest

0 comments on commit 1ea6202

Please sign in to comment.