---
- name: Edit legal notice on start up message
  hosts: windows
  gather_facts: False

  tasks:
    - name: Updating Legal Notice Title
      win_regedit:
        path: HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System
        name: legalnoticecaption
        data: "{{ title_legal_notice }}"

    - name: Updating Legal Notice Text
      win_regedit:
        path: HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System
        name: legalnoticetext
        data: "{{ text_legal_notice }}"