Ask Your Question
0

Using razorsedge/network with hiera

asked 2016-06-10 10:49:18 -0500

updated 2016-06-11 02:47:19 -0500

Hello

I try to use hiera in a profile with the module razorsedge/network, it look like this :

class profiles::network {
  include network::hiera
}

In my file node.yaml i have :

network::bond_static:
  bond0:
    ensure: up
    ipaddress : 10.0.0.10
    netmask: 255.255.255.0
    gateway: 10.0.0.254
    bonding_opts: 'mode=active-backup miimon=100'
network::bond_slave
 eth0:
  macaddress: 'XXXXXXXXXXXXX'
  ethtool_opts: 'autoneg off speed 1000 duplex full'
  master: 'bond0'

the configuration do not create any change on the centos 6 server do anyone can help me ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-11 07:21:21 -0500

I tested your code in rspec-puppet and you should in fact have Puppet managing resources based on that code. For example the catalog I compiled contains:

  {
    "type": "File",
    "title": "ifcfg-eth0",
    "tags": ["file","ifcfg-eth0","network::bond::slave","network","bond","slave","eth0","class","network::hiera","hiera","test"],
    "file": "/Users/alexharvey/git/test/spec/fixtures/modules/network/manifests/bond/slave.pp",
    "line": 60,
    "exported": false,
    "parameters": {
      "path": "/etc/sysconfig/network-scripts/ifcfg-eth0",
      "ensure": "present",
      "mode": "0644",
      "owner": "root",
      "group": "root",
      "content": "###\n### File managed by Puppet\n###\nDEVICE=eth0\nHWADDR=b8:e8:78:21:76:1f\nMASTER=bond0\nSLAVE=yes\nTYPE=Ethernet\nETHTOOL_OPTS=\"autoneg off speed 1000 duplex full\"\nNM_CONTROLLED=no\n",
      "before": "File[ifcfg-bond0]",
      "notify": "Service[network]"
    }
  },

Are you certain that Puppet hasn't changed the ifcfg-eth0 file, or similar?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-06-10 10:48:12 -0500

Seen: 43 times

Last updated: Jun 11 '16