Saturday, 13 July 2019

Ansible playbook to Copy named conf local file



- name: Copy named conf local file
  template:
    src: named.conf.local.j2
    dest: /etc/named/named.conf.local
    owner: root
    group: named
    mode: 0640
  notify: restart named

Ansible playbook to Make named directory

 

- name: Make named directory
  file:
    path: /etc/named
    state: directory
    owner: root
    group: named
    mode: 0750

Ansible playbook to Copy named conf file



- name: Copy named conf file
  template:
    src: named.conf.j2
    dest: /etc/named.conf
    owner: root
    group: named
    mode: 0660
  notify: restart named

Ansible Playbook to set FQDN



- name: Set hostname fact
  set_fact:
    ansible_fqdn: "{{ host_name }}"

Ansible playbook to set hostname




- name: Set hostname
  hostname:
    name: "{{ host_name }}"

Ansible Playbook to Install Bind


- name: Install bind
  yum:
    pkg: bind
    state: installed

Ansible Playbook to open firewall port (DNS) (firewalld)



- name: Open firewall port
  firewalld:
    service: dns
    permanent: true
    state: enabled
    immediate: yes

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...