Giter Club home page Giter Club logo

ansible-openwrt-configuration's Introduction

OpenWrt Configuration

This role handles basic system configuration on OpenWrt targets.

Requirements

This role requires gekmihesg's Ansible library for OpenWrt on the Ansible controller.

Role Variables

  • openwrt_config_system
    A dictionary of OpenWrt system configuration settings. Keys are configuration options, values are their values. Refer to the documentation for valid values and what they do. Options not included in openwrt_config_system will not be changed. Optional.
  • openwrt_config_ntp
    A dictionary of OpenWrt NTP configuration settings. Keys are configuration options, values are their values. Refer to the documentation for valid values and what they do. Options not included in openwrt_config_ntp will not be changed. Optional.
  • openwrt_config_uhttpd
    A dictionary of uhttpd configuration settings. Keys are uhttpd configuration section names. The values are dictionaries with configuration options as keys and their values as values. Refer to the documentation for valid values and what they do. If not explicitly set, the listen_http and listen_https options of each section are set to the lan interface IPv4 address and redirect_https is enabled. Other options not included in openwrt_config_uhttpd will not be changed. To change only the listen_http and listen_https address and redirect_https setting of a section to the role default values, add the section as an empty dictionary (see example below). Optional. https://openwrt.org/docs/guide-user/services/webserver/uhttpd
  • openwrt_config_uhttpd_cert
    A dictionary of settings for self-signed X.509 certificates for uhttpd. Keys are configuration options, values are their values. Refer to the documentation for valid values and what they do. Options not included in openwrt_config_uhttpd_cert will not be changed. Optional.
  • openwrt_config_install_packages, openwrt_config_remove_packages
    A list of package names to be installed or removed, respectively. Optional.
  • openwrt_config_enable_services, openwrt_config_disable_services
    A list of service names to enable and start or disable and stop, respectively. Optional.
  • openwrt_dst_reload_time
    In timezones with daylight saving time (DST), the DST change may not properly propagate to the kernel, resulting in issues with time-based firewall rules. This option allows reloading the in-kernel timezone after changing to or from DST. Set it to a time specification as understood by cron to control when timezone gets reloaded. The default setting works in most (but not all) timezones, but reloads the kernel timezone more often than needed. Set this option to false to disable the cron job. When timezone and zonename are not set or set to UTC in openwrt_config_system, the cron job is also disabled by default. For more information, see: https://forum.openwrt.org/t/parental-control-times-not-dst-aware/92120
  • openwrt_config_cronjobs
    A list of cron jobs to set up. Each list item may be:
    1. A simple string that gets added to the root user's crontab.
    2. A dictionary with the following keys: * time
      A time specification as understood by cron. * user
      The system user to run the cron job. The user needs to exist on the system. Defaults to root. * command
      The command to run.

Dependencies

This role does not depend on any specific roles.

Example Configuration

The following is a short example for some of the configuration options this role provides:

openwrt_config_system:
  hostname: OpenWrt
  description: 'My favourite network device'
  ttylogin: true
openwrt_config_ntp:
  server:
    - 0.openwrt.pool.ntp.org
    - 1.openwrt.pool.ntp.org
    - 2.openwrt.pool.ntp.org
    - 3.openwrt.pool.ntp.org
openwrt_config_uhttpd:
  main: {}
  other:
    listen_http: []
    listen_https:
      - 192.168.0.1:8443
    home: /www/other
openwrt_config_cronjobs:
  - '0 0 * * * echo midnight'
  - time: '0 0 * * *'
    user: root
    command: 'echo midnight'

License

MIT

ansible-openwrt-configuration's People

Contributors

s-hamann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.