Skip to content

ShadowUser17/ansible-roles

Repository files navigation

Roles for my testing stand...

URLs:

Install Ansible:

python3 -m venv --upgrade-deps env && \
./env/bin/pip3 install -r requirements.txt

Get example config:

./env/bin/ansible-config init --disabled > ansible.cfg.example

Get VM info:

./env/bin/ansible -i <inventory> -m 'gather_facts' <hosts> > facts.json

Ping host:

./env/bin/ansible -i <inventory> -m 'ping' <hosts>

New empty role:

./env/bin/ansible-galaxy role init <role>
mkdir -p "${ROLE}"/{tasks,vars} && \
touch "${ROLE}"/{tasks,vars}/main.yml && \
touch "${ROLE}"/README.md

Run Playbook:

./env/bin/ansible-playbook -i <inventory> -t <tags> -e <extra-vars> -l <hosts-limit> <playbook>

Test Playbook:

./env/bin/ansible-playbook -i <inventory> -C <playbook>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages