Last active
May 20, 2018 20:03
-
-
Save JacobCallahan/3e510dbc6d6a39404a6ab0ef0253e1ac to your computer and use it in GitHub Desktop.
Ansible playbook to setup a RHEL 7.4 docker image. Also provides flood.py script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# This playbook will setup a docker-ized content host deployment | |
# environment on the target system(s). | |
# After completion, a RHEL 7.4 docker image will be available | |
# and the git repo will be located at /root/content-host-d | |
- hosts: beaker | |
remote_user: root | |
tasks: | |
- name: Install Docker | |
package: name=docker state=latest | |
- service: name=docker state=started enabled=yes | |
- name: Install python pip | |
easy_install: name=pip | |
- name: Install docker-py | |
pip: name=docker-py state=latest | |
- name: Install git | |
package: name=git state=present | |
- name: Clone content host repo | |
git: | |
repo : https://github.com/JacobCallahan/content-host-d.git | |
version : rhel74 | |
dest : /root/content-host-d | |
- name: Build RHEL 7.4 content host image | |
docker_image: | |
path: /root/content-host-d | |
name: ch-d | |
tag: rhel74 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note that selinux can interfere with running docker containers. make sure your environment is setup appropriately to allow docker to run containers. definitely don't just
setenforce 0
before running this playbook! ;)