Skip to content

jseguillon/caradoc

Repository files navigation

Caradoc

caradoc logo
badge

About the Project

Records Ansible as Asciidoc files. Uses kroki/vegalite for charts. Best rendered with:

  • VsCode AsciiDoctor extension pre-release version

  • Chromium AsciiDoctor extension

  • AsciiDoctor CLI

Requires Ansible>=3 and python>=3.7.

Run

Run example

Playbook

Playbook example

Result

Results example

Install

Download and place in default callback directory:

mkdir -p ~/.ansible/plugins/callback
cd ~/.ansible/plugins/callback
curl -SL -O https://raw.githubusercontent.com/jseguillon/caradoc/main/plugins/callback/caradoc.py

Or donwload somewhere else and add to callback path:

ANSIBLE_CALLBACK_PLUGINS=/[path]/plugins/callback ansible-playbook -i tests/hosts tests/testplay.yml

Run any ansible playbook and look at localy created .caradoc directory.

Start kroki to get charts

docker run -d  -p8000:8000 yuzutech/kroki

Dark mode

You can define asciidoc attribute caradoc-theme to dark to get better highlight.js and vegalite charts render.

In vscode settings:

"asciidoc.preview.asciidoctorAttributes": {
  "caradoc-theme": "dark"
}

Change Log

See CHANGELOG.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

The Caradoc team

About

Records Ansible as Asciidoc files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published