Commit eb9135e4 by Heechul Kim

added bind-solaris template

parent 96749887
---
# This playbook deploys BIND on opensolaris machine.
- name: Clean tarball file if exists.
file:
path: /tmp/bind-{{ d['tag'] }}.tar.gz
state: absent
- name: Get bind source tarball from http://ftp.isc.org.
command: wget http://ftp.isc.org/isc/bind9/{{ d['tag'] }}/bind-{{ d['tag'] }}.tar.gz
args:
chdir: /tmp
- name: untar the source tarball to managed node's /tmp.
unarchive:
src: /tmp/bind-{{ d['tag'] }}.tar.gz
dest: /tmp
remote_src: True
- name: configure bind.
shell: ./configure --prefix=/usr/local/bind-{{ d['tag'] }} --sysconfdir=/etc --enable-querytrace --localstatedir=/data/var --with-tuning=large --enable-threads --enable-full-report
args:
chdir: /tmp/bind-{{ d['tag'] }}
- name: make bind.
shell: make
args:
chdir: /tmp/bind-{{ d['tag'] }}
- name: make install bind.
shell: make install
args:
chdir: /tmp/bind-{{ d['tag'] }}
- name: Clean untarred source
file:
path: /tmp/bind-{{ d['tag'] }}
state: absent
- name: Clean tarball file.
file:
path: /tmp/bind-{{ d['tag'] }}.tar.gz
state: absent
- name: Create named user.
user:
name: named
shell: /bin/false
createhome: no
- name: Disable named service.
command: svcadm disable named
ignore_errors: True
- name: Delete /usr/sbin/named.
file:
path: /usr/sbin/named
state: absent
ignore_errors: True
- name: Delete /usr/sbin/rndc.
file:
path: /usr/sbin/rndc
state: absent
ignore_errors: True
- name: Symlink named.
file:
src: /usr/local/bind-{{ d['tag'] }}/sbin/named
dest: /usr/sbin/named
state: link
- name: Symlink rndc.
file:
src: /usr/local/bind-{{ d['tag'] }}/sbin/rndc
dest: /usr/sbin/rndc
state: link
- name: Check to see if /etc/named.conf exists.
stat:
path: /etc/named.conf
register: st
- name: Touch /etc/named.conf if not exist.
file:
path: /etc/named.conf
state: touch
when: st.stat.exists == False
- name: Make directory /data/nis
file:
path: /data/nis
state: directory
mode: 0755
- name: Make directory /data/named/log
file:
path: /data/named/log
state: directory
mode: 0755
- name: Make directory /data/var/run
file:
path: /data/var/run
state: directory
mode: 0755
- name: Change ownership of /data to named:named
file:
path: /data
state: directory
owner: named
group: named
recurse: yes
- name: Enable named service
command: svcadm enable named
...
---
# This playbook deploys BIND on opensolaris machine.
- name: Install bind
hosts: all
roles:
- bind-solaris
environment:
http_proxy: http://{{ d['proxy_url'] }}:{{ d['proxy_port'] }}
...
disk_config disk1 disklabel:msdos bootable:1 fstabkey:label
primary swap 10G swap sw
primary / 30G ext4 rw,noatime,errors=remount-ro
primary /data 10G- xfs rw
disk_config disk1 disklabel:msdos bootable:1 fstabkey:label
primary swap 5G swap sw
primary / 30G ext4 rw,noatime,errors=remount-ro
primary - 30G - -
primary /data 10G- xfs rw
disk_config disk1 disklabel:msdos bootable:1 fstabkey:label
primary swap 10G swap sw
primary / 30G ext4 rw,noatime,errors=remount-ro
primary - 50G - -
primary /data 10G- xfs rw
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