{%- if pillar.puppet.master.enabled %}

include:
- puppet.common

{#
/etc/hiera.conf:
  file.managed:
  - source: salt://puppet_master/conf/hiera.conf
  - template: jinja
#}

puppet_master_service:
  service.running:
  - name: puppetmaster
  - watch:
    - file: /etc/puppet/puppet.conf 

/etc/puppet/environments:
  file.directory:
  - group: puppet
  - mode: 2775
  - require:
    - pkg: puppet_packages

/etc/hiera.yaml:
  file:
  - managed
  - source: salt://puppet/conf/hiera.yaml
  - template: jinja
  - require:
    - pkg: hiera_packages


{%- endif %}