diff --git a/tcbsd-provision-playbook.yaml b/tcbsd-provision-playbook.yaml index 4f2c861..a58ef38 100644 --- a/tcbsd-provision-playbook.yaml +++ b/tcbsd-provision-playbook.yaml @@ -5,6 +5,18 @@ - name: Verify connectivity with ping ansible.builtin.ping: + - name: Run PLC mode command + register: plc_mode + changed_when: false + ansible.builtin.command: + cmd: TcSysExe.exe --mode + + - name: Assert that PLC is in CONFIG mode + ansible.builtin.assert: + that: "{{ 'CONFIG' in plc_mode.stdout }}" + fail_msg: "PLC is in RUN mode! Abort!" + quiet: true + - name: Enable FreeBSD packages when: enable_freebsd_packages ansible.builtin.file: