blob: 9437dde332397f88eeb29c0e46ef98ff9cf9746c [file] [log] [blame]
Zack Williamsa2763112017-01-03 11:38:38 -07001---
2# xos-bootstrap-hosts/tasks/main.yml
3
4- name: Get the Docker container names for bootstrap containers
5 docker_service:
6 project_name: "{{ cord_profile | regex_replace('\\W','') }}bs"
Zack Williamsc989f262017-05-11 13:02:59 -07007 project_src: "{{ head_cord_profile_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -07008 files: "xos-bootstrap-docker-compose.yaml"
9 recreate: never
10 register: xos_bootstrap_out
11
12- name: Add the containers to Ansible groups on a per-container type basis
13 add_host:
14 name: "{{ xos_bootstrap_out.ansible_facts[item].keys() | first }}"
15 groups: "{{ item }}"
16 ansible_connection: "docker"
17 cord_profile: "{{ cord_profile }}"
18 ansible_ssh_user: "root"
19 with_items: "{{ xos_bootstrap_out.ansible_facts.keys() | list }}"
20