Linux

6Oct

Using Reboot Module in Ansible 2.7

For a while, rebooting a Linux machine using Ansible has been done primarily using a combination of a reboot shell command module and a wait_for clause to pause execution of other tasks until that machine has came back up. This is also the method that is being taught at the current available revision of DO407 Automation with Ansible course by Red Hat (based on Ansible 2.3). Using this method can be done as follows:

---
- name: Reboot and wait until the server is up
  hosts: server1
  tasks:

    - name: reboot machine
      shell: sleep 2; shutdown -r now "Ansible triggered reboot"
      async: 1
      poll: 0
      ignore_errors: true

    - name: Wait for server to come back
      wait_for:
        host: "{{ inventory_hostname }}"
        state: started
        delay: 30
        timeout: 300
        port: 22
      delegate_to: localhost

New in Ansible 2.7: reboot module

Read More »

26Aug
longview_mysql_stats

How To Enable Longview Metrics for MySQL in Linode Servers

Linode is a very popular Virtual Private Servers (VPS) provider, that offer simplified interfaces to create and manage your servers. This post discusses one of their features: Longview, and how you can utilize it if you’re running MySQL Databases on your VPS.

Longview allows you to collect many metrics on your server in good details. It is also a free service that you get with your subscription – although you can upgrade it for unlimited data retention and more granular metric data. Using Longview, you can monitor stuff like CPU, Memory, Network Utilization and other resources. What we want to do is utilize it to display metrics of our MySQL Database.

The added value of this is that using Longview, you will be able to Read More »

Written with love ♥