base:
  '*':
    - repositories
{% if pillar.get('avahi', '').lower() == 'true' %}
    - avahi
{% endif %}
    - motd
    - users
{% if salt['pillar.get']('infrastructure', 'libvirt') == 'cloud' %}
    - hosts
{% endif %}
  'roles:ca':
    - match: grain
    - ca
  'roles:etcd':
    - match: grain
    - cert
    - etcd
  'roles:kube-(master|minion)':
    - match: grain_pcre
    - cert
    - etcd-proxy
  'roles:kube-master':
    - match: grain
    - kubernetes-master
    - reboot
  'roles:kube-minion':
    - match: grain
    - flannel
    - docker
    - kubernetes-minion
  'roles:nfs':
    - match: grain
    - nfs-server
  'roles:haproxy':
    - match: grain
    - confd
    - haproxy

base:
  '*':
    - repositories
{% if pillar.get('avahi', '').lower() == 'true' %}
    - avahi
{% endif %}
    - motd
    - users
{% if salt['pillar.get']('infrastructure', 'libvirt') == 'cloud' %}
    - hosts
{% endif %}
  'roles:ca':
    - match: grain
    - ca
  'roles:etcd':
    - match: grain
    - cert
    - etcd
  'roles:kube-(master|minion)':
    - match: grain_pcre
    - cert
    - etcd-proxy
  'roles:kube-master':
    - match: grain
    - kubernetes-master:
      - require:
        - sls: etcd-proxy
    - reboot:
      - require:
        - sls: etcd-proxy
  'roles:kube-minion':
    - match: grain
    - flannel
    - docker
    - kubernetes-minion
  'roles:nfs':
    - match: grain
    - nfs-server
  'roles:haproxy':
    - match: grain
    - confd
    - haproxy

Make etcd state a requirement for states that need etcd running on localhost
Make etcd state a requirement for states that need etcd running on localhost

kubic-project/salt,ereslibre/salt,kubic-project/salt,kubic-project/salt,ereslibre/salt,ereslibre/salt