Server IP : 85.214.239.14 / Your IP : 3.137.190.176 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/lib/python3/dist-packages/ansible_collections/ovirt/ovirt/roles/infra/tasks/ |
Upload File : |
--- - name: Main block block: - name: Check if mandatory parameters are correct ansible.builtin.fail: msg: "one of mandatory parameter data_center_name or compatibility_version is undefined" when: "data_center_name is undefined or compatibility_version is undefined" - name: Get list of oVirt infra hosts we can use throughtout the role ansible.builtin.set_fact: ovirt_infra_hosts: "{{ lookup('vars', hosts_var_name, default=[]) }}" - name: Check if hosts are correct ansible.builtin.fail: msg: "'{{ lookup('vars', hosts_var_name) }}' variable does not contain mandatory parameter '{{ item[1] }}'" when: item[1] not in item[0] with_nested: - "{{ ovirt_infra_hosts }}" - ['name'] - name: Login to oVirt ovirt_auth: url: "{{ engine_url | default(lookup('env','OVIRT_URL')) | default(omit) }}" username: "{{ engine_user | default(lookup('env','OVIRT_USERNAME')) | default(omit) }}" hostname: "{{ engine_fqdn | default(lookup('env','OVIRT_HOSTNAME')) | default(omit) }}" password: "{{ engine_password | default(lookup('env','OVIRT_PASSWORD')) | default(omit) }}" ca_file: "{{ engine_cafile | default(lookup('env','OVIRT_CAFILE')) | default(omit) }}" insecure: "{{ engine_insecure | default(true) }}" when: ovirt_auth is undefined or not ovirt_auth register: loggedin tags: - always - name: Create infrastrucutre import_tasks: create_infra.yml when: data_center_state == 'present' - name: Remove infrastrucutre import_tasks: remove_infra.yml when: data_center_state == 'absent' always: - name: Logout from oVirt ovirt_auth: state: absent ovirt_auth: "{{ ovirt_auth }}" when: not loggedin.skipped | default(false) tags: - always