init.sls 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. - rsync
  18. user.present:
  19. - name: build
  20. - shell: /bin/bash
  21. - home: /home/build
  22. - createhome: True
  23. - gid_from_name: True
  24. - require:
  25. - group: build
  26. group.present:
  27. - name: build
  28. - system: False
  29. /home/build/.vimrc:
  30. file.managed:
  31. - source: salt://vim/vimrc
  32. - require:
  33. - user: build
  34. /home/build/.bashrc:
  35. file.managed:
  36. - source: salt://bash/bashrc.user
  37. - template: jinja
  38. - require:
  39. - user: build
  40. git-config:
  41. file.managed:
  42. - name: /home/build/.gitconfig
  43. - source: salt://build/gitconfig.build
  44. - user: build
  45. - group: build
  46. - require:
  47. - user: build
  48. build-git:
  49. file.directory:
  50. - name: /srv/build
  51. - user: build
  52. - group: build
  53. - mode: 755
  54. - require:
  55. - user: build
  56. git.latest:
  57. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-build.git
  58. - target: /srv/build
  59. - user: build
  60. - update_head: False
  61. - require:
  62. - pkg: build
  63. - user: build
  64. - file: build-git
  65. firmware-git:
  66. file.directory:
  67. - name: /srv/build/output
  68. - user: build
  69. - mode: 755
  70. - require:
  71. - git: build-git
  72. git.latest:
  73. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-website.git
  74. - target: /srv/build/output
  75. - branch: signing
  76. - user: build
  77. - update_head: False
  78. - require:
  79. - file: firmware-git
  80. /srv/build/opkg-keys:
  81. file.directory:
  82. - user: build
  83. - group: build
  84. - mode: 700
  85. - require:
  86. - git: build-git
  87. /srv/build/opkg-keys/key-build:
  88. file.managed:
  89. - contents_pillar: nodes:{{ grains['id'] }}:opkg:build:privkey
  90. - user: build
  91. - group: build
  92. - mode: 400
  93. - require:
  94. - file: /srv/build/opkg-keys
  95. /srv/build/opkg-keys/key-build.pub:
  96. file.managed:
  97. - contents_pillar: nodes:{{ grains['id'] }}:opkg:build:pubkey
  98. - user: build
  99. - group: build
  100. - mode: 400
  101. - require:
  102. - file: /srv/build/opkg-keys