%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /etc/ansible/roles/mysql/tasks/
Upload File :
Create Path :
Current File : //etc/ansible/roles/mysql/tasks/mysql-inventory-slave.yml

---
# save slave option to inventory files
# personal vars - host_vars
- name: add mysql vars to host_vars
  delegate_to: 127.0.0.1
  bx_conf: hostname={{ inventory_hostname }}
    mysql_replication_role={{ mysql_replication_role }} 
    mysql_serverid={{ mysql_serverid }}
  tags: ansible_hosts

# hosts
- name: add server to mysql group
  delegate_to: 127.0.0.1
  bx_conf: hostname={{ inventory_hostname }} 
    state=update group=mysql
  tags: ansible_hosts

# group vars
- name: update bitrix-mysql group
  delegate_to: 127.0.0.1
  bx_conf: group=mysql state=update 
    mysql_last_id={{ mysql_serverid }}
    cluster_login={{ cluster_login }} cluster_password_file={{ cluster_password_file }}
    replica_login={{ replica_login }} replica_password_file={{ replica_password_file }}
  tags: ansible_hosts

- name: update bitrix-web group
  delegate_to: 127.0.0.1
  bx_conf: group=web state=update web_mysql_cluster_configure=enable
    web_mysql_login={{ cluster_login }} web_mysql_password_file={{ cluster_password_file }}
    web_mysql_server={{ master_server }}
  tags: ansible_hosts


Zerion Mini Shell 1.0