Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
jijisa
/
porch
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3b2a8183
authored
Jun 26, 2017
by
Your Name
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Renamed wireless dns team bind template file
parent
2c61093d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
38 deletions
porch/templates/daejeonbind_main.j2 → porch/templates/bind-wireless_main.j2
porch/templates/daejeonbind_site.j2 → porch/templates/bind-wireless_site.j2
porch/templates/
daejeonbind
_main.j2
→
porch/templates/
bind-wireless
_main.j2
View file @
3b2a8183
...
@@ -18,32 +18,32 @@
...
@@ -18,32 +18,32 @@
- name: Get bind source tarball from ftp://ftp.isc.org.
- name: Get bind source tarball from ftp://ftp.isc.org.
get_url:
get_url:
url: http://ftp.isc.org/isc/bind9/{{ d['tag'] }}/bind-{{ d['tag'] }}.tar.gz
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.
- name: untar the source tarball to managed node's /tmp.
unarchive:
unarchive:
src: /
home
/bind-{{ d['tag'] }}.tar.gz
src: /
tmp
/bind-{{ d['tag'] }}.tar.gz
dest: /
home
dest: /
tmp
remote_src: True
remote_src: True
- name: configure bind.
- name: configure bind.
shell: ./configure --prefix=/var/named-{{ d['tag'] }} --with-openssl=/usr --sysconfdir=/etc --enable-ipv6 --enable-threads
shell: ./configure --prefix=/var/named-{{ d['tag'] }} --with-openssl=/usr --sysconfdir=/etc --enable-ipv6 --enable-threads
args:
args:
chdir: /
home
/bind-{{ d['tag'] }}
chdir: /
tmp
/bind-{{ d['tag'] }}
- name: make bind.
- name: make bind.
shell: make -j {{ ansible_processor_vcpus }}
shell: make -j {{ ansible_processor_vcpus }}
args:
args:
chdir: /
home
/bind-{{ d['tag'] }}
chdir: /
tmp
/bind-{{ d['tag'] }}
- name: make install bind.
- name: make install bind.
shell: make install
shell: make install
args:
args:
chdir: /
home
/bind-{{ d['tag'] }}
chdir: /
tmp
/bind-{{ d['tag'] }}
- name: Clean untarred source
- name: Clean untarred source
file:
file:
path: /
home
/bind-{{ d['tag'] }}
path: /
tmp
/bind-{{ d['tag'] }}
state: absent
state: absent
- name: Create named user.
- name: Create named user.
...
@@ -85,42 +85,41 @@
...
@@ -85,42 +85,41 @@
dest: /usr/sbin/rndc
dest: /usr/sbin/rndc
state: link
state: link
- name: Make directory
forward/black.
- name: Make directory
log
file:
file:
path: /var/named-{{ d['tag'] }}/
forward/black
path: /var/named-{{ d['tag'] }}/
log
state: directory
state: directory
mode: 0755
- name: Copy
xx.com
.
- name: Copy
named.local
.
copy:
copy:
src:
xx.com
src:
named.local
dest: /var/named-{{ d['tag'] }}/
forward/black/
dest: /var/named-{{ d['tag'] }}/
named.local
- name: Copy
smartjuso.conf
.
- name: Copy
named.root
.
copy:
copy:
src:
smartjuso.conf
src:
named.root
dest: /var/named-{{ d['tag'] }}/
smartjuso.conf
dest: /var/named-{{ d['tag'] }}/
named.root
- name: Copy named.
local
.
- name: Copy named.
conf
.
copy:
copy:
src: named.
local
src: named.
conf
dest: /
var/named-{{ d['tag'] }}/named.local
dest: /
etc/named.conf
- name: Copy
forward_black
.conf.
- name: Copy
rndc
.conf.
copy:
copy:
src: forward_black.conf
src: rndc.conf
dest: /var/named-{{ d['tag'] }}/forward_black.conf
dest: /etc/rndc.conf
- name: Copy rndc.key
copy:
src: rndc.key
dest: /etc/rndc.key
- name: Copy cnsdns.sh.
- name: Copy cnsdns.sh.
copy:
copy:
src: cnsdns.sh
src: cnsdns.sh
dest: /home/cnsdns.sh
dest: /home/cnsdns.sh
mode: 0755
- name: Copy named.conf.
copy:
src: named.conf
dest: /etc/named.conf
ignore_errors: True
- name: Check to see if /etc/named.conf exists.
- name: Check to see if /etc/named.conf exists.
stat:
stat:
...
@@ -142,11 +141,27 @@
...
@@ -142,11 +141,27 @@
- name: Change mode of /etc/named.conf
- name: Change mode of /etc/named.conf
command: chmod 766 /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.
- name: Copy named.service systemd file.
copy:
copy:
src: named.service
src: named.service
dest: /etc/systemd/system/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.
- name: Reload systemd.
command: systemctl daemon-reload
command: systemctl daemon-reload
...
@@ -162,10 +177,6 @@
...
@@ -162,10 +177,6 @@
- shell: ps -ef | grep named | grep -v grep
- shell: ps -ef | grep named | grep -v grep
register: process
register: process
- shell: /home/cnsdns.sh
register: cnsdns
ignore_errors: True
{% raw %}
{% raw %}
- name: Check named version
- name: Check named version
debug:
debug:
...
@@ -174,8 +185,4 @@
...
@@ -174,8 +185,4 @@
- name: Check named process
- name: Check named process
debug:
debug:
msg: "check process : '{{ process.stdout }}'"
msg: "check process : '{{ process.stdout }}'"
- name: Check rndc script
debug:
msg: "check process : '{{ rndc.stdout }}'"
{% endraw %}
{% endraw %}
porch/templates/
daejeonbind
_site.j2
→
porch/templates/
bind-wireless
_site.j2
View file @
3b2a8183
---
---
# This playbook deploys BIND
# This playbook deploys BIND
- name: Install bind
- name: Install bind
(Wireless DNS Team)
hosts: all
hosts: all
roles:
roles:
-
daejeonbind
-
bind-wireless
environment:
http_proxy: http://{{ d['proxy_url'] }}:{{ d['proxy_port'] }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment