summaryrefslogtreecommitdiffstats
path: root/README_ANSIBLE_CONTAINER.md
blob: 0541aef26ed732ecbf38a7c5e85b9a4198737d0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Running ansible in a docker container
* Building ansible container:

  ```sh
  git clone https://github.com/openshift/openshift-ansible.git
  cd openshift-ansible/ansible-container
  docker build --rm -t ansible .
  ```
* Create /etc/ansible directory on the host machine and copy inventory file (hosts) into it.
* Copy ssh public key of the host machine to master and nodes machines in the cluster.
* Running the ansible container:

  ```sh
  docker run -it --rm --privileged --net=host -v ~/.ssh:/root/.ssh -v /etc/ansible:/etc/ansible ansible
  ```