---
- block:

  # Do not try to stop or start the services here (see RSI-1422)

  - name: Delete no_bootstrap_zlog toggle file
    file:
      state: absent
      path: "/etc/zoox/no_bootstrap_zlog"

  - name: Install startup scripts to init
    copy:
      src: "{{ item }}"
      dest: "/etc/init/"
      mode: "755"
    with_items:
      - zsystem.conf
      - zlog.conf

  - name: Enable services
    service:
      name: "{{ item }}"
      enabled: yes
    with_items:
      - zsystem
      - zlog

  become: yes
