Skip to content

Ansible: "apt" module and loops

After upgrading Ansible to version 2.8.3, the "apt" module started spitting out deprecation warnings:

TASK [common : basic packages] ***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple items and specifying `name: "{{ item }}"`, please use `name: ['vim', 'screen', 'rsync']` and remove the loop. This feature will be removed in version 2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [hostname] => (item=['vim', 'screen', 'rsync'])

 

 

Continue reading "Ansible: "apt" module and loops"
  • Twitter
  • Bookmark Ansible: "apt" module and loops at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible: "apt" module and loops
  • Bloglines Ansible: "apt" module and loops
  • Technorati Ansible: "apt" module and loops
  • Fark this: Ansible: "apt" module and loops
  • Bookmark Ansible: "apt" module and loops at YahooMyWeb
  • Bookmark Ansible: "apt" module and loops at Furl.net
  • Bookmark Ansible: "apt" module and loops at reddit.com
  • Bookmark Ansible: "apt" module and loops at blinklist.com
  • Bookmark Ansible: "apt" module and loops at Spurl.net
  • Bookmark Ansible: "apt" module and loops at Simpy.com
  • Bookmark Ansible: "apt" module and loops at blogmarks
  • Bookmark Ansible: "apt" module and loops with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Occasional HABpanel disconnect from the openHAB server

The new display showing HABpanel works quite nice. But occasionally the fullscreen browser will lose the network connection. As far as I can see, it's not a Wi-Fi problem of the Raspberry Pi, but still annoying: in the morning the browser shows a small red warning that the connection to the openHAB server is lost, time is still correct, but temperature and the status of other devices is outdated. To fix that, I have to leave fullscreen mode, hit reload - and then there is no keyboard for going into fullscreen mode again (that's using the F11 key).

 

Continue reading "Occasional HABpanel disconnect from the openHAB server"
  • Twitter
  • Bookmark Occasional HABpanel disconnect from the openHAB server at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Occasional HABpanel disconnect from the openHAB server
  • Bloglines Occasional HABpanel disconnect from the openHAB server
  • Technorati Occasional HABpanel disconnect from the openHAB server
  • Fark this: Occasional HABpanel disconnect from the openHAB server
  • Bookmark Occasional HABpanel disconnect from the openHAB server at YahooMyWeb
  • Bookmark Occasional HABpanel disconnect from the openHAB server at Furl.net
  • Bookmark Occasional HABpanel disconnect from the openHAB server at reddit.com
  • Bookmark Occasional HABpanel disconnect from the openHAB server at blinklist.com
  • Bookmark Occasional HABpanel disconnect from the openHAB server at Spurl.net
  • Bookmark Occasional HABpanel disconnect from the openHAB server at Simpy.com
  • Bookmark Occasional HABpanel disconnect from the openHAB server at blogmarks
  • Bookmark Occasional HABpanel disconnect from the openHAB server with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel

The Raspberry Pi with the touch display for the home automation system is coming along nicely. One problem to solve: how to display the openHAB HABpanel, and which browser to use?

Firefox and Chrome don't run on Raspbian. However "Chromium" (the open source part of the Chrome browser) is. That's a good start. But how to start the browser automatically, and in full screen?

 

Continue reading "Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel"
  • Twitter
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel
  • Bloglines Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel
  • Technorati Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel
  • Fark this: Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at YahooMyWeb
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at Furl.net
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at reddit.com
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at blinklist.com
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at Spurl.net
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at Simpy.com
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel at blogmarks
  • Bookmark Automatically start a fullscreen browser on a Raspberry Pi - show openHAB HABpanel with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time

Recently I installed a Raspberry Pi with Raspbian, and attached a touchscreen to it. The device is supposed to work as a display for our openHAB home automation system. All nice and shiny, except the Pi occasionally disconnects from the Wi-Fi - apparently in order to safe power. Once the network device is needed, the Wi-Fi is reconnected. That is the default setting.

That is quite annoying, because the HABpanel will lose it's connection to the openHAB server, and no longer show widget updates. Some widgets like "time" will just continue to work, but other widgets like status of the washing machine, or the current outside temperature just show the last state, and never update.

 

Continue reading "Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time"
  • Twitter
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time
  • Bloglines Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time
  • Technorati Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time
  • Fark this: Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at YahooMyWeb
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at Furl.net
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at reddit.com
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at blinklist.com
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at Spurl.net
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at Simpy.com
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time at blogmarks
  • Bookmark Raspberry Pi: disable Wi-Fi powersave, and stay connected all the time with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Audio "too loud" and volume switch not working in Ubuntu

Installed my new laptop, and everything seemed to work, out of the box. Almost everything.

The audio was quite annoying. First of all, every application got it's own volume setting. In theory that is a nice idea, and you can control and manage the volume for every application separately. In practice, this is a nightmare: try changing the volume of an application which only once in a while sends a short notification. Or try changing the volume of the sound when you close the laptop lid. On top of that, the volume for applications like Chome and Firefox seem to be stuck at 100%. Every time I change the volume, the setting is back on "loud" the next time the browser plays something.

Second the global volume settings (Fn+"Volume up" or Fn+"Volume down") seem to have no effect at all.

 

 

Continue reading "Audio "too loud" and volume switch not working in Ubuntu"
  • Twitter
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Audio "too loud" and volume switch not working in Ubuntu
  • Bloglines Audio "too loud" and volume switch not working in Ubuntu
  • Technorati Audio "too loud" and volume switch not working in Ubuntu
  • Fark this: Audio "too loud" and volume switch not working in Ubuntu
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at YahooMyWeb
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at Furl.net
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at reddit.com
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at blinklist.com
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at Spurl.net
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at Simpy.com
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu at blogmarks
  • Bookmark Audio "too loud" and volume switch not working in Ubuntu with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine

Recently I got a new system with a NVRAM disk (nice and fast). Upon installing smartmontools, it started reporting that the error counter for the disk is increasing. For a brand new disk?

 

Continue reading "SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine"
  • Twitter
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine
  • Bloglines SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine
  • Technorati SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine
  • Fark this: SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at YahooMyWeb
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at Furl.net
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at reddit.com
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at blinklist.com
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at Spurl.net
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at Simpy.com
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine at blogmarks
  • Bookmark SMART error (ErrorCount) detected on host - but the NVRAM disk is perfectly fine with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

webhook service with TLS and Let's Encrypt certificate

For a number of services, I need a system/service which can receive web hooks, and act when such a trigger is received.

Just a few examples:

  • GitHub can send web hooks when something changes in a repo (in any repository you administer, go to "Settings" -> "Webhooks", and add your own hook)
  • Tasker for Android can send HTTP(s) requests
  • JIRA can send web hooks when certain events occur
  • openHAB can send messages to other services

Now it would be useful to have your own receiver for web hooks, and run any task you want. There are a number of tools out there, which can solve this problem. I settled with "webhook". In addition, I deploy everything using Ansible, therefore I had to write a bit of code in order to automate this process.

 

Continue reading "webhook service with TLS and Let's Encrypt certificate"
  • Twitter
  • Bookmark webhook service with TLS and Let's Encrypt certificate at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg webhook service with TLS and Let's Encrypt certificate
  • Bloglines webhook service with TLS and Let's Encrypt certificate
  • Technorati webhook service with TLS and Let's Encrypt certificate
  • Fark this: webhook service with TLS and Let's Encrypt certificate
  • Bookmark webhook service with TLS and Let's Encrypt certificate at YahooMyWeb
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Furl.net
  • Bookmark webhook service with TLS and Let's Encrypt certificate at reddit.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at blinklist.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Spurl.net
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Simpy.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at blogmarks
  • Bookmark webhook service with TLS and Let's Encrypt certificate with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Ansible: Just mount an existing filesystem

There is no easy way to "just mount" an existing filesystem in Ansible, using the "mount" module. I just want to mount an already defined mount point, and don't really care about all the configuration here. But if I try this:

- name: Mount /backup filesystem
  mount:
    path: "/backup"
    state: mounted

I end up with the following error message:

TASK [Mount /backup filesystem] ********************
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"changed": false, "msg": "state is mounted but all of the following are missing: src, fstype"}

Ansible requires to configure the mount point all the way. Also specified in the documentation:

  • "fstype" is required when state is "present" or "mounted"
  • "state" == "mounted": the device will be actively mounted and appropriately configured in fstab. If the mount point is not present, the mount point will be created.

Not what I want here!

 

Continue reading "Ansible: Just mount an existing filesystem"
  • Twitter
  • Bookmark Ansible: Just mount an existing filesystem at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible: Just mount an existing filesystem
  • Bloglines Ansible: Just mount an existing filesystem
  • Technorati Ansible: Just mount an existing filesystem
  • Fark this: Ansible: Just mount an existing filesystem
  • Bookmark Ansible: Just mount an existing filesystem at YahooMyWeb
  • Bookmark Ansible: Just mount an existing filesystem at Furl.net
  • Bookmark Ansible: Just mount an existing filesystem at reddit.com
  • Bookmark Ansible: Just mount an existing filesystem at blinklist.com
  • Bookmark Ansible: Just mount an existing filesystem at Spurl.net
  • Bookmark Ansible: Just mount an existing filesystem at Simpy.com
  • Bookmark Ansible: Just mount an existing filesystem at blogmarks
  • Bookmark Ansible: Just mount an existing filesystem with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Ansible: copy a directory recursive - take two

Another slow attempt at copying directories and files on a remote system from one place to another, using just Ansible operations.

 

Continue reading "Ansible: copy a directory recursive - take two"
  • Twitter
  • Bookmark Ansible: copy a directory recursive - take two at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible: copy a directory recursive - take two
  • Bloglines Ansible: copy a directory recursive - take two
  • Technorati Ansible: copy a directory recursive - take two
  • Fark this: Ansible: copy a directory recursive - take two
  • Bookmark Ansible: copy a directory recursive - take two at YahooMyWeb
  • Bookmark Ansible: copy a directory recursive - take two at Furl.net
  • Bookmark Ansible: copy a directory recursive - take two at reddit.com
  • Bookmark Ansible: copy a directory recursive - take two at blinklist.com
  • Bookmark Ansible: copy a directory recursive - take two at Spurl.net
  • Bookmark Ansible: copy a directory recursive - take two at Simpy.com
  • Bookmark Ansible: copy a directory recursive - take two at blogmarks
  • Bookmark Ansible: copy a directory recursive - take two with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Install GNU parallel with Ansible

GNU parallel allows you to multiplex tasks, and possibly use more CPU resources to speed up the task at hand. This works if your task can be split down into multiple independent tasks which otherwise will be executed serially.

An example: you find files in a directory, and want to compress all of them:

find /path/to/directory -type f -exec bzip2 -9 {} \;

Above line will find all the files, and compress each of them, one after the other. Most modern systems have multiple CPU cores installed, but nevertheless above line will only use one of them. GNU parallel solves this by multiplexing the task, and starting multiple compress processes. Above line changes to:

find /path/to/directory -type f -print0 | parallel -0 --no-run-if-empty bzip2 -9 :::

By default, parallel will start as many parallel processes as CPU cores are available. The --jobs option can be used to specify a hardcoded number (as example: "8"), or limit the number depending on the number of available cores ("-2" will start 6 processes if 8 cores are available, "+2" will start 10 processes if 8 cores are available).

However when you start "parallel", it will nag you that you confirm that any time you use it for processing data for an academic article, you have to cite "parallel":

Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

  O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
  ;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence this citation notice: run 'parallel --citation'.

That's ok if you use it manually, but in a server environment no one will ever see this note.

 

Continue reading "Install GNU parallel with Ansible"
  • Twitter
  • Bookmark Install GNU parallel with Ansible at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Install GNU parallel with Ansible
  • Bloglines Install GNU parallel with Ansible
  • Technorati Install GNU parallel with Ansible
  • Fark this: Install GNU parallel with Ansible
  • Bookmark Install GNU parallel with Ansible at YahooMyWeb
  • Bookmark Install GNU parallel with Ansible at Furl.net
  • Bookmark Install GNU parallel with Ansible at reddit.com
  • Bookmark Install GNU parallel with Ansible at blinklist.com
  • Bookmark Install GNU parallel with Ansible at Spurl.net
  • Bookmark Install GNU parallel with Ansible at Simpy.com
  • Bookmark Install GNU parallel with Ansible at blogmarks
  • Bookmark Install GNU parallel with Ansible with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca