init.sls 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # build
  3. #
  4. build:
  5. pkg.installed:
  6. - pkgs:
  7. - git
  8. - python
  9. - subversion
  10. - build-essential
  11. - gawk
  12. - unzip
  13. - libncurses-dev
  14. - libz-dev
  15. - libssl-dev
  16. - lua5.1
  17. user.present:
  18. - name: build
  19. - shell: /bin/bash
  20. - home: /home/build
  21. - createhome: True
  22. - gid_from_name: True
  23. - require:
  24. - group: build
  25. group.present:
  26. - name: build
  27. - system: False
  28. /home/build/.vimrc:
  29. file.managed:
  30. - source: salt://vim/vimrc
  31. - require:
  32. - user: build
  33. /home/build/.bashrc:
  34. file.managed:
  35. - source: salt://bash/bashrc.user
  36. - template: jinja
  37. - require:
  38. - user: build
  39. git-config:
  40. file.managed:
  41. - name: /home/build/.gitconfig
  42. - source: salt://build/gitconfig.build
  43. - user: build
  44. - group: build
  45. - require:
  46. - user: build
  47. build-git:
  48. file.directory:
  49. - name: /srv/build
  50. - user: build
  51. - group: build
  52. - mode: 755
  53. - require:
  54. - user: build
  55. git.latest:
  56. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-build.git
  57. - target: /srv/build
  58. - user: build
  59. - update_head: False
  60. - require:
  61. - pkg: build
  62. - user: build
  63. - file: build-git
  64. firmware-git:
  65. file.directory:
  66. - name: /srv/build/output
  67. - user: build
  68. - mode: 755
  69. - require:
  70. - git: build-git
  71. git.latest:
  72. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-website.git
  73. - target: /srv/build/output
  74. - branch: signing
  75. - user: build
  76. - update_head: False
  77. - require:
  78. - file: firmware-git
  79. /srv/build/opkg-keys:
  80. file.directory:
  81. - user: build
  82. - group: build
  83. - mode: 700
  84. - require:
  85. - git: build-git
  86. /srv/build/opkg-keys/key-build:
  87. file.managed:
  88. - contents_pillar: nodes:{{ grains['id'] }}:opkg:build:privkey
  89. - user: build
  90. - group: build
  91. - mode: 400
  92. - require:
  93. - file: /srv/build/opkg-keys
  94. /srv/build/opkg-keys/key-build.pub:
  95. file.managed:
  96. - contents_pillar: nodes:{{ grains['id'] }}:opkg:build:pubkey
  97. - user: build
  98. - group: build
  99. - mode: 400
  100. - require:
  101. - file: /srv/build/opkg-keys