Commit d1f36ba9 by Heechul Kim

modified for centos6 and 7 compatible

parent 65216dc7
Showing with 20 additions and 0 deletions
...@@ -122,10 +122,27 @@ ...@@ -122,10 +122,27 @@
group: named group: named
recurse: yes recurse: yes
- name: Add named to rc.local (CentOS 6)
lineinfile:
name: /etc/rc.local
line: "/usr/sbin/named -u named"
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "6"
- name: Run named (CentOS 6)
command: /usr/sbin/named -u named
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "6"
- 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
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
- name: Run named service - name: Run named service
systemd: systemd:
...@@ -133,4 +150,7 @@ ...@@ -133,4 +150,7 @@
daemon-reload: yes daemon-reload: yes
enabled: yes enabled: yes
state: started state: started
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
... ...
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