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"
  • Twitter
  • Bookmark Ansible: unpack a file on the remote host at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible: unpack a file on the remote host
  • Bloglines Ansible: unpack a file on the remote host
  • Technorati Ansible: unpack a file on the remote host
  • Fark this: Ansible: unpack a file on the remote host
  • Bookmark Ansible: unpack a file on the remote host at YahooMyWeb
  • Bookmark Ansible: unpack a file on the remote host at Furl.net
  • Bookmark Ansible: unpack a file on the remote host at reddit.com
  • Bookmark Ansible: unpack a file on the remote host at blinklist.com
  • Bookmark Ansible: unpack a file on the remote host at Spurl.net
  • Bookmark Ansible: unpack a file on the remote host at Simpy.com
  • Bookmark Ansible: unpack a file on the remote host at blogmarks
  • Bookmark Ansible: unpack a file on the remote host with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

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)"
  • Twitter
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Execute a required reboot, with Ansible (CentOS/Red Hat)
  • Bloglines Execute a required reboot, with Ansible (CentOS/Red Hat)
  • Technorati Execute a required reboot, with Ansible (CentOS/Red Hat)
  • Fark this: Execute a required reboot, with Ansible (CentOS/Red Hat)
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at YahooMyWeb
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at Furl.net
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at reddit.com
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at blinklist.com
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at Spurl.net
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at Simpy.com
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) at blogmarks
  • Bookmark Execute a required reboot, with Ansible (CentOS/Red Hat) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

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"
  • Twitter
  • Bookmark Ansible and LXC Containers at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible and LXC Containers
  • Bloglines Ansible and LXC Containers
  • Technorati Ansible and LXC Containers
  • Fark this: Ansible and LXC Containers
  • Bookmark Ansible and LXC Containers at YahooMyWeb
  • Bookmark Ansible and LXC Containers at Furl.net
  • Bookmark Ansible and LXC Containers at reddit.com
  • Bookmark Ansible and LXC Containers at blinklist.com
  • Bookmark Ansible and LXC Containers at Spurl.net
  • Bookmark Ansible and LXC Containers at Simpy.com
  • Bookmark Ansible and LXC Containers at blogmarks
  • Bookmark Ansible and LXC Containers with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

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)"
  • Twitter
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Execute a required reboot, with Ansible (Debian/Ubuntu)
  • Bloglines Execute a required reboot, with Ansible (Debian/Ubuntu)
  • Technorati Execute a required reboot, with Ansible (Debian/Ubuntu)
  • Fark this: Execute a required reboot, with Ansible (Debian/Ubuntu)
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at YahooMyWeb
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at Furl.net
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at reddit.com
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at blinklist.com
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at Spurl.net
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at Simpy.com
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) at blogmarks
  • Bookmark Execute a required reboot, with Ansible (Debian/Ubuntu) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca