Script to disable/enable all automations right after Startup / Boot?

I have just tried the automation provided by Taras and was happy to see it working! I do have disabled automations so I’ve tried this little modification (so that it only affects enabled ones) and so far it seems it is working as expected (it only re-enables the enabled ones and leaves the disabled ones untouched):

alias: Toggle Automations
description: ""
trigger:
  - platform: homeassistant
    event: start
action:
  - variables:
      all: >
        {{ states.automation | selectattr('state', 'eq', 'on') |
        map(attribute='entity_id')
          | reject('eq', 'automation.toggle_automations') | list }}
  - service: automation.turn_off
    target:
      entity_id: "{{ all }}"
  - delay: "00:00:02"
  - service: automation.turn_on
    target:
      entity_id: "{{ all }}"