diff --git a/tasks/database-sqlite3.yml b/tasks/database-sqlite3.yml index 28ebd9c..10f4dff 100644 --- a/tasks/database-sqlite3.yml +++ b/tasks/database-sqlite3.yml @@ -20,6 +20,17 @@ state: directory mode: 0755 with_items: "{{ pdns_sqlite_databases_locations }}" + when: _pdns_running_version is version_compare('4.2.0', '<') + +- name: Ensure that the directories containing the PowerDNS SQLite databases exist + file: + name: "{{ item | dirname }}" + owner: "pdns" + group: "pdns" + state: directory + mode: 0755 + with_items: "{{ pdns_sqlite_databases_locations }}" + when: _pdns_running_version is version_compare('4.2.0', '>=') - block: