A Lightweight and Flexible Ansible Command Line Tool.
Project description
Flook
A Lightweight and Flexible Ansible Command Line Tool.
To use flook, follow the following steps:
Create a python virtual environment or use system wide environment
$ python3 -m venv venv
$ source venv/bin/activate
Install flook package with pip.
$ pip install flook
Get flook command line help
$ flook --help
Init the config file and the sqlite database
$ flook config init
To edit configs
$ flook config init
Add a recipe
$ flook recipe add <recipe_name> -p <recipe_relative_path>
# Some examples
$ flook recipe add clivern/ping -p recipe/ping -f
$ flook recipe add clivern/nginx -p recipe/nginx -f
$ flook recipe add clivern/motd -p recipe/motd -f
To list recipes
$ flook recipe list
# Get recipes as a JSON
$ flook recipe list -o json | jq .
To get a recipe
$ flook recipe get <recipe_name>
To delete a recipe
$ flook recipe delete <recipe_name>
Add a host
$ flook host add <host_name> -i <host_ip> -p <ssh_port> -u <ssh_username> -s <ssh_key_path>
# Add a remote host
$ flook host add example.com -i 127.0.0.1 -p 22 -u root -s /Users/root/.ssh/id_rsa.pem
# Add the localhost
$ flook host add localhost -i localhost -c local
To list hosts
$ flook host list
# Get hosts as a JSON
$ flook host list -o json | jq .
To get a host
$ flook host get <host_name>
To SSH into a host
$ flook host ssh <host_name>
To delete a host
$ flook host delete <host_name>
Run a recipe towards a host
$ flook recipe run <recipe_name> -h <host_name>
# Some examples
$ flook recipe run clivern/nginx -h example.com
$ flook recipe run clivern/ping -h localhost
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flook-0.4.1.tar.gz
(18.8 kB
view details)
Built Distribution
flook-0.4.1-py3-none-any.whl
(25.9 kB
view details)
File details
Details for the file flook-0.4.1.tar.gz
.
File metadata
- Download URL: flook-0.4.1.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 604be749aaa568c3dfdb39650c3f9aed8138f6dde587c49e8ef546bdf7e307d8 |
|
MD5 | cb067af0a262ff1cc622cd26db1dface |
|
BLAKE2b-256 | 663188af9624541b9fd3c5560ef3f5204517a62bef3ed1974072bf08758edce7 |
File details
Details for the file flook-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: flook-0.4.1-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 035d99a154226184fd5b0b9766d0503ec04168a9e2d065e03072517e3efbf607 |
|
MD5 | 2cb3609f728152123f1cd261e02ba176 |
|
BLAKE2b-256 | 4c09e689fa33d5dbb05d2ad1654ac30c8fd22a41548ab64ccb4d11447e15a7c7 |