Advertisement
shaggycat

Untitled

May 21st, 2015
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. tree manifests/
  2. manifests/
  3. ├── params.pp
  4. ├── roles.pp
  5. └── site.pp
  6.  
  7. 0 directories, 3 files
  8.  
  9. cat manifests/site.pp
  10. hiera_include('classes')
  11.  
  12.  
  13. #add interfaces by example42 module
  14. create_resources('network::interface', hiera('ifaces', {}))
  15. #create_resources('clean_ifcfg::iface', hiera('ifaces', {}))
  16.  
  17. #create_resources('network::route', hiera('routes', {}))
  18. create_resources('routes-servionica::r', hiera('route', {}))
  19.  
  20. create_resources('group',hiera('groupadd', {}))
  21.  
  22. create_resources('mdb',hiera('mysql::grant', {}))
  23.  
  24.  
  25. create_resources('jenkins_makecloud::user',hiera('jenkins_user', {}))
  26.  
  27.  
  28.  
  29. #$nameservers=hiera('nameservers')
  30. #$domainname=hiera('domainname')
  31.  
  32.  
  33.  
  34. #$my_test = hiera('ext_ip')
  35.  
  36. #notify{"ext_ip checking: $my_test":}
  37.  
  38.  
  39.  
  40. #use mthibaut/users module
  41.  
  42.  
  43. node /default/ {
  44. users { sysadmins: }
  45. notify{"vlan_range in site file1=: ${vlan_range}": }
  46. hiera_include('params')
  47. notify{"vlan_range in site file2=: ${vlan_range}": }
  48.  
  49. hiera_include('roles')
  50. notify{"vlan_range in site file3=: ${vlan_range}": }
  51.  
  52.  
  53. service {"NetworkManager":
  54. enable => 'false',
  55. ensure => 'stopped',
  56.  
  57. }
  58.  
  59. service {"network":
  60. enable => 'true',
  61. ensure => 'running',
  62.  
  63.  
  64. }
  65.  
  66.  
  67.  
  68. }
  69. cat manifests/params.pp
  70. class params {
  71.  
  72. }
  73.  
  74. class params::stend1 {
  75.  
  76. $vlan_range='2001:2009'
  77. #notice("vlan_range_in_params file=" $vlan_range)
  78. notify{"vlan_range_in_params file=: ${vlan_range}": }
  79.  
  80.  
  81. }
  82.  
  83. class params::stend2 {
  84.  
  85. }
  86.  
  87. cat hieradata/nodes/test-node2.***.ru.yaml
  88.  
  89. ---
  90. classes:
  91. - network
  92. - routes-servionica
  93. - test_hosts
  94.  
  95. params:
  96.  
  97. - params::stend1
  98.  
  99.  
  100. roles:
  101.  
  102.  
  103. - role::test
  104. - role::test_deploy_compute_
  105.  
  106.  
  107. extip: "192.168.16.61"
  108. admin_pass: '***'
  109. admin_email: 'k.lisovskaya@***.ru'
  110. controller_host: '192.168.16.60'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement