arnisoph / saltstack-network-formula

Salt Stack Formula to set up and configure a host's network configuration
Other
13 stars 13 forks source link

Some smaller changes. #9

Closed jochumdev closed 8 years ago

jochumdev commented 9 years ago

3 patches i wrote for you great network formula:

jochumdev commented 9 years ago

Hi, yeah salstack-tools could make the same as network.packages, but i like it to have everything at the right place what do you think about it?

arnisoph commented 9 years ago

Normally I would say preventing code duplication is a good thing. Do we have technical reasons to depend on pkg mgmt in the network formula?

jochumdev commented 9 years ago

This way i know that these packages will be installed/removed because of networking stuff. It looks a way better in the pillar.

network:
  {%- if salt['grains.get']('os_family') == 'Debian' %}
  pkgs:
    purged:
      - resolvconf
    installed:
      - openvswitch-switch
  {% endif -%}

  interfaces:
    - name: eth0
      proto: dhcp
      type: eth

Maybe rename network:pkgs to network:packages ?

arnisoph commented 9 years ago

AFAIR you're accessing master's grains not the minion's grains. https://github.com/bechtoldt/saltstack-tools-formula should be able to manage this.

jochumdev commented 9 years ago

Hey @bechtoldt your sure about master's grains?

jochumdev commented 9 years ago

Hey Arnold, do you commit that? :)

arnisoph commented 9 years ago

@pcdummy could you please remove package mgmt from https://github.com/bechtoldt/saltstack-network-formula/blob/master/network/interfaces.sls#L60 to prevent duplicated code?

arnisoph commented 9 years ago

ping @pcdummy :)