Skip to content

Commit

Permalink
ENH: require config mode in order to run the provisioning playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLLentz committed Mar 15, 2024
1 parent 6f1924f commit ccc194e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tcbsd-provision-playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ccc194e

Please sign in to comment.