Does it work when you remove the 'custom_script' section ?

Best Regards,
Strahil Nikolov

On Sat, Nov 27, 2021 at 7:35, Sina Owolabi
<notify.sina@gmail.com> wrote:
No errors at all
Same results again
Screenshot attached for a better view, but this is where it's at right now:
----
      sso: true
        disk_format: raw
        graphical_console:
          protocol:
            - spice
            - vnc
        cloud_init:
          regenerate_ssh_keys: true
          host_name: "{{ vm_fqdn }}"
          dns_search: mydom.internal
          dns_servers: <dns ip1> <dns ip2>
          custom_script: |
            write_files:
            - path: /tmp/setup.sh
              permissions: '0755'
              content: |
                #!/bin/bash
                echo "$(hostname -f)" >> /tmp/myhostname.txt
                ipa-client-install --hostname=`hostname -f` \
                --mkhomedir --domain=services.mydom.internal \
                --realm=SERVICES.MYDOM.INTERNAL  --no-ntp \
                --principal=admin --password=<password> \
                --enable-dns-updates --unattended
          user_name: mydomadmin
          root_password: <password>

    - name: Print vm attributes
      ovirt.ovirt.ovirt_vm_info:
        auth: "{{ ovirt_auth }}"
        pattern: name="{{ vm_fqdn }}"
      register: vm_info
    - debug:
        msg: "{{ vm_info.ovirt_vms[0] }}"

On Sat, Nov 27, 2021 at 12:51 AM Strahil Nikolov <hunter86_bg@yahoo.com> wrote:
>
> yaml is picky...
>
>
> write_files:
>            - path: /tmp/setup.sh
>            permissions: '0755'
>            content: |
>
> permissions & content should be on the same indentation with path:
>
> - path
>  permissions
>  content
>
> What is the error you receive ?
>
>
> Best Regards,
> Strahil Nikolov
>
> On Sat, Nov 27, 2021 at 1:19, Sina Owolabi
> <notify.sina@gmail.com> wrote:
> _______________________________________________
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-leave@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/HLTC34PWJICMOLLVCZBE44XOZG7TGWU7/
>


--

cordially yours,


Sina Owolabi


+2348176469061