mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
All redis secondaries on the same machine. Unbinding dnsmasq so it works for all interfaces as they come up.
This commit is contained in:
parent
85752e1e34
commit
c0363c1349
3 changed files with 6 additions and 4 deletions
|
@ -10,11 +10,11 @@ no-resolv
|
|||
|
||||
{% for interface in network_interfaces %}
|
||||
{% if not interface.startswith('veth') and not interface.startswith('docker') and not interface.startswith('br') %}
|
||||
interface={{ interface }}
|
||||
# interface={{ interface }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
bind-interfaces
|
||||
# bind-interfaces # This will bind only to the interfaces that are up in interface= above
|
||||
# log-dhcp
|
||||
# log-queries
|
||||
# log-facility=/var/log/dnsmasq.log
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
set_fact:
|
||||
redis_role: "{{ inventory_hostname.split('-')[2] }}"
|
||||
redis_port: 6379
|
||||
redis_secondary: yes
|
||||
redis_secondary_ports:
|
||||
story: 6380
|
||||
user: 6381
|
||||
|
@ -12,7 +13,8 @@
|
|||
- name: Set redis_port for secondary redis servers
|
||||
set_fact:
|
||||
redis_port: "{{ redis_secondary_ports[redis_role] }}"
|
||||
when: inventory_hostname in ['hdb-redis-story-2', 'hdb-redis-user-2', 'hdb-redis-session-2', 'hdb-redis-pubsub-2']
|
||||
redis_secondary: yes
|
||||
when: inventory_hostname not in ["db-redis-user", "db-redis-story1", "db-redis-session", "db-redis-pubsub"]
|
||||
|
||||
- name: Install sysfsutils for disabling transparent huge pages
|
||||
become: yes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"service": {
|
||||
{% if inventory_hostname in ["db-redis-user", "db-redis-story1", "db-redis-session", "db-redis-pubsub"] %}
|
||||
{% if not redis_secondary %}
|
||||
"name": "{{ inventory_hostname|regex_replace('\-?\d+', '')|regex_replace("hdb", "db") }}",
|
||||
{% else %}
|
||||
"name": "db-redis-{{ redis_role }}-staging",
|
||||
|
|
Loading…
Add table
Reference in a new issue