Coder Social home page Coder Social logo

ansible-role-log2ram's Introduction

Ansible Role: log2ram

Test and release. License: MIT Ansible Role

This role installs and configures log2ram on Debian, Ubuntu, Archlinux, CentOS and Fedora systems. log2ram is mostly useful on systems which use an SD Card, like for example a Raspberry-Pi.

On Debian-based systems, the role uses the author's unofficial repository. On other distributions the installation is done manually.

Requirements

None.

Role Variables

Below is a list of the available variables and their default values. Make sure to also check the defaults/main.yml file.

log2ram_enable_on_boot: true

Whether to enable log2ram on boot or not.

log2ram_reboot_after_install: true

Whether to reboot the machine after instralling log2ram or not. The project's author recommends to reboot the machine after installing log2ram. Note that Ansible will wait for the systems to come back up and continue with the rest of the tasks.

log2ram_state: install

Possible values are:

  • install to install log2ram,
  • remove to uninstall log2ram and
  • update to update log2ram.
log2ram_size: "40M"

The ramdisk size. In case of the error /var/log.hdd/ doesn't exist.Can't sync., the size has to be increased to a value > 40M!

log2ram_use_rsync: "true"

Whether to use rsync instead of cp. According to log2ram's author, rsync offers better performance.

log2ram_mail: "false"

If set to false, the error system mail will be disabled if there's not enough space in RAM.

log2ram_path_disk: "/var/log"

Where the logs are saved.

log2ram_use_zl2r: "false"

Whether to enable zram compatibility. Note that zram must be already enabled and configured on the device if you want to use this.

log2ram_compression_algorithm: "lz4"

The compression algorithm used for zram. Check the project's README for more information.

log2ram_log_disk_size: "100M"

The uncompressed zram size.

Dependencies

None.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: server
  vars_files:
    - vars/main.yml

  roles:
    - { role: chzerv.log2ram }

The vars/main.yml file:

---
log2ram_enable_on_boot: true
log2ram_reboot_after_install: true

log2ram_size: "50M"
log2ram_use_rsync: "false"
log2ram_mail: "true"
log2ram_path_disk: "/var/log"
log2ram_use_zl2r: "false"
log2ram_compression_algorithm: "lz4"

License

MIT / BSD

Author Information

Xristos Zervakis

ansible-role-log2ram's People

Contributors

chzerv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

luispabon chriscn

ansible-role-log2ram's Issues

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.