Repos with recipes to deploy some infrastructure services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

41 regels
1.6 KiB

  1. ---
  2. - name: Ensure that the directories containing the PowerDNS Authoritative Server SQLite databases exist
  3. file:
  4. name: "{{ item | dirname }}"
  5. owner: "{{ pdns_user }}"
  6. group: "{{ pdns_group }}"
  7. state: directory
  8. mode: 0750
  9. with_items: "{{ pdns_sqlite_databases_locations }}"
  10. - name: Create the PowerDNS Authoritative Server SQLite databases on RedHat < 7
  11. shell: "sqlite3 {{ item }} < /usr/share/doc/pdns/schema.sqlite3.sql"
  12. args:
  13. creates: "{{ item }}"
  14. with_items: "{{ pdns_sqlite_databases_locations }}"
  15. when: ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version | int < 7
  16. - name: Create the PowerDNS Authoritative Server SQLite databases on RedHat >= 7
  17. shell: "sqlite3 {{ item }} < /usr/share/doc/pdns-backend-sqlite-{{ _pdns_running_version | regex_replace('-rc[\\d]*$', '') }}/schema.sqlite3.sql"
  18. args:
  19. creates: "{{ item }}"
  20. with_items: "{{ pdns_sqlite_databases_locations }}"
  21. when: ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version | int >= 7
  22. - name: Create the PowerDNS Authoritative Server SQLite databases on Debian
  23. shell: "sqlite3 {{ item }} < /usr/share/doc/pdns-backend-sqlite3/schema.sqlite3.sql"
  24. args:
  25. creates: "{{ item }}"
  26. with_items: "{{ pdns_sqlite_databases_locations }}"
  27. when: ansible_facts.os_family == "Debian"
  28. - name: Check the PowerDNS Authoritative Server SQLite databases permissions
  29. file:
  30. name: "{{ item }}"
  31. owner: "{{ pdns_user }}"
  32. group: "{{ pdns_group }}"
  33. mode: 0640
  34. state: file
  35. with_items: "{{ pdns_sqlite_databases_locations }}"