Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud_init does not set the hostname of password for newly deployed VM #48

Closed
eddy-resnick opened this issue May 27, 2020 · 4 comments
Closed

Comments

@eddy-resnick
Copy link

Using the ovirt_vm module and the cloud_init parameter to set hostname and root password has no effect on newly created VM from template.
Using Ansible 2.7.18 with the python-ovirt-engine-sdk4-4.3.2-1.el7ev.x86_64 installed.
deploy_vm.yml and role deploy_vm is attached
ovirt_vm-cloud_init.zip

@mnecas
Copy link
Member

mnecas commented May 27, 2020

Thanks for the report will look into it.
(original issue ansible/ansible#69580)

@mnecas
Copy link
Member

mnecas commented Jun 2, 2020

Hi,
checked your role and everything looked fine.
But I was not able to reproduce on (have tried on 2.7.9 and 2.7 latest)
After running the playbook it added the host_name password etc. to the VM even that it was created from a template.
I will leave the issue open and try to look into it once again later.

my task:

    - ovirt_vm:
        auth: "{{ ovirt_auth }}"
        name: test4
        template: test12
        cluster: Default
        cloud_init_persist: True
        cloud_init:
          host_name: "test"
          root_password: "test"
          custom_script: |
            write_files:
             - content: |
                 Hello, world!
               path: /tmp/greeting.txt
               permissions: '0644'

@eddy-resnick
Copy link
Author

eddy-resnick commented Jun 2, 2020 via email

@mnecas
Copy link
Member

mnecas commented Jun 8, 2020

The issue was resolved by adding cloud-init package to the template.

@mnecas mnecas closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants