Playbooks Flashcards
1
Q
Setup vim to have 2 spaces when tab pressed
A
vim ~/.vimrc
autocmd FileType yaml setlocal ai ts=2 sw=2 et
2
Q
Verify syntax of playbook
A
ansible-playbook –syntax-check myplaybook.yaml
3
Q
Limit execution to only certain hosts
A
ansible-playbook -i inventory/inv.yaml myplaybook.yaml –limit host1