Run specific tags ansible
Execute only tasks marked with specified tags
ansible-playbook site.yml --tags 'config,restart' -i inventory.ini
more ansible
all 56 commands →
Skip specific tags
ansible-playbook site.yml --skip-tags 'slow,optional' -i inventory.ini
Increase verbosity
ansible-playbook site.yml -vvv -i inventory.ini 2>&1 | tee /tmp/ansible.log
Encrypt a variable with Vault
ansible-vault encrypt_string 'supersecret' --name 'db_password'
Decrypt vault file
ansible-vault view group_vars/all/vault.yml
Copy file to remote
ansible all -m copy -a 'src=./nginx.conf dest=/etc/nginx/nginx.conf owner=root mode=0644' -i inventory.ini