sanitize configuration files
This commit is contained in:
		| @@ -1,40 +1,27 @@ | ||||
| # This is the main configuration file for Netdisco web and daemon apps | ||||
| # all the settings in this file will be loaded at Dancer's startup. | ||||
| # | ||||
| #    DO NOT EDIT THIS FILE | ||||
| # | ||||
| # Overrides should go to ~/environments/deployment.yml | ||||
| # See App::Netdisco::Manual::Configuration for explanations | ||||
|  | ||||
| # Web app env-related settings should go to environments/$env.yml | ||||
| # ---------------- | ||||
| # GENERAL SETTINGS | ||||
| # ---------------- | ||||
|  | ||||
| # application's name | ||||
| appname: "Netdisco" | ||||
|  | ||||
| # The default web layout to use for your application (located in | ||||
| # views/layouts/main.tt) | ||||
| layout: "main" | ||||
|  | ||||
| # when the charset is set to UTF-8 Dancer will handle for you | ||||
| # all the magic of encoding and decoding. You should not care | ||||
| # about unicode within your app when this setting is set (recommended). | ||||
| charset: "UTF-8" | ||||
|  | ||||
| # web sessions stored on disk | ||||
| session: "YAML" | ||||
|  | ||||
| # HTTP port to listen on | ||||
| port: 5000 | ||||
|  | ||||
| # logging format | ||||
| log: 'warning' | ||||
| logger: 'file' | ||||
| logger_format: '[%P] %L @%D> %m' | ||||
|  | ||||
| # web output template settings | ||||
| template: "template_toolkit" | ||||
| engines: | ||||
|   template_toolkit: | ||||
|     encoding:  'utf8' | ||||
|     start_tag: '[%' | ||||
|     end_tag:   '%]' | ||||
|     PRE_CHOMP: 1 | ||||
|  | ||||
| # Netdisco stuff (can be overidden in the environment .yml) | ||||
| # ------------ | ||||
| # WEB FRONTEND | ||||
| # ------------ | ||||
|  | ||||
| domain_suffix: '' | ||||
| no_auth: false | ||||
| port: 5000 | ||||
| path: '/' | ||||
| behind_proxy: false | ||||
| web_plugins: | ||||
|   - Inventory | ||||
|   - Report::DuplexMismatch | ||||
| @@ -47,38 +34,29 @@ web_plugins: | ||||
|   - Search::Port | ||||
|   - Device::Details | ||||
|   - Device::Ports | ||||
| #  - Device::Modules | ||||
|   # - Device::Modules | ||||
|   - Device::Neighbors | ||||
|   - Device::Addresses | ||||
| web_plugins_extra: [] | ||||
|  | ||||
| discover_no: [] | ||||
| discover_only: [] | ||||
|  | ||||
| snmpver: 2 | ||||
| snmpretries: 2 | ||||
| snmptimeout: 1000000 | ||||
|  | ||||
| # If unset, Netdisco uses "NETDISCO_HOME/netdisco-mibs", assuming you're | ||||
| # using the netdisco-deploy script to download MIBs there.  Otherwise, set | ||||
| # this, for example: | ||||
| # | ||||
| # mibhome: /usr/share/netdisco/mibs | ||||
|  | ||||
| # If unset, loads all MIBs in the mibhome directory. | ||||
| # mibdirs: | ||||
| #   - cisco | ||||
| #   - rfc | ||||
| #   - net-snmp | ||||
| # ------------- | ||||
| # NETDISCO CORE | ||||
| # ------------- | ||||
|  | ||||
| # mibhome is discovered from environment | ||||
| # mibdirs defaults to contents of mibhome | ||||
| community: ['public'] | ||||
| community_rw: ['private'] | ||||
|  | ||||
| # rights control for Interactive jobs | ||||
| vlanctl: 1 | ||||
| portctl_uplinks: 0 | ||||
| portctl_nophones: 1 | ||||
| portctl_vlans: 1 | ||||
|  | ||||
| snmpver: 2 | ||||
| snmptimeout: 1000000 | ||||
| snmpretries: 2 | ||||
| discover_no: [] | ||||
| discover_only: [] | ||||
| discover_no_type: [] | ||||
| macsuck_all_vlans: false | ||||
| macsuck_no_unnamed: false | ||||
| macsuck_bleed: false | ||||
| store_wireless_client: true | ||||
| ignore_interfaces: | ||||
|   - 'EOBC' | ||||
|   - 'unrouted VLAN' | ||||
| @@ -96,16 +74,23 @@ ignore_interfaces: | ||||
|   - 'Virtual-Access\d+' | ||||
|   - '(E|T)\d \d\/\d\/\d' | ||||
|   - 'Vlan1' | ||||
| ignore_private_nets: false | ||||
| reverse_sysname: false | ||||
| vlanctl: true | ||||
| portctl_nophones: false | ||||
| portctl_vlans: false | ||||
| portctl_uplinks: false | ||||
| no_port_control: false | ||||
|  | ||||
| # -------------- | ||||
| # BACKEND DAEMON | ||||
| # -------------- | ||||
|  | ||||
| workers: | ||||
|   # how many daemon processes for this node | ||||
|   interactives: 2 | ||||
|   pollers: 2 | ||||
|   # sleep time between polls of the database job queue | ||||
|   sleep_time: 5 | ||||
|  | ||||
| # what housekeeping tasks should this node *schedule* | ||||
| # (it only does them if workers->pollers is non-zero) | ||||
| #housekeeping: | ||||
| #  discoverall: | ||||
| #    when: '0 9 * * *' | ||||
| @@ -115,3 +100,23 @@ workers: | ||||
| #  macwalk: | ||||
| #    when: | ||||
| #      hour: '*/2' | ||||
|  | ||||
| # --------------- | ||||
| # DANCER INTERNAL | ||||
| # --------------- | ||||
|  | ||||
| charset: 'UTF-8' | ||||
| warnings: false | ||||
| show_errors: false | ||||
| engines: | ||||
|   template_toolkit: | ||||
|     encoding: 'utf8' | ||||
|     start_tag: '[%' | ||||
|     end_tag: '%]' | ||||
|     PRE_CHOMP: 1 | ||||
| layout: 'main' | ||||
| session: 'YAML' | ||||
| template: 'template_toolkit' | ||||
| route_cache: true | ||||
| appname: 'Netdisco' | ||||
|  | ||||
|   | ||||
| @@ -1,21 +1,13 @@ | ||||
| # configuration file for production environment | ||||
| # | ||||
| # NETDISCO 2 CONFIGURATION FILE | ||||
| # | ||||
| # Settings in this file override share/config.yml | ||||
| # See App::Netdisco::Manual::Configuration for more info. | ||||
|  | ||||
| # only log warning and error messsages | ||||
| log: "warning" | ||||
| # ------------------ | ||||
| # ESSENTIAL SETTINGS | ||||
| # ------------------ | ||||
|  | ||||
| # log message to a file in logs/ | ||||
| logger: "file" | ||||
|  | ||||
| # don't consider warnings critical | ||||
| warnings: 0 | ||||
|  | ||||
| # hide errors  | ||||
| show_errors: 0 | ||||
|  | ||||
| # cache route resolution for maximum performance | ||||
| route_cache: 1 | ||||
|  | ||||
| # database connections | ||||
| plugins: | ||||
|   DBIC: | ||||
|     # alter dsn/user/pass for your local Netdisco DB | ||||
| @@ -28,20 +20,23 @@ plugins: | ||||
|         RaiseError: 1 | ||||
|         AutoCommit: 1 | ||||
|  | ||||
| # uncomment and set to 1 to disable authentication/login | ||||
| # no_auth: 0 | ||||
| # -------------------- | ||||
| # RECOMMENDED SETTINGS | ||||
| # -------------------- | ||||
|  | ||||
| # will be stripped from fqdn when displayed in the web UI | ||||
| # also, do not forget the leading dot | ||||
| # domain_suffix: '.example.com' | ||||
| # also, do not forget the leading dot. | ||||
| #  domain_suffix: '.example.com' | ||||
|  | ||||
| # local settings for Netdisco poller and port changes | ||||
| # uncomment and set to true to disable authentication/login. | ||||
| #  no_auth: false | ||||
|  | ||||
| # If unset, loads all MIBs | ||||
| # mibdirs: | ||||
| #   - cisco | ||||
| #   - rfc | ||||
| #   - net-snmp | ||||
| # community: ['public'] | ||||
| # community_rw: ['private'] | ||||
|  | ||||
| # if unset, Netdisco loads all MIBs in mibhome directory. | ||||
| #  mibdirs: | ||||
| #    - cisco | ||||
| #    - rfc | ||||
| #    - net-snmp | ||||
|  | ||||
| community: ['public'] | ||||
| community_rw: ['private'] | ||||
|   | ||||
| @@ -1,49 +0,0 @@ | ||||
| # configuration file for development environment | ||||
|  | ||||
| # the logger engine to use | ||||
| # console: log messages to STDOUT (your console where you started the | ||||
| #          application server) | ||||
| # file:    log message to a file in log/ | ||||
| logger: "console" | ||||
|  | ||||
| # the log level for this environement | ||||
| # core is the lowest, it shows Dancer's core log messages as well as yours | ||||
| # (debug, warning and error) | ||||
| log: "debug" | ||||
|  | ||||
| # should Dancer consider warnings as critical errors? | ||||
| warnings: 1 | ||||
|  | ||||
| # should Dancer show a stacktrace when an error is caught? | ||||
| show_errors: 1 | ||||
|  | ||||
| # database connections | ||||
| plugins: | ||||
|   DBIC: | ||||
|     # alter dsn/user/pass for your local Netdisco DB | ||||
|     netdisco: | ||||
|       schema_class: 'App::Netdisco::DB' | ||||
|       dsn: 'dbi:Pg:dbname=netdisco;host=localhost' | ||||
|       user: 'netdisco' | ||||
|       pass: 'netdisco' | ||||
|       options: | ||||
|         RaiseError: 1 | ||||
|         AutoCommit: 1 | ||||
|  | ||||
| # uncomment and set to 1 to disable authentication/login | ||||
| no_auth: 1 | ||||
|  | ||||
| # will be stripped from fqdn when displayed in the web UI | ||||
| # also, do not forget the leading dot | ||||
| # domain_suffix: '.example.com' | ||||
|  | ||||
| # local settings for Netdisco poller and port changes | ||||
|  | ||||
| mibdirs: | ||||
|   - cisco | ||||
|   - rfc | ||||
|   - net-snmp | ||||
|  | ||||
| community: ['public'] | ||||
| community_rw: ['private'] | ||||
|  | ||||
		Reference in New Issue
	
	Block a user