%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/etc/ansible/roles/sphinx/tasks/
Upload File :
Create Path :
Current File : //proc/self/root/etc/ansible/roles/sphinx/tasks/sphinx.yml

---
# create or delete sphinx on defined node
# manage_sphinx
# manage_node
# manage_kernel
# manage_reindex
######## create, upload variables that used in playbook
####
- name: gathering facts about installed sites
  delegate_to: "{{ cluster_web_server }}"
  bx_facts: name=list password=0 install=kernel status=finished dbname={{ manage_kernel }}
  tags: sites_facts

- name: create variable bx_sites_info
  set_fact:
    bx_sites_info: "{{ hostvars[inventory_hostname]['bx_sites'] }}"
  tags: sites_facts

####
######## /create, upload variables that used in playbook

######## configure sphinx service
####
- include: install.yml
  when: "inventory_hostname == manage_node and manage_sphinx == 'create'"

####
######## /configure sphinx service

######## create index for sites
####
- include: index.yml
  when: "inventory_hostname == manage_node and manage_sphinx == 'create'"
  static: no
#####
######### /create index for sites

######### create or delete sphinx instance in the site
#####
- include: sites-cache_directory-execute.yml
  vars:
    php_script: "{{ manage_sphinx }}_index_in_web.php"
    php_server: "{{ cluster_web_server }}"
  when: "inventory_hostname == manage_node"
  static: no

#####
######### /create or delete sphinx instance in the site

######## disable service and delete role
####
- include: delete.yml
  when: "inventory_hostname == manage_node and manage_sphinx == 'delete'"
  static: no

####
######## /disable service and delete role

######## /configure monitoring 
####
- include: enable_monitor.yml
  when: "monitoring_status == 'enable' and 
    inventory_hostname == manage_node 
    and manage_sphinx == 'create'"
  static: no

- include: disable_monitor.yml
  when: "monitoring_status == 'enable' and 
    inventory_hostname == manage_node and 
    manage_sphinx == 'delete'"
  static: no

####
######## /configure monitoring 


Zerion Mini Shell 1.0