Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.143.7.112
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/community/zabbix/roles/zabbix_web/tasks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python3/dist-packages/ansible_collections/community/zabbix/roles/zabbix_web/tasks/main.yml
---
# tasks file for wdijkerman.zabbix-web

- name: "Include OS-specific variables"
  include_vars: "{{ ansible_os_family }}.yml"
  tags:
    - always

- name: Determine Latest Supported Zabbix Version
  set_fact:
    zabbix_web_version: "{{ zabbix_valid_web_versions[ansible_distribution_major_version][0] | default(6.0) }}"
  when: zabbix_web_version is not defined

- name: "Include distribution and version-specific vars"
  include_vars: "{{ item }}"
  with_first_found:
    - files:
        - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
        - "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
  tags:
    - always

- name: "Set some versions"
  set_fact:
    zabbix_short_version: "{{ zabbix_version | regex_replace('\\.', '') }}"
    zabbix_php_version: "{{ zabbix_php_version if zabbix_php_version is defined else _zabbix_php_version }}"
    _zabbix_php_package_prefix: ""
  tags:
    - always

- name: "Set default PHP-FPM variables"
  set_fact:
    zabbix_php_fpm_dir: "{{ zabbix_php_fpm_dir if zabbix_php_fpm_dir is defined else _php_fpm_dir }}"
    zabbix_php_fpm_session: "{{ zabbix_php_fpm_session if zabbix_php_fpm_session is defined else _php_fpm_session }}"
    zabbix_php_fpm_listen: "{{ zabbix_php_fpm_listen if zabbix_php_fpm_listen is defined else _php_fpm_listen }}"
  when:
    - not zabbix_php_fpm

- name: "Set default PHP-FPM variables specific RH provided"
  set_fact:
    zabbix_php_fpm_dir: "{{ zabbix_php_fpm_dir if zabbix_php_fpm_dir is defined else _php_fpm_dir }}"
    zabbix_php_fpm_session: "{{ zabbix_php_fpm_session if zabbix_php_fpm_session is defined else _zabbix_php_fpm_session }}"
    zabbix_php_fpm_listen: "{{ zabbix_php_fpm_listen if zabbix_php_fpm_listen is defined else _zabbix_php_fpm_listen }}"
  when:
    - zabbix_php_fpm
    - ansible_os_family == "RedHat"

- name: "Set websrv specific variables (Apache)"
  set_fact:
    zabbix_web_conf_web_user: "{{ zabbix_web_conf_web_user if zabbix_web_conf_web_user is defined else _apache_user }}"
    zabbix_web_conf_web_group: "{{ zabbix_web_conf_web_group if zabbix_web_conf_web_group is defined else _apache_group }}"
  when:
    - zabbix_websrv == 'apache'

- include_tasks: nginx.yml
  when:
    - zabbix_websrv == 'nginx'

- name: "Install the correct repository"
  include_tasks: "RedHat.yml"
  when: ansible_os_family == "RedHat"
  tags:
    - zabbix-web

- name: "Install the correct repository"
  include_tasks: "Debian.yml"
  when: ansible_os_family == "Debian"
  tags:
    - zabbix-web

- name: "Create zabbix-web directory"
  file:
    path: /etc/zabbix/web
    owner: "{{ zabbix_web_conf_web_user }}"
    group: "{{ zabbix_web_conf_web_group }}"
    state: directory
    mode: 0755
  tags:
    - zabbix-web
    - init
    - config

- name: "Configure zabbix-web"
  template:
    src: zabbix.conf.php.j2
    dest: /etc/zabbix/web/zabbix.conf.php
    owner: "{{ zabbix_web_conf_web_user }}"
    group: "{{ zabbix_web_conf_web_group }}"
    mode: "{{ zabbix_web_conf_mode }}"
  notify:
    - restart apache
  tags:
    - zabbix-web
    - init
    - config

- include_tasks: access.yml
  when:
    - zabbix_web_htpasswd
  tags:
    - zabbix-web
    - init
    - config

Anon7 - 2022
AnonSec Team