Skip to content

Basic ansible scripts to setup AWS EC2 instances with load balancer

Notifications You must be signed in to change notification settings

vnellore/ansible-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Useful Ansible Commands

Run a playbook

$ ansible-playbook <playbook-location>/<play-book>.yml

Run a playbook for specific tag

$ ansible-playbook <playbook-location>/<play-book>.yml --tags <tag name>

Run a playbook which access encrypted secrets

$ ansible-playbook playbooks/setup-app.yml --ask-vault-pass

Command to see meta data of a host/inventory group

$ ansible -m setup app1

Execute an adhoc command on a host

$ ansible -m service -a "name=<service name> state=<service state>" --become <host group>

Create default file structure for roles using ansible galaxy

$ ansible-galaxy init <folder location>

Using Ansible Vault for secrets

create secrets file

$ ansible-vault create vars/secret-variables.yml

edit secrets file

$ ansible-vault edit vars/secret-variables.yml

About

Basic ansible scripts to setup AWS EC2 instances with load balancer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages