summaryrefslogtreecommitdiffstats
path: root/ansible/roles/rancher/tasks/rancher_agent.yml
blob: e54d760e06fd71bb81f569b10483a19dc80d3d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
- name: Add Rancher Agent
  docker_container:
    name: rancher_agent
    image: "{{ server_hostvars.rancher_agent_image }}"
    command: "{{ server_hostvars.rancher_agent_reg_url }}"
    env:
      CATTLE_AGENT_IP: "{{ cluster_ip }}"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/var/lib/rancher:/var/lib/rancher"
    privileged: true
  vars:
    server_hostvars: "{{ hostvars[groups.infrastructure.0] }}"