init.sls 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. - libssl-dev
  15. - lua5.1
  16. - rsync
  17. - zlib1g-dev
  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/.ssh/id_rsa:
  30. file.managed:
  31. - contents_pillar: nodes:{{grains.id}}:ssh:build:privkey
  32. - mode: 600
  33. - user: build
  34. - makedirs: True
  35. - require:
  36. - user: build
  37. /home/build/.ssh/id_rsa.pub:
  38. file.managed:
  39. - contents_pillar: nodes:{{grains.id}}:ssh:build:privkey
  40. - makedirs: True
  41. - require:
  42. - user: build
  43. /home/build/.vimrc:
  44. file.managed:
  45. - source: salt://vim/vimrc
  46. - require:
  47. - user: build
  48. /home/build/.bashrc:
  49. file.managed:
  50. - source: salt://bash/bashrc.user
  51. - template: jinja
  52. - require:
  53. - user: build
  54. git-config:
  55. file.managed:
  56. - name: /home/build/.gitconfig
  57. - source: salt://build/gitconfig.build
  58. - user: build
  59. - group: build
  60. - require:
  61. - user: build
  62. build-git:
  63. file.directory:
  64. - name: /srv/build
  65. - user: build
  66. - group: build
  67. - mode: 755
  68. - require:
  69. - user: build
  70. git.latest:
  71. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-build.git
  72. - target: /srv/build
  73. - user: build
  74. - update_head: False
  75. - require:
  76. - pkg: build
  77. - user: build
  78. - file: build-git
  79. firmware-git:
  80. file.directory:
  81. - name: /srv/build/output
  82. - user: build
  83. - mode: 755
  84. - require:
  85. - git: build-git
  86. git.latest:
  87. - name: gogs@git.ffho.net:FreifunkHochstift/ffho-firmware-website.git
  88. - target: /srv/build/output
  89. - branch: signing
  90. - user: build
  91. - update_head: False
  92. - require:
  93. - file: firmware-git
  94. /srv/build/opkg-keys:
  95. file.directory:
  96. - user: build
  97. - group: build
  98. - mode: 700
  99. - require:
  100. - git: build-git
  101. /srv/build/opkg-keys/key-build:
  102. file.managed:
  103. - source: salt://build/key-build
  104. - user: build
  105. - group: build
  106. - mode: 400
  107. - require:
  108. - file: /srv/build/opkg-keys
  109. /srv/build/opkg-keys/key-build.pub:
  110. file.managed:
  111. - source: salt://build/key-build.pub
  112. - user: build
  113. - group: build
  114. - mode: 400
  115. - require:
  116. - file: /srv/build/opkg-keys