项目作者: adfinis-sygroup

项目描述 :
This role is used to configure icingaweb2
高级语言: Jinja
项目地址: git://github.com/adfinis-sygroup/ansible-role-icinga2_web.git
创建时间: 2018-11-26T21:31:02Z
项目社区:https://github.com/adfinis-sygroup/ansible-role-icinga2_web

开源协议:GNU General Public License v3.0

下载


ROLE ICINGA2_WEB

image

image

image

This role installs and configures icingaweb2.

Requirements

What you will need to benefit from this role is a webserver installed on
the system. At Adfinis, we use the following role:

Role dependencies

This role has the following dependencies:

  1. roles:
  2. - name: 'adfinis.icinga2_agent'
  3. collections:
  4. - ansible.posix
  5. - community.general
  6. - community.mysql
  7. - robertdebock.roles

For all dependencies to be correcty installed, you need to create a
requirements.yml in your project with the content above.

Role Variables

  1. # The icingaweb2 web ui password
  2. icinga2_web_admin_pass: 'passw0rd'
  3. # icinga2 API host
  4. icinga2_web_api_host: 127.0.0.1
  5. # icinga2 API port
  6. icinga2_web_api_port: 5665
  7. # icinga2 API user
  8. icinga2_web_api_user: icingaweb2
  9. # icinga2 API password
  10. icinga2_web_api_pass: 'passw0rd'
  11. ## icingaweb2 database settings
  12. # The icingaweb2 database name
  13. icinga2_web_icingaweb2_database_name: icingaweb2
  14. # The icingaweb2 database user
  15. icinga2_web_icingaweb2_database_user: icingaweb2
  16. # The icingaweb2 database password
  17. icinga2_web_icingaweb2_database_pass: 'passw0rd'
  18. # The icingaweb2 database host
  19. icinga2_web_icingaweb2_database_host: 127.0.0.1
  20. # The icingaweb2 database port
  21. icinga2_web_icingaweb2_database_port: 3306
  22. ## Icinga2 database settings
  23. # icinga2 database name
  24. icinga2_web_icinga2_database_name: icinga2
  25. #
  26. # icinga2 database host
  27. icinga2_web_icinga2_database_host: 127.0.0.1
  28. # icinga2 database port
  29. icinga2_web_icinga2_database_port: 3306
  30. # icinga2 database user
  31. icinga2_web_icinga2_database_user: icinga2
  32. # icinga2 database password
  33. icinga2_web_icinga2_database_pass: 'passw0rd'

LDAP Authentication

To configure LDAP authentication, the following variables MUST be
configured. It is possible to enable multiple configuration backends.

  1. # Icingaweb2 LDAP authentication
  2. # For further information, consult the official icingaweb2 documentation at
  3. # https://icinga.com/docs/icingaweb2/latest/doc/04-Resources/#ldap
  4. #icinga2_web_ldap:
  5. # - name: res_ldap_example_com
  6. # host: ldap.example.com
  7. # port: 636
  8. # encryption: ldaps
  9. # root_dn: 'cn=accounts,dc=ldap,dc=example,dc=com'
  10. # bind_dn: 'uid=icingaweb2.auth,cn=systems,dc=ldap,dc=example,dc=com'
  11. # bind_pw: 'ldap password'
  12. # timeout: 5
  1. # Icingaweb2 LDAP User configuration
  2. # For further information, consult the official icingaweb2 documentation at
  3. # https://icinga.com/docs/icingaweb2/latest/doc/05-Authentication/#ldap
  4. #
  5. #icinga2_web_ldap_userconf:
  6. # - name: user_ldap_example_com # required
  7. # resource: 'res_ldap_example_com' # required
  8. # user_class: 'inetOrgPerson' # required
  9. # user_name_attribute: 'uid' # required
  10. # base_dn: 'cn=accounts,dc=ldap,dc=example,dc=com' # optional
  11. # filter: "(somefilter)" # optional
  12. icinga2_web_ldap_userconf: []
  1. # Icingaweb2 LDAP Group configuration
  2. # For further information, consult the official icingaweb2 documentation at
  3. # https://icinga.com/docs/icingaweb2/latest/doc/05-Authentication/#ldap-groups
  4. #
  5. #icinga2_web_ldap_groupconf:
  6. # - name: group_ldap_example_com # required
  7. # resource: 'res_ldap_example_com' # required
  8. # user_backend = "user_ldap_examle_com" # required
  9. # user_class: 'user' # optional
  10. # user_name_attribute: 'uid' # optional
  11. # group_class: 'group' # optional
  12. # group_name_attribute: 'gid' # optional
  13. # group_member_attribute: 'memberUid' # optional
  14. # group_filter: '(somefilter)' # optional

Icingaweb2 permissions

  1. # Icinga2 Permissions configuration
  2. # For further information, consult the official icingaweb2 documentation at
  3. # https://icinga.com/docs/icingaweb2/latest/doc/06-Security/#configuration
  4. #
  5. #icinga2_web_permissions:
  6. # - name: Administrators
  7. # users:
  8. # - admin
  9. # groups:
  10. # - Administrators
  11. # permissions:
  12. # '*'
  13. # object_filter: ""
  14. # - name: customer
  15. # users:
  16. # - customer1
  17. # permissions:
  18. # 'monitoring/command/*,module/*'
  19. # object_filter: 'host_name=*.customer.example.com"'

Example Playbook

  1. - hosts: servers
  2. roles:
  3. - { role: adfinis.icinga2_web }

License

GPL-3.0

Author Information

icinga2_web role was written by: