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.

205 lines
7.6 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. * https://www.openvz-diff-backups.fr/
  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. * rudder-node
  66. * https://www.rudder-project.org
  67. * allow to configure a debian/ubuntu rudder node to report to a rudder server
  68. * you need a working rudder-server (https://www.rudder-project.org/doc-4.1/_install_rudder_server.html)
  69. * use rudder_server variable to configure your rudderserver IP (rudder advice to use IP addresses instead of DNS)
  70. * unbound
  71. * Possibility to deploy unbound as a local resolver, with forwading zone to your local DNS server (ie .lan, .home, ...)
  72. * You need to add unbound variables (see below)
  73. * ssh-curve : based from https://blog.arnaudminable.net/secure-shell-mon-amour-dechu/
  74. * 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)
  75. * needs debian jessie or later, centos 7 or later
  76. * configure ssh to use exclusively actual most secure cipher and algorithms
  77. * allow ssh port, listen address, password authent customization
  78. * generate ed25519 keys for server instead of RSA
  79. * configure ssh client to use strong algorithms
  80. * will create compatibility problem with old ssh versions (openwrt, old putty, debian wheezy)
  81. * prometheus_nodexporter : allow configuration for node with prometheus node-exporter
  82. * debian 9 and centos 7 compatible
  83. * You can configure prometheus_exporter_listen_address (default 0.0.0.0) and prometheus_exporter_listen_port (default 9100)
  84. * use file_sd_configs on prometheus server with prometheus_sd_directory (default to /etc/prometheus/nodes/) :
  85. ```
  86. - job_name: 'node'
  87. file_sd_configs:
  88. - files:
  89. - '{{ prometheus_sd_directory }}/*.json'
  90. - '{{ prometheus_sd_directory }}/*.yml'
  91. - '{{ prometheus_sd_directory }}/*.yaml'
  92. ```
  93. ## example host file
  94. =====
  95. ```yaml
  96. ---
  97. admin_ssh_keys:
  98. 0: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZXK3ufonx+zNQ1x6cSWuUWckB/xf9sKZ+mRgY5SPXzqrxSkqNSmr9JQ6xzvhxKEVcFWsi50op1WWtRo3HG3p3+EHKXeCyzt5QnczDlVOoQbB8kgI0byKcvXux1inL4/Q4DbVLUbDFnynD/C5aAyYMYePahMxR+AQr60DD+7Ty6pcEVih1wwHIlxWziY1EF6sEzQwz/PiTxWIZkKHl/WPGagS9Pp/5nQfdZy0AS/JqbzNyMEg51+XedADuqseV4GXDzrzDYLJXJFv1PFVJxRWLrjChKrUMqyszUySkZMr5YSPXlsV0bi+0xivYEsXvIkLORV96JTZosYbV+0aFKDPv root@debian
  99. default_packages_debian: htop
  100. description: machine test
  101. # NTP
  102. ntp_servers:
  103. - 0.pool.ntp.org
  104. - 1.pool.ntp.org
  105. - 2.pool.ntp.org
  106. disable_ipv6: true
  107. # Update
  108. deb_packages_to_update:
  109. - apache2
  110. centos_packages_to_update:
  111. - httpd
  112. # Mail
  113. domain: test.net
  114. # MariaDB
  115. mariadb_version: 10.0
  116. mysql_root_password: changeme
  117. mysql_host: localhost
  118. # ircbouncer
  119. znc_version: 1.4
  120. irc_nick: (required)
  121. irc_ident: (required)
  122. irc_realname: (required)
  123. irc_quitmsg: (required)
  124. irc_password_hash: (required) # http://wiki.znc.in/Configuration#Pass
  125. irc_password_salt: (required) # http://wiki.znc.in/Configuration#Pass
  126. irc_timezone: "Europe/Paris" #Example: "Europe/Paris"
  127. network_address: irc.my.network.net
  128. network_port: 6697
  129. network_channel: 1337Chan
  130. # xmpp
  131. prosody_admin: "admin@test.net"
  132. prosody_virtual_domain: "test.net"
  133. prosody_accounts: admin@test.net
  134. #Wallabag
  135. wallabag_version: 1.8.1
  136. wallabag_domain: "read.{{ domain }}"
  137. wallabag_salt: (required)
  138. wallabag_db_username: wallabag
  139. wallabag_db_password: (required)
  140. wallabag_db_database: wallabag
  141. #xymon
  142. xymon_server: yyy.yyy.yyy.yyy # server IP address (mandatory)
  143. xymon_htname: admin # server user for webinterface use
  144. xymon_htpasswd: mysecurepasswd # server password for webinterface use
  145. ## xymon per client configuration (ie usually done in host_var)##
  146. monitoring_file: dns ## Where to store the host in hosts.d xymon server directory (optionnal)
  147. monitoring_section: dns ## Name of the page to use in xymon server webpage tree view (optionnal)
  148. monitoring_ip: xxx.xxx.xxx.xxx ## IP address of the client to add in server (mandatory)
  149. xymon_checks: "#" ## Checks to use for this client. Default '#' do a simple ping check
  150. xymon_disabled_sondes: ## Allow to disable checks on clients (DEBIAN >= 8 only)
  151. - ntpq
  152. - libs
  153. #ovzdb
  154. ## You can duplicate backup locally and remotely
  155. ## by using openvz host as backup_server and
  156. ## remote server as upload_server
  157. ## I advice to customize cron hour to have
  158. ## backup, then purge, then upload
  159. backup_server: xxx.xxx.xxx.xxx
  160. backup_dir: "/var/lib/vz/backups/OpenVZ/"
  161. backup_minute: 10
  162. backup_hour: 02
  163. purge_minute: 10
  164. purge_hour: 03
  165. upload_server: yyy.yyy.yyy.yyy
  166. upload_dir: "/var/lib/vz/backups/OpenVZ/"
  167. upload_minute: 10
  168. upload_hour: 05
  169. admin_email: "your_email@example.com"
  170. # rudder-node
  171. rudder_server: 192.168.0.100
  172. # vim: set textwidth=0 ft=yaml:
  173. unbound_local_zone: "lan"
  174. unbound_forward_dns: XXX.XXX.XXX.XXX
  175. # ssh-curve
  176. # ssh_port: (default 22)
  177. # ssh_ipv4_listen: (default "0.0.0.0")
  178. # ssh_ipv6_listen: (default "::")
  179. # ssh_authorizedkeysfile: (default ".ssh/authorized_keys")
  180. # ssh_pwd_authent: (default "no")
  181. ```