ansible playbooks samples

mkdir /etc/ansible/playbooks/
cd /etc/ansible/playbooks/

see playbooks

ready to go

vi credentials.bash

tsdb_host=
tsdb_port=443
tsdb_http_user=
tsdb_http_passwd=

log_host=
log_port=9200
log_http_user=
log_http_passwd=

source credentials.bash

    ansible-playbook tasks-flb-setup.yml \
    --extra-vars "tsdb_host=$tsdb_host" \
    --extra-vars "tsdb_port=$tsdb_port" \
    --extra-vars "tsdb_http_user=$tsdb_http_user" \
    --extra-vars "tsdb_http_passwd=$tsdb_http_passwd" \
    --extra-vars "log_host=$log_host" \
    --extra-vars "log_port=$log_port" \
    --extra-vars "log_http_user=$log_http_user" \
    --extra-vars "log_http_passwd=$log_http_passwd" \
    --check

and then w/o --check

additional notes

fetch some informations/variables to help you design playbook

    ansible vmetrics.nethence.com -m setup

resources

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun