Ansible is an open-source automation tool that allows you to define and manage infrastructure as code. It uses a simple and human-readable language to describe tasks and configurations, making it easy to automate repetitive tasks, deploy applications, and manage system configurations.
This repository serves as a collection of Ansible playbooks and ad-hoc commands that can be used for a wide range of purposes, including provisioning servers, configuring network devices, deploying applications, and more. These resources are intended to provide practical examples and serve as a starting point for automating your own infrastructure.
The playbooks directory contains a collection of Ansible playbooks that automate different tasks. Each playbook is designed to perform a specific function, such as server provisioning, application deployment, or system configuration. Refer to the individual playbook's documentation for detailed instructions on usage and customization.
The ad-hoc-commands directory contains a set of ad-hoc commands that can be run directly from the command line without the need for a playbook. These commands provide quick and one-time actions to be performed on remote systems. Detailed instructions for using each ad-hoc command can be found in their respective documentation.
ansible-playbook -i "192.168.1.100," ubuntu-docker-setup.yml --user your-username --ask-become-passansible-playbook -i "192.168.1.100," ubuntu-docker-setup.yml --user your-username --private-key ~/.ssh/your-key.pem --becomeansible-playbook -i "[email protected]:22," ubuntu-docker-setup.yml --ask-become-passansible-playbook -i "192.168.1.100,192.168.1.101," ubuntu-docker-setup.yml --user your-username --ask-become-passansible-playbook -i "192.168.1.100," ubuntu-docker-setup.yml \
--user your-username \
--ask-become-pass \
--ssh-extra-args="-o StrictHostKeyChecking=no"ansible-playbook -i "[email protected]," ubuntu-docker-setup.yml \
--private-key ~/.ssh/your-ec2-key.pem \
--become \
--ssh-extra-args="-o StrictHostKeyChecking=no"ansible-playbook -i "ec2-3-15-123-45.us-east-2.compute.amazonaws.com," ubuntu-docker-setup.yml \
--user ec2-user \
--private-key ~/.ssh/your-ec2-key.pem \
--becomeansible-playbook -i "[email protected]," ubuntu-docker-setup.yml \
--private-key ~/.ssh/your-ec2-key.pem \
--become \
--ssh-extra-args="-o StrictHostKeyChecking=no"ansible-playbook -i "[email protected]," ubuntu-docker-setup.yml \
--private-key ~/.ssh/your-ec2-key.pem \
--become \
--ssh-extra-args="-o StrictHostKeyChecking=no"ansible-playbook -i "[email protected]:2222," ubuntu-docker-setup.yml \
--private-key ~/.ssh/your-ec2-key.pem \
--become \
--ssh-extra-args="-o StrictHostKeyChecking=no"ansible-playbook -i "3.15.123.45,3.15.123.46,3.15.123.47," ubuntu-docker-setup.yml \
--user ubuntu \
--private-key ~/.ssh/your-ec2-key.pem \
--become \
--ssh-extra-args="-o StrictHostKeyChecking=no"