Skip to content

hardikgw/ansible-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

examples for ansible using docker

simple setup:

  • starts three containers (one with ansible, two webservers)
  • creates links between ansible and web containers
  • creates playbook to check connections

Setup

  • git clone
  • docker-compose up -d
  • docker exec web1 /usr/sbin/sshd
  • docker exec web2 /usr/sbin/sshd
  • docker exec mysql /usr/sbin/sshd
  • docker exec ansible ansible-playbook automate.yml

Container names / host names

  • web1 (weblogic)
  • web2 (weblogic)
  • mysql (mysql + python) - db port 3306
  • ansible (ansible + python)

URLs

SSH

  • web1 (weblogic) : -p 3122
  • web2 (weblogic) : -p 3222
  • mysql (mysql) : -p 3322

Cleanup

  • docker stop ansible web1 web2
  • docker rm ansible web1 web2
  • docker rmi $(docker images -q simple_*)

Dependencies

  • docker-compose assumes the following images
    • oracle/weblogic with domain -t 1213-domain
  • other network download will occur as below
    • mysql
    • ubuntu updates
    • ansible

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published