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

40 branch #20

Closed
tiawaz opened this issue Sep 5, 2016 · 7 comments
Closed

40 branch #20

tiawaz opened this issue Sep 5, 2016 · 7 comments

Comments

@tiawaz
Copy link
Contributor

tiawaz commented Sep 5, 2016

When installing from the 40 branch on Centos7

  roles:
    - role: pdns-ansible
  vars:
    pdns_config:
      local-address: '{{ ansible_eth0.ipv4.address }}'
      allow-recursion: 'xxx.xxx.xxx.xxx'
      recursor: '{{ ansible_eth0.ipv4.address }}:5300'
    pdns_backends_mysql_credential:
      gmysql:
        priv_user: root
        priv_password: ***
        priv_host:
          - "%"
    pdns_backends:
      gmysql:
        host: 'localhost'
        port: 3306
        user: xxx
        password: ***
        dbname: pdns
    pdns_installation_type: 'packages'
    pdns_repo_provider: 'powerdns'
    pdns_repo_branch: '40'

i ran into the following problems:

  1. The packages use etc/pdns as config dir, but the role defaults to /etc/powerdns
    2)The packages put the schema into /usr/share/doc/pdns-backend-mysql-4.0.1/schema.mysql.sql, but the role defaults to /usr/share/doc/pdns-backend-mysql/schema.mysql.sql
@tiawaz
Copy link
Contributor Author

tiawaz commented Sep 5, 2016

both issues are easily worked around by fudging the vars in the role, simply adding

- name: Load variables
  include_vars: '{{item}}'
  with_first_found:
    - files:
      - '{{ansible_os_family}}.yml'
      - 'default.yml'
      paths:
        - ../vars

to the main task and the adding my own vars/RedHat.yml

@tiawaz
Copy link
Contributor Author

tiawaz commented Sep 5, 2016

From a cursory look at the code it seems to me that a proper fix will be more involved, since there seems to be little support for the branch idea throughout the code?

Is it intentional that the 40 branch uses different Dirs than the regular packages?

@pieterlexis
Copy link
Contributor

hi @tiawaz,

It indeed looks like the role only takes into account the Debian/Ubuntu default directories. I quickly checked the regular CentOS packages and they also use /etc/pdns/ for their configs. It would appear this role was wrong for CentOS-based distros. We'll fix this!

The schema-location will be somewhat harder, as it has to be calculated based on the version. But this is doable.

@tiawaz
Copy link
Contributor Author

tiawaz commented Sep 5, 2016

If the directory /etc/pdns is correct for all RedHat packages i can put up my changes (using the vars file as described above) as a PR

@tiawaz
Copy link
Contributor Author

tiawaz commented Sep 5, 2016

#21

@pieterlexis
Copy link
Contributor

Thank you!

@tiawaz
Copy link
Contributor Author

tiawaz commented Sep 6, 2016

Just to clarify, since my comments were not entirely clear, the PR only fixes the config dir issue.#

I have an Idea about how to properly deal with the schema issue, but will not be able to have a look at it before next week.

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