Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init file for mysql-backend not found on centos 7 #58

Closed
h33x0 opened this issue Apr 16, 2019 · 1 comment
Closed

init file for mysql-backend not found on centos 7 #58

h33x0 opened this issue Apr 16, 2019 · 1 comment

Comments

@h33x0
Copy link

h33x0 commented Apr 16, 2019

Hi!
When playbook runs on Centos 7, path to file concatente from server version, cutted with regex_replace. Regex based on '-rc' substring, but centos package version from master repo doesn't contains it - only build version and commit hash.

I fix this issue and attach small patch for role below.

Index: tasks/database-mysql.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tasks/database-mysql.yml	(revision cc4ab566710794d64b8ce5e6444a922e49e0b549)
+++ tasks/database-mysql.yml	(date 1555399095000)
@@ -63,7 +63,7 @@
 
 - name: Define the PowerDNS Authoritative Server database MySQL schema file path on RedHat >= 7
   set_fact:
-    _pdns_mysql_schema_file: "/usr/share/doc/pdns-backend-mysql-{{ _pdns_running_version | regex_replace('-rc[\\d]*$', '') }}/schema.mysql.sql"
+    _pdns_mysql_schema_file: "/usr/share/doc/pdns-backend-mysql-{{ _pdns_running_version | regex_replace('\\.\\d+\\.[\\d\\w]+$', '') }}/schema.mysql.sql"
   when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int >= 7
 
 - name: Define the PowerDNS Authoritative Server database MySQL schema file path on Debian

regards,
Anton

@atosatto
Copy link
Contributor

Hi @h33x0 thanks for this suggestion!
We've recently changed our packages version numbering convention for "master builds".
#69 implements a new regex that should fix the issue you reported.
Feel free to reopen the ticket in case this still does not work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants