saltstack-formulas / bind-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
29 stars 117 forks source link

zones -> /srv/salt/zones broken link #37

Closed ogabrielsantos closed 8 years ago

ogabrielsantos commented 8 years ago

Why bind/zones a symbolic link? Why it is hardcoded without possibility of custom path?

What about a root_dir pointing to ~/workspace/servers/ instead of /srv/salt? What about file_roots other than default base setup?

file_roots:
  dev:
    - /srv/salt/dev/states
    - /srv/salt/prod/states
  prod:
    - /srv/salt/prod/states

Currently I need to manual change bind-formula in order to make things work.

Maybe add another file_root entry pointing to my custom bind directory can work but this seems a hack instead of a default expected approach:

file_roots:
  dev:
    - /srv/salt/prod/states/files/var/
    - /srv/salt/dev/states
    - /srv/salt/prod/states
  prod:
    - /srv/salt/prod/states/files/var/
    - /srv/salt/prod/states

var/
└── bind/
    └── hosts
       ├── zone-file1.local
       ├── zone-file2.local

EDIT: Hacky symlinks will be a issue because master stop responding when I've specifics symlinks

tks (:

ogabrielsantos commented 8 years ago

Maybe mapping zones_source_dir default to /srv/salt/zones inside map.jinja, so user can replace inside their own pillars, will be a fine approach.

cybacolt commented 8 years ago

@ogabrielsantos, this is bugging me too - if its ok, i'll do a PR for it, as you described using map.jinja.

ogabrielsantos commented 8 years ago

@cybacolt I've already updated here. I can merge saltstack-formulas/bind-formula back and do a PR if you want.

cybacolt commented 8 years ago

@ogabrielsantos too quick :)

yeah, a PR back to base would be good. i'll stop my changes now.

ogabrielsantos commented 8 years ago

@cybacolt I took the liberty of include looping fix and file names conflicts (I think this is essential to do this formula run as it said that will work initially - and because Some improvements #28 is a 5 months old PR that discusses fixes and features, delaying the merge fix.

cybacolt commented 8 years ago

@ogabrielsantos working around this with my own symlink for now. look forward to seeing it in master some time soon!

wwentland commented 8 years ago

This was fixed in #42