Git Product home page Git Product logo

ansible-role-hd_idle's Introduction

Ansible role: hd_idle

Build status Ansible Role

Install hd-idle from source. This program is useful to spin down harddrives after a given timeout of inactivity. This can save power and maybe extend the lifespan of the spinning disk.

Requirements

Operating system support for /proc/diskstats, Debian compatibility.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

hd_idle_version: 1.05

The version to install. If changed, hd_idle_checksum also needs to be adapted.

hd_idle_checksum: sha256:4efefe79d145b50e055582730d9d685e485da3df3dad90fef030036d52aa3a0c

The checksum. We do this to enable trust in the downloaded code as well as enabling downloads without https cert verification (which is problematic on old python installs).

hd_idle_compile_dir: /tmp/hd_idle

The directory to use for compilation purposes.

Dependencies

None.

Example Playbook

- hosts: raspberrypis
  roles:
     - { role: infothrill.hd_idle }

Changelog

2.1.0

  • Code linted to modern standards and minor security risks adressed (file permissions)
  • Drop support for ansible older than 5
  • Drop support for python older than 3.8
  • Switch to Github Actions for CI

2.0.2

  • Drop support for ansible older than 2.9
  • Upgrade molecule to 3.0.x
  • added support for ansible 2.10, 3.0
  • add support for python 3.7+

2.0.1

  • increase timeout for download to 60 sec
  • explicitly set owner of unpacked source code to root

2.0.0

  • dropped support for ansible 2.4
  • added support for ansible 2.8
  • switched testing toolchain to python 3.6
  • upgraded molecule and ansible-lint

1.4.1

  • added testing for ansible 2.8
  • added experimental test for debian buster

1.4.0

  • added basic lint/syntax test using travis
  • renamed role to hd_idle (from hd-idle)

1.3

  • added test for ansible 2.6

1.2.0

  • added test for ansible 2.4, 2.5
  • dropped support for ansible 2.1
  • upgraded molecule to 2.15
  • added test for debian stretch 9.4

1.2.0

  • upgraded molecule
  • fixed molecule paybook

1.1.0

  • added test for ansible 2.3
  • fixed deprecation warnings in ansible 2.3

1.0.0

  • initial release

License

MIT

Author Information

This role was created in 2017 by Paul Kremer.

ansible-role-hd_idle's People

Contributors

infothrill avatar pyup-bot avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ansible-role-hd_idle's Issues

Cannot compile

Running ansible-playbook (with 'become'), I have an error :

[...]
signfile hd-idle_1.05.dsc​​
gpg: skipped \"Christian Mueller <[email protected]>\": No secret key
​​gpg: dpkg-sign.bnYuvjTO/hd-idle_1.05.dsc: clear-sign failed: No secret key
​​dpkg-buildpackage: error: failed to sign .dsc file

Althought I've secret keys in my gpg keyring...

I've got it working by changing the following line in hd_idle.yml :

dpkg-buildpackage -rfakeroot

into :

dpkg-buildpackage -rfakeroot -uc -us

But I've no idea why it fails out of the box... Is there any unlisted requirement with gpg ?

Full log :

{"ansible_loop_var": "item", "changed": true, "cmd": ["dpkg-buildpackage", "-rfakeroot"], "delta": "0:00:24.898030", "end": "2019-12-07 22:39:50.755218", "item": "dpkg-buildpackage -rfakeroot", "msg": "non-zero return code", "rc": 25, "start": "2019-12-07 22:39:25.857188", "stderr": "dpkg-buildpackage: warning: using a gain-root-command while being root\n dpkg-source --before-build hd-idle\n fakeroot debian/rules clean\ndh: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_auto_clean: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_clean: Compatibility levels before 9 are deprecated (level 7 in use)\n dpkg-source -b hd-idle\n debian/rules build\ndh: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_auto_configure: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_auto_build: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_auto_test: Compatibility levels before 9 are deprecated (level 7 in use)\n fakeroot debian/rules binary\ndh: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_auto_install: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_installinit: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_strip: Compatibility levels before 9 are deprecated (level 7 in use)\ndh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)\n dpkg-genbuildinfo\n dpkg-genchanges >../hd-idle_1.05_armhf.changes\ndpkg-genchanges: info: including full source code in upload\n dpkg-source --after-build hd-idle\n signfile hd-idle_1.05.dsc\ngpg: skipped \"Christian Mueller <[email protected]>\": No secret key\ngpg: dpkg-sign.bnYuvjTO/hd-idle_1.05.dsc: clear-sign failed: No secret key\ndpkg-buildpackage: error: failed to sign .dsc file", "stderr_lines": ["dpkg-buildpackage: warning: using a gain-root-command while being root", " dpkg-source --before-build hd-idle", " fakeroot debian/rules clean", "dh: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_auto_clean: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_clean: Compatibility levels before 9 are deprecated (level 7 in use)", " dpkg-source -b hd-idle", " debian/rules build", "dh: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_auto_configure: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_auto_build: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_auto_test: Compatibility levels before 9 are deprecated (level 7 in use)", " fakeroot debian/rules binary", "dh: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_auto_install: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_installinit: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_strip: Compatibility levels before 9 are deprecated (level 7 in use)", "dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)", " dpkg-genbuildinfo", " dpkg-genchanges >../hd-idle_1.05_armhf.changes", "dpkg-genchanges: info: including full source code in upload", " dpkg-source --after-build hd-idle", " signfile hd-idle_1.05.dsc", "gpg: skipped \"Christian Mueller <[email protected]>\": No secret key", "gpg: dpkg-sign.bnYuvjTO/hd-idle_1.05.dsc: clear-sign failed: No secret key", "dpkg-buildpackage: error: failed to sign .dsc file"], "stdout": "dpkg-buildpackage: info: source package hd-idle\ndpkg-buildpackage: info: source version 1.05\ndpkg-buildpackage: info: source distribution unstable\ndpkg-buildpackage: info: source changed by Christian Mueller <[email protected]>\ndpkg-buildpackage: info: host architecture armhf\ndh clean \n dh_testdir\n dh_auto_clean\n\tmake -j1 distclean\nmake[1]: Entering directory '/tmp/hd_idle/hd-idle'\nrm -f hd-idle.o hd-idle\nmake[1]: Leaving directory '/tmp/hd_idle/hd-idle'\n dh_clean\ndpkg-source: info: using source format '3.0 (native)'\ndpkg-source: info: building hd-idle in hd-idle_1.05.tar.xz\ndpkg-source: info: building hd-idle in hd-idle_1.05.dsc\ndh build \n dh_testdir\n dh_update_autotools_config\n dh_auto_configure\n dh_auto_build\n\tmake -j1\nmake[1]: Entering directory '/tmp/hd_idle/hd-idle'\ncc -Wall -c -o hd-idle.o hd-idle.c\ncc -o hd-idle hd-idle.o \nmake[1]: Leaving directory '/tmp/hd_idle/hd-idle'\n dh_auto_test\n create-stamp debian/debhelper-build-stamp\ndh binary \n dh_testroot\n dh_prep\n dh_auto_install\n\tmake -j1 install DESTDIR=/tmp/hd_idle/hd-idle/debian/hd-idle AM_UPDATE_INFO_DIR=no\nmake[1]: Entering directory '/tmp/hd_idle/hd-idle'\ninstall -D -g root -o root hd-idle /tmp/hd_idle/hd-idle/debian/hd-idle/usr/sbin/hd-idle\ninstall -D -g root -o root hd-idle.1 /tmp/hd_idle/hd-idle/debian/hd-idle/usr/share/man/man1/hd-idle.1\nmake[1]: Leaving directory '/tmp/hd_idle/hd-idle'\n dh_installdocs\n dh_installchangelogs\n dh_installman\n dh_installinit\n dh_perl\n dh_link\n dh_strip_nondeterminism\n dh_compress\n dh_fixperms\n dh_strip\n dh_makeshlibs\n dh_shlibdeps\n dh_installdeb\n dh_gencontrol\n dh_md5sums\n dh_builddeb\ndpkg-deb: building package 'hd-idle-dbgsym' in '../hd-idle-dbgsym_1.05_armhf.deb'.\ndpkg-deb: building package 'hd-idle' in '../hd-idle_1.05_armhf.deb'.\ndpkg-buildpackage: info: full upload; Debian-native package (full source is included)", "stdout_lines": ["dpkg-buildpackage: info: source package hd-idle", "dpkg-buildpackage: info: source version 1.05", "dpkg-buildpackage: info: source distribution unstable", "dpkg-buildpackage: info: source changed by Christian Mueller <[email protected]>", "dpkg-buildpackage: info: host architecture armhf", "dh clean ", " dh_testdir", " dh_auto_clean", "\tmake -j1 distclean", "make[1]: Entering directory '/tmp/hd_idle/hd-idle'", "rm -f hd-idle.o hd-idle", "make[1]: Leaving directory '/tmp/hd_idle/hd-idle'", " dh_clean", "dpkg-source: info: using source format '3.0 (native)'", "dpkg-source: info: building hd-idle in hd-idle_1.05.tar.xz", "dpkg-source: info: building hd-idle in hd-idle_1.05.dsc", "dh build ", " dh_testdir", " dh_update_autotools_config", " dh_auto_configure", " dh_auto_build", "\tmake -j1", "make[1]: Entering directory '/tmp/hd_idle/hd-idle'", "cc -Wall -c -o hd-idle.o hd-idle.c", "cc -o hd-idle hd-idle.o ", "make[1]: Leaving directory '/tmp/hd_idle/hd-idle'", " dh_auto_test", " create-stamp debian/debhelper-build-stamp", "dh binary ", " dh_testroot", " dh_prep", " dh_auto_install", "\tmake -j1 install DESTDIR=/tmp/hd_idle/hd-idle/debian/hd-idle AM_UPDATE_INFO_DIR=no", "make[1]: Entering directory '/tmp/hd_idle/hd-idle'", "install -D -g root -o root hd-idle /tmp/hd_idle/hd-idle/debian/hd-idle/usr/sbin/hd-idle", "install -D -g root -o root hd-idle.1 /tmp/hd_idle/hd-idle/debian/hd-idle/usr/share/man/man1/hd-idle.1", "make[1]: Leaving directory '/tmp/hd_idle/hd-idle'", " dh_installdocs", " dh_installchangelogs", " dh_installman", " dh_installinit", " dh_perl", " dh_link", " dh_strip_nondeterminism", " dh_compress", " dh_fixperms", " dh_strip", " dh_makeshlibs", " dh_shlibdeps", " dh_installdeb", " dh_gencontrol", " dh_md5sums", " dh_builddeb", "dpkg-deb: building package 'hd-idle-dbgsym' in '../hd-idle-dbgsym_1.05_armhf.deb'.", "dpkg-deb: building package 'hd-idle' in '../hd-idle_1.05_armhf.deb'.", "dpkg-buildpackage: info: full upload; Debian-native package (full source is included)"]}

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/tests.yml
  • actions/checkout v3
  • actions/setup-python v5
pip_requirements
requirements.txt
  • ansible-lint ==6.15.0
  • molecule ==4.0.4
  • molecule-vagrant ==2.0.0
  • python-vagrant ==1.0.0
  • testinfra ==6.0.0
  • yamllint ==1.31.0

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

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.