Commit 3b2a8183 by Your Name

Renamed wireless dns team bind template file

parent 2c61093d
......@@ -18,32 +18,32 @@
- name: Get bind source tarball from ftp://ftp.isc.org.
get_url:
url: http://ftp.isc.org/isc/bind9/{{ d['tag'] }}/bind-{{ d['tag'] }}.tar.gz
dest: /home/bind-{{ d['tag'] }}.tar.gz
dest: /tmp/bind-{{ d['tag'] }}.tar.gz
- name: untar the source tarball to managed node's /tmp.
unarchive:
src: /home/bind-{{ d['tag'] }}.tar.gz
dest: /home
src: /tmp/bind-{{ d['tag'] }}.tar.gz
dest: /tmp
remote_src: True
- name: configure bind.
shell: ./configure --prefix=/var/named-{{ d['tag'] }} --with-openssl=/usr --sysconfdir=/etc --enable-ipv6 --enable-threads
args:
chdir: /home/bind-{{ d['tag'] }}
chdir: /tmp/bind-{{ d['tag'] }}
- name: make bind.
shell: make -j {{ ansible_processor_vcpus }}
args:
chdir: /home/bind-{{ d['tag'] }}
chdir: /tmp/bind-{{ d['tag'] }}
- name: make install bind.
shell: make install
args:
chdir: /home/bind-{{ d['tag'] }}
chdir: /tmp/bind-{{ d['tag'] }}
- name: Clean untarred source
file:
path: /home/bind-{{ d['tag'] }}
path: /tmp/bind-{{ d['tag'] }}
state: absent
- name: Create named user.
......@@ -85,42 +85,41 @@
dest: /usr/sbin/rndc
state: link
- name: Make directory forward/black.
- name: Make directory log
file:
path: /var/named-{{ d['tag'] }}/forward/black
path: /var/named-{{ d['tag'] }}/log
state: directory
mode: 0755
- name: Copy xx.com.
- name: Copy named.local.
copy:
src: xx.com
dest: /var/named-{{ d['tag'] }}/forward/black/
src: named.local
dest: /var/named-{{ d['tag'] }}/named.local
- name: Copy smartjuso.conf.
- name: Copy named.root.
copy:
src: smartjuso.conf
dest: /var/named-{{ d['tag'] }}/smartjuso.conf
src: named.root
dest: /var/named-{{ d['tag'] }}/named.root
- name: Copy named.local.
- name: Copy named.conf.
copy:
src: named.local
dest: /var/named-{{ d['tag'] }}/named.local
src: named.conf
dest: /etc/named.conf
- name: Copy forward_black.conf.
- name: Copy rndc.conf.
copy:
src: forward_black.conf
dest: /var/named-{{ d['tag'] }}/forward_black.conf
src: rndc.conf
dest: /etc/rndc.conf
- name: Copy rndc.key
copy:
src: rndc.key
dest: /etc/rndc.key
- name: Copy cnsdns.sh.
copy:
src: cnsdns.sh
dest: /home/cnsdns.sh
- name: Copy named.conf.
copy:
src: named.conf
dest: /etc/named.conf
ignore_errors: True
mode: 0755
- name: Check to see if /etc/named.conf exists.
stat:
......@@ -142,11 +141,27 @@
- name: Change mode of /etc/named.conf
command: chmod 766 /etc/named.conf
- name: sed named.conf.
command: sed -i s/named-version/named-{{ d['tag'] }}/g /etc/named.conf
- name: sed cnsdns.sh.
command: sed -i s/named-version/named-{{ d['tag'] }}/g /home/cnsdns.sh
- name: Copy named.service systemd file.
copy:
src: named.service
dest: /etc/systemd/system/named.service
- name: Added Cron Job
shell: echo "*/5 * * * * /home/cnsdns.sh" > /var/spool/cron/root
- name: Generate ssh key
user:
name: root
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
- name: Reload systemd.
command: systemctl daemon-reload
......@@ -162,10 +177,6 @@
- shell: ps -ef | grep named | grep -v grep
register: process
- shell: /home/cnsdns.sh
register: cnsdns
ignore_errors: True
{% raw %}
- name: Check named version
debug:
......@@ -174,8 +185,4 @@
- name: Check named process
debug:
msg: "check process : '{{ process.stdout }}'"
- name: Check rndc script
debug:
msg: "check process : '{{ rndc.stdout }}'"
{% endraw %}
---
# This playbook deploys BIND
- name: Install bind
- name: Install bind(Wireless DNS Team)
hosts: all
roles:
- daejeonbind
- bind-wireless
environment:
http_proxy: http://{{ d['proxy_url'] }}:{{ d['proxy_port'] }}
...
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 sign in to comment