summaryrefslogtreecommitdiffstats
path: root/test/integration/openshift_health_checker/preflight/playbooks/setup_container.yml
blob: fff797c272ee0b128abc6ca762a09909ceae4b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
# Required vars:
# * name = name of the container to be started

- name: Start CentOS 7 container
  gather_facts: no
  hosts: localhost
  connection: local
  vars:
    container_name: openshift_ansible_test_{{ name }}
  tasks:
    - name: start container
      docker_container:
        name: "{{ container_name }}"
        image: centos:7
        command: sleep infinity
        recreate: yes
    - name: add host
      add_host:
        name: "{{ container_name }}"
        ansible_connection: docker
        groups: OSEv3,masters,nodes
        deployment_type: origin