Skip to content

sjamal/ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbooks

Repository for operational Ansible playbooks, with the initial focus on Linux VM disk inventory and orphaned disk auditing.

Layout

ansible/
├── .editorconfig
├── Makefile
├── ansible.cfg
├── inventory/
│   ├── README.md
│   └── hosts.example.ini
├── docs/
│   └── python-handoff.md
└── disk_reports/
    ├── README.md
    ├── RUNBOOK.md
    ├── tasks/
    │   ├── prepare_csv_output.yaml
    │   └── prepare_output_dirs.yaml
    ├── vars/
    │   └── main.yaml
    ├── linux_disk_report.yaml
    ├── linux_nested_disk_report.yaml
    ├── linux_nested_hctl_disk_report.yaml
    ├── linux_orphaned_disk_report.yaml
    └── output/
        ├── README.md
        └── audit_data/
            └── README.md

Prerequisites

  • Ansible installed locally.
  • SSH reachability to the target Linux hosts.
  • lsblk available on the managed hosts.
  • pvs and systemctl available when running the orphaned disk audit.

Quick Start

  1. Keep using your local /etc/ansible/hosts as the default inventory.
  2. If you need repo-specific overrides, copy [inventory/hosts.example.ini] to inventory/hosts.ini and use it as an additional inventory source.
  3. Run one of the playbooks from the repository root.
ansible-playbook disk_reports/linux_orphaned_disk_report.yaml
make hctl
make orphaned INVENTORY_SOURCES="/etc/ansible/hosts inventory/hosts.ini"

Generated artifacts are written under disk_reports/output/ and are excluded from source control.

The CSV report names follow a simple pattern now: flat_disk_report.csv, nested_disk_report.csv, and hctl_disk_report.csv.

Inventory Model

This repo does not try to include /etc/ansible/hosts from inside an INI inventory file. Instead, it uses the normal Ansible patterns:

  • [ansible.cfg] defaults to /etc/ansible/hosts.
  • make targets accept additional inventory sources through INVENTORY_SOURCES.
  • Direct CLI use can combine sources with repeated -i flags.
ansible-playbook -i /etc/ansible/hosts -i inventory/hosts.ini disk_reports/linux_nested_disk_report.yaml

Projects

  • [disk_reports/README.md]: disk inventory and orphaned disk auditing playbooks.
  • [docs/python-handoff.md]: how to pass collected JSON into the sibling Python repository.
  • [inventory/README.md]: inventory conventions for shared and repo-local sources.

Project Layout Notes

The playbooks under disk_reports/ remain the entrypoints, but shared defaults now live in disk_reports/vars/ and repeatable controller-side setup tasks live in disk_reports/tasks/. That keeps future playbook additions local to the project without forcing a full role split yet.

Related Enterprise Projects

Part of the integrated enterprise automation ecosystem:

See [docs/python-handoff.md] for details on passing collected data to Python analysis tools.

About

Ansible playbooks for Linux infrastructure provisioning, disk auditing, and SLES configuration management.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages