Skip to content

Instantly share code, notes, and snippets.

View aparedero's full-sized avatar
🚧
GitHub and Azure DevOps Migration

Alejandro Paredero aparedero

🚧
GitHub and Azure DevOps Migration
View GitHub Profile
@kenny-evitt
kenny-evitt / add-dynamic-group-var.bash
Last active August 16, 2021 11:11
Files for Ansible for supporting dynamic host variables retrieved from a local SQLite database
#!/usr/bin/env bash
group_name="$1"
var_name="$2"
var_value="$3"
./create_dynamic_vars_db.py
sqlite3 dynamic_vars.db "INSERT OR REPLACE INTO group_vars ( group_name, var_name, var_value ) VALUES ( '${group_name}', '${var_name}', '${var_value}' );"