You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
7.9 KiB

10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. ## configz
  2. =======
  3. Yet another ansible's playbook repository
  4. ## playbooks
  5. ======
  6. * postint.yml
  7. * run common role to install you packages, deploy ssh, keys, ...
  8. * posting-full.yml
  9. * use roles common, xymon-client and rudder-node to have a fully compliant server
  10. ## roles
  11. ======
  12. * Common
  13. * provides **common** configuration
  14. * https://github.com/nojhan/liquidprompt <3
  15. * SSH keys
  16. * provides ssh keys deployement and blacklist
  17. * possibility to use dictionnaries to list keys
  18. * possibility to deploy different pools of keys on different servers with ansible hash_behaviour = merge
  19. * Update
  20. * allow install all update on hosts (tag normal)
  21. * allow update specific packages from list (tags packages)
  22. * use host_vars, group_vars or default vars to update packages list
  23. * Wallabag
  24. * provides **Wallabag** configuration
  25. * Imported with <3 from https://github.com/al3x/sovereign/
  26. * **Not yet READY**
  27. * Prosody
  28. * Provides XMPP (Jabber) server
  29. * Imported with <3 from https://github.com/al3x/sovereign/
  30. * **Not yet READY**
  31. * IRCBouncer
  32. * Provides a ZNC Config
  33. * Imported with <3 from https://github.com/al3x/sovereign/
  34. * Mail
  35. * provides a complete **mail** server for a given domain name and the vdomain capability for other domains.
  36. * **Note** : This role starts in order : common, mariadb, and mail. If you don't want one of them, please comment out.
  37. * **Note2** : If you already have a SQL server, **it wont erase the original config**, but it needs a ``~/.my.cnf``.
  38. * **TODO** :
  39. * Razor/Pyzor
  40. * Roundcube
  41. * Simplify template copy
  42. * Postgrey
  43. * MariaDB
  44. * provides a lambda **MariaDB** server peered on ``127.0.0.1:3306`` with ``root`` MySQL password on ``~/.my.cnf``
  45. * ownCloud
  46. * provides a simple instance of **ownCloud**, with ``NGINX, PHP5-FPM, and MariaDB``
  47. * xymon-client and xymon-server
  48. * https://www.xymon.com/
  49. * Provide installation of xymon server and xymon client monitoring system
  50. * Available for Debian (6 to 8) and Centos (6 to 7). **WARN** : xymon-server only for Debian (Centos dependencies are really hard to automate)
  51. * Configure apache for xymon-server
  52. * Configure xymon client and add the client in xymon server configuration to allow fetch data
  53. * Allow to disable and drop sonde from client
  54. * **Note** : Using xymon-client tag/role needs a working xymon-server (whenever the server was installed with the playbook or not)
  55. * Cloud be (theoretically, to be tested) used to update xymon server binaries to last stable release
  56. * ovzdb
  57. * http://projets.developpeur-neurasthenique.fr/projects/openvz-diff-backups
  58. * Install openvz-diff-backup to an openvz host to backup container
  59. * enable update of openvz-diff-backup thanks to 0.9.4 version
  60. * enable backup AND upload feature via cron
  61. * enable purge feature via cron
  62. * enable customization of configuration file
  63. * use standard installation method (conf in /etc, link binary to /usr/local/bin)
  64. * provide bonus hook to create files when problems occurs (additionnally to send emails), allowing monitoring with standard tool (ie xymon and else)
  65. * Possibility to use beta version in file directory: hard coded for the moment, name the file openvz-diff-backups_v0.9.8-beta.tar.gz and use -e beta=true on command line
  66. * rudder-node
  67. * https://www.rudder-project.org
  68. * allow to configure a debian/ubuntu rudder node to report to a rudder server
  69. * you need a working rudder-server (https://www.rudder-project.org/doc-4.1/_install_rudder_server.html)
  70. * use rudder_server variable to configure your rudderserver IP (rudder advice to use IP addresses instead of DNS)
  71. * unbound
  72. * Possibility to deploy unbound as a local resolver, with forwading zone to your local DNS server (ie .lan, .home, ...)
  73. * You need to add unbound variables (see below)
  74. * ssh-curve : based from https://blog.arnaudminable.net/secure-shell-mon-amour-dechu/
  75. * DISCLAIMER : using this role WILL trigger "breaking attempt messages" with SSH as server keys are changed, do not forget to clean your know_hosts file(s)
  76. * needs debian jessie or later, centos 7 or later
  77. * configure ssh to use exclusively actual most secure cipher and algorithms
  78. * allow ssh port, listen address, password authent customization
  79. * generate ed25519 keys for server instead of RSA
  80. * configure ssh client to use strong algorithms
  81. * will create compatibility problem with old ssh versions (openwrt, old putty, debian wheezy)
  82. * prometheus_nodexporter : allow configuration for node with prometheus node-exporter
  83. * debian 9 and centos 7 compatible
  84. * You can configure prometheus_exporter_listen_address (default 0.0.0.0) and prometheus_exporter_listen_port (default 9100)
  85. * use file_sd_configs on prometheus server with prometheus_sd_directory (default to /etc/prometheus/nodes/) :
  86. ```
  87. - job_name: 'node'
  88. file_sd_configs:
  89. - files:
  90. - '{{ prometheus_sd_directory }}/*.json'
  91. - '{{ prometheus_sd_directory }}/*.yml'
  92. - '{{ prometheus_sd_directory }}/*.yaml'
  93. ```
  94. ## example host file
  95. =====
  96. ```yaml
  97. ---
  98. admin_ssh_keys:
  99. 0: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZXK3ufonx+zNQ1x6cSWuUWckB/xf9sKZ+mRgY5SPXzqrxSkqNSmr9JQ6xzvhxKEVcFWsi50op1WWtRo3HG3p3+EHKXeCyzt5QnczDlVOoQbB8kgI0byKcvXux1inL4/Q4DbVLUbDFnynD/C5aAyYMYePahMxR+AQr60DD+7Ty6pcEVih1wwHIlxWziY1EF6sEzQwz/PiTxWIZkKHl/WPGagS9Pp/5nQfdZy0AS/JqbzNyMEg51+XedADuqseV4GXDzrzDYLJXJFv1PFVJxRWLrjChKrUMqyszUySkZMr5YSPXlsV0bi+0xivYEsXvIkLORV96JTZosYbV+0aFKDPv root@debian
  100. default_packages_debian: htop
  101. description: machine test
  102. # NTP
  103. ntp_servers:
  104. - 0.pool.ntp.org
  105. - 1.pool.ntp.org
  106. - 2.pool.ntp.org
  107. disable_ipv6: true
  108. # Update
  109. deb_packages_to_update:
  110. - apache2
  111. centos_packages_to_update:
  112. - httpd
  113. # Mail
  114. domain: test.net
  115. # MariaDB
  116. mariadb_version: 10.0
  117. mysql_root_password: changeme
  118. mysql_host: localhost
  119. # ircbouncer
  120. znc_version: 1.4
  121. irc_nick: (required)
  122. irc_ident: (required)
  123. irc_realname: (required)
  124. irc_quitmsg: (required)
  125. irc_password_hash: (required) # http://wiki.znc.in/Configuration#Pass
  126. irc_password_salt: (required) # http://wiki.znc.in/Configuration#Pass
  127. irc_timezone: "Europe/Paris" #Example: "Europe/Paris"
  128. network_address: irc.my.network.net
  129. network_port: 6697
  130. network_channel: 1337Chan
  131. # xmpp
  132. prosody_admin: "admin@test.net"
  133. prosody_virtual_domain: "test.net"
  134. prosody_accounts: admin@test.net
  135. #Wallabag
  136. wallabag_version: 1.8.1
  137. wallabag_domain: "read.{{ domain }}"
  138. wallabag_salt: (required)
  139. wallabag_db_username: wallabag
  140. wallabag_db_password: (required)
  141. wallabag_db_database: wallabag
  142. #xymon
  143. xymon_server: yyy.yyy.yyy.yyy # server IP address (mandatory)
  144. xymon_htname: admin # server user for webinterface use
  145. xymon_htpasswd: mysecurepasswd # server password for webinterface use
  146. ## xymon per client configuration (ie usually done in host_var)##
  147. monitoring_file: dns ## Where to store the host in hosts.d xymon server directory (optionnal)
  148. monitoring_section: dns ## Name of the page to use in xymon server webpage tree view (optionnal)
  149. monitoring_ip: xxx.xxx.xxx.xxx ## IP address of the client to add in server (mandatory)
  150. xymon_checks: "#" ## Checks to use for this client. Default '#' do a simple ping check
  151. xymon_disabled_sondes: ## Allow to disable checks on clients (DEBIAN >= 8 only)
  152. - ntpq
  153. - libs
  154. #ovzdb
  155. ## You can duplicate backup locally and remotely
  156. ## by using openvz host as backup_server and
  157. ## remote server as upload_server
  158. ## I advice to customize cron hour to have
  159. ## backup, then purge, then upload
  160. backup_server: xxx.xxx.xxx.xxx
  161. backup_dir: "/var/lib/vz/backups/OpenVZ/"
  162. backup_minute: 10
  163. backup_hour: 02
  164. purge_minute: 10
  165. purge_hour: 03
  166. upload_server: yyy.yyy.yyy.yyy
  167. upload_dir: "/var/lib/vz/backups/OpenVZ/"
  168. upload_minute: 10
  169. upload_hour: 05
  170. admin_email: "your_email@example.com"
  171. # rudder-node
  172. rudder_server: 192.168.0.100
  173. # vim: set textwidth=0 ft=yaml:
  174. unbound_local_zone: "lan"
  175. unbound_forward_dns: XXX.XXX.XXX.XXX
  176. # ssh-curve
  177. # ssh_port: (default 22)
  178. # ssh_ipv4_listen: (default "0.0.0.0")
  179. # ssh_ipv6_listen: (default "::")
  180. # ssh_authorizedkeysfile: (default ".ssh/authorized_keys")
  181. # ssh_pwd_authent: (default "no")
  182. ```