main.yml 471 Bytes
---
# tasks file for yoho.dns


# make sure user type DNS
- name: "make sure user type DNS to confirm"
  fail:
    msg: "user do not type DNS"
  when: confirmation != 'DNS'


- name: get current time
  set_fact:
     timestamp: "{{ lookup('pipe','date +%Y-%m-%d %H:%M:%S') }}"
     zone_serical: "{{ ansible_date_time.epoch }}"

- name:  sync bind9 zone files
  template:
    src: qcloud.zone.j2
    dest: /Data/named/qcloud.zone
  backup: yes
  notify:
    - reload bind