Skip to content

Local cachíng of Ansible Facts

Every time Ansible runs a Playbook, the first step (by default) is gathering facts about the target system:

PLAY [all-systems]

TASK [Gathering Facts]
ok: [host1]
ok: [host2]

This step is implicit, and it is not necessary (but possible) to add the gather facts step to every Playbook. The module which retrieves all the information is "setup", and by default it tries to gather as much information about the target system as possible. When the "setup" task is added as an extra step in the Playbook, the information about the destination system is refreshed and updated:

  tasks:
    - name: Refresh destination information
      setup:

That might be necessary when a Playbook changed vital system settings.

Gathering the facts is a time-consuming process, and for a short Playbook it is quite possible that this is the longest-running task. And it's repeated every time the Playbook runs.

Ansible provides Cache plugins which can store the gathered facts. If the system facts don't change between Playbook runs, this will greatly speed up the runtime of Playbooks. The facts cache can be stored in JSON files, in a Redis DB, in a Memcache, and a few other options. The simplest way, without additional tools required, is the "jsonfile" cache. Central implementations like Redis or Memcache allow multiple Ansible controller hosts to use the same facts cache, whereas local caches like "JSON" are only available on a single host, and every Ansible controller must build and maintain it's own cache.

 

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

Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module

About two years ago I blogged about how to create and renew Let's Encrypt certificates using Ansible. Back then, the "letsencrypt" module was State of the Art. This changed, and with all the Let's Encrypt API changes, the Ansible module changed quite a lot, and is now "acme_certificate". ACME stands for: Automatic Certificate Management Environment, and is the idea that every step along the way of creating and renewing certificates should be automated. No more manual creation of CSR (Certificate Signing Request), sending them per mail or manually uploading them to a CA website, enter your credit card details, and at some point get a mail back with the new signed certificate. All of this (except the credit card - you no longer need one) can be automated, and handled in a matter of seconds.

Time to write an updated blog post for the new module.

 

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