Skip to content

Create beautiful status pages directly from Ansible

License

Notifications You must be signed in to change notification settings

navad/flightdek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flightdek

Create beautiful status pages directly from Ansible

Getting started

First, create your ansible project folder

$ mkdir ~/my-status-page
$ cd ~/my-status-page
$ python3 -m venv venv
$ source venv/bin/activate

Install Ansible >= 3.0 and Flightdek

(venv)$ pip install ansible
(venv)$ ansible-galaxy collection install https://github.com/navad/flightdek

Creating simple Flightdek playbook

For example, using the following hosts file:

localhost ansible_connection=local
# playbook.yml

- name: Check machines
  hosts: all
  gather_facts: no
  ignore_unreachable: yes

  tasks:
    - name: Ping machines
      ansible.builtin.ping:
      register: ping_res

    - name: Add to dek
      flightdek.core.add_item:
        name: '{{ inventory_hostname }}'
        group: Hosts
        warn_when: '{{ ping_res.failed }}'

- name: Wrap up
  hosts: localhost
  post_tasks:
  - name: Generate Report
    run_once: yes
    flightdek.core.render:
      filename: status.html
      title: My Status Page
    register: report_output

  - name: Open page
    ansible.builtin.command: 'open {{ report_output.status_page_file }}'

Running Flightdek playbook

(venv)$ ansible-playbook -i hosts playbook.yml

After the playbook finishes running, Flightdek's status page will be opened by the browser

About

Create beautiful status pages directly from Ansible

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published