Skip to content

giovannirossini/ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playground

This project is intended for studies and code sheet.

To start you need to create the SSH keys that will be used. To do this, run inside the project:

mkdir -p keys
ssh-keygen -t rsa -b 2048 -N '' -f keys/ansible_key
chown -R root:root keys/

After creating the keys, you need to run the command:

docker-compose up -d

After the containers are up, you can access the "ansible server" through the command:

docker exec -it ansible sh

To put it into practice, just run the command:

ansible -m ping all
ansible-playbook examples.yml

And you see something like this:

image