Skip to content

Ansible: unpack a file on the remote host

Trying to unpack a file on the remote host using Ansible might end in an error message:

fatal: [192.168.0.188]: FAILED! => {"failed": true, "msg": "ERROR! file or module does not exist: /tmp/test.zip"}

I'm using Ansible 2.0.0.2 here, and have previously copied "test.zip" to the host (yes, I know, the unarchive module can do the copy as well). Now I'm trying to unpack it:

- name: unzip test.zip archive
  unarchive: src=/tmp/test.zip dest=/tmp/test-tmp-install remote_src=yes

This fails, even though I specify "remote_src" and tell Ansible that the file is already on the remote host.

 

Continue reading "Ansible: unpack a file on the remote host"

Execute a required reboot, with Ansible (CentOS/Red Hat)

A while ago I blogged about executing a reboot using Ansible on Debian-based operating systems. That is necessary after certain updates, as example after installing a new kernel. Turns out that things are very easy on Debian, compared to Red Hat based systems (Red Hat and CentOS in my case).

First of all, there is no clear indicator if a reboot is required. People work around this problem by creating overly complicated scripts. The "needs-restarting" tool in newer versions provides the -r option to indicate if a reboot is required. But the CentOS 7 I've just installed does not come with this version.

 

Continue reading "Execute a required reboot, with Ansible (CentOS/Red Hat)"

Blackout - Stromausfall

Während wir in den USA im Urlaub waren, gab es dort einen großflächigen Stromausfall. Genauer gesagt, während wir in La Push Mittag essen wollten, fiel der Strom im gesamten Ort aus. Das Restaurant hat daraufhin nur noch Salat übrig gehabt - nichts was Kind mag. Zurück in Forks haben wir dann festgestellt, dass dort ebenfalls der Strom ausgefallen ist. Trotz allem gibt es beträchtliche Unterschiede zwischen einem Stromausfall dort im Nordwesten und hier in Deutschland.

 

Continue reading "Blackout - Stromausfall"

Ansible and LXC Containers

LXC is one of many available containerization solutions for Linux. Ansible has basic support for LXC integrated, which is fine if you do not intend to do much inside of the container (aka: fire & forget). My goal however is to start a full flavored container, and manage this container with Ansible as well. That's where things get a bit tricky, and looking around I couldn't find much documentation how to do this.

This posting describes my approach.

 

Continue reading "Ansible and LXC Containers"

Execute a required reboot, with Ansible (Debian/Ubuntu)

After updating Linux packages, it sometimes is required to reboot the host. Debian and Ubuntu provide this information by the presence of a special file: /var/run/reboot-required. Ansible makes it easy to reboot a host, but there are a few aspects which need attention.

 

Continue reading "Execute a required reboot, with Ansible (Debian/Ubuntu)"

Summer Vacation 2016

This years summer vacation brought us to the American Northwest. First of all, it was a surprise in multiple ways for our kid - it did not know where we are going until we arrived at the gate for the final flight in Frankfurt. It did not know that we are going to visit it's favorite mountain. And it did not know that there will be a concert of a band it likes.

We did plan this vacation around three basic parameters:

  • The kid wants to see Mount St. Helens
  • There is a The Piano Guys concert in Seattle
  • We want to go on a #PGBackPacking trip

Everything else we've seen, visited, and experienced is a nice add-on.

 

Continue reading "Summer Vacation 2016"

Silver Lake, Washington

As described yesterday, we had to slightly change the #PGBackPacking plan. Originally we had planned to hike to Monte Cristo, and from there to Silver Lake. Stay at the lake over night, and do a day hike to Twin Lakes.

When we arrived at Monte Cristo, it became clear that we won't make it to Silver Lake in daylight. We decided to camp in Monte Cristo, and hike to Silver Lake and Twin Lakes the next day. Turns out that was the right decision to do.

 

Continue reading "Silver Lake, Washington"

Monte Cristo, Washington

At some point last year, Joshua and I discussed a backpacking trip. The idea of #PGBackPacking was born!

After considering our options, the available days and the physical fitness of our team members, we settled with an old ghost town about 60 km east of Everett: Monte Cristo.

 

Continue reading "Monte Cristo, Washington"

Whatcom Falls, Bellingham

Originally we had plans to go to Vancouver BC from Seattle, but we cancelled this part in the last moment. Instead we opted for a countryside tour to Bellingham, and staying an additional day in the hotel and at the pool. From Redmong we followed the WA-9 and left it near Everett, where we followed the Marine Dr along the coast. In Conway we switched over to the Fir Island Rd heading west, and from there on the Best Rd heading north. Eventually this got us on the scenic WA State Route 11, which leads directly into Bellingham.

 

 

Continue reading "Whatcom Falls, Bellingham"