Commit a664c365 authored by nanahira's avatar nanahira

move dnsmasq to network

parent 71882d3c
---
- hosts: router_nextgen
remote_user: root
vars:
mycard_domains:
- mycard.moe
- momobako.com
- yuzurisa.com
- moecube.com
- moestart.com
- moenext.com
- ygobbs.com
- newwise.com
- my-card.in
- mius.pro
tasks:
- name: sysctl
include_tasks: ./tasks/sysctl.yaml
......@@ -110,3 +122,36 @@
net.ipv6.conf.{{br.name}}.accept_ra = 2
{% endif %}
{% endfor %}
- name: dnsmasq directory
file:
name: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns'
state: directory
recurse: true
- name: dnsmasq docker-compose
copy:
src: ./files/dnsmasq/docker-compose.yml
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/docker-compose.yml'
- name: dnsmasq.conf
template:
src: ./files/dnsmasq/dnsmasq.conf.j2
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.conf'
notify: restart_dnsmasq
- name: smartdns.conf
template:
src: ./files/dnsmasq/smartdns.conf.j2
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/smartdns.conf'
notify: restart_dnsmasq
- name: smartdns china list
copy:
src: ./data/china-list.conf
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/china-list.conf'
notify: restart_dnsmasq
- name: start dnsmasq
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
remove_orphans: true
handlers:
- name: restart_dnsmasq
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
restarted: true
---
- hosts: router_nextgen
remote_user: root
vars:
mycard_domains:
- mycard.moe
- momobako.com
- yuzurisa.com
- moecube.com
- moestart.com
- moenext.com
- ygobbs.com
- newwise.com
- my-card.in
- mius.pro
tasks:
- name: dnsmasq directory
file:
name: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns'
state: directory
recurse: true
- name: dnsmasq docker-compose
copy:
src: ./files/dnsmasq/docker-compose.yml
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/docker-compose.yml'
- name: dnsmasq.conf
template:
src: ./files/dnsmasq/dnsmasq.conf.j2
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/dnsmasq.conf'
notify: restart_dnsmasq
- name: smartdns.conf
template:
src: ./files/dnsmasq/smartdns.conf.j2
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/smartdns.conf'
notify: restart_dnsmasq
- name: smartdns china list
copy:
src: ./data/china-list.conf
dest: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq/smartdns/china-list.conf'
notify: restart_dnsmasq
- name: start dnsmasq
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
remove_orphans: true
- name: other service directory
file:
name: '{{ansible_user_dir}}/nextgen-router/services/others'
......@@ -56,8 +16,3 @@
project_src: '{{ansible_user_dir}}/nextgen-router/services/others'
remove_orphans: true
pull: true
handlers:
- name: restart_dnsmasq
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-router/services/dnsmasq'
restarted: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment