Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # Add packages here for Centos
  2. {% set CentosPKGs = [
  3. 'https',
  4. 'somepkg'
  5. ] %}
  6.  
  7. # Add packages here for ubuntu
  8. {% set UbuntuPKGs = [
  9. 'apache',
  10. 'somepkg'
  11. ] %}
  12.  
  13.  
  14.  
  15.  
  16.  
  17. {% if grains['os'] == 'CentOS'%}
  18. pkgrepo.managed:
  19. - humanname: CentOS-$releasever - Base
  20. - mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  21. - comments:
  22. - '#http://mirror.centos.org/centos/$releasever/os/$basearch/'
  23. - gpgcheck: 1
  24. - gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  25.  
  26. {% for package in CentosPKGs %}
  27. {{ package }}:
  28. pkg:
  29. - installed
  30. {% endfor %}
  31. {% endif %}
  32.  
  33.  
  34. {% if grains['os'] == 'ubuntu'%}
  35. {% for package in UbuntuPKGs %}
  36. {{ package }}:
  37. pkg:
  38. - installed
  39. {% endfor %}
  40. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement