2023-05-02 19:16:41 +02:00
|
|
|
---
|
2023-06-08 23:51:39 +02:00
|
|
|
- name: set mydistribution
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
mydistribution: "{{ ansible_distribution | lower }}"
|
|
|
|
|
|
|
|
- ansible.builtin.import_tasks: fedora.yml
|
2023-05-03 14:01:41 +02:00
|
|
|
name: base
|
|
|
|
become: true
|
2023-06-08 23:51:39 +02:00
|
|
|
when: mydistribution == "fedora"
|
|
|
|
|
|
|
|
- ansible.builtin.import_tasks: debian.yml
|
|
|
|
name: base
|
|
|
|
become: true
|
|
|
|
when: mydistribution == "debian"
|
|
|
|
|
|
|
|
- name: Start Docker
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: "docker"
|
|
|
|
enabled: true
|
|
|
|
state: started
|
2023-09-25 10:57:23 +02:00
|
|
|
|
2023-09-25 12:23:11 +02:00
|
|
|
- name: Install loki-docker-driver plugin
|
|
|
|
community.docker.docker_plugin:
|
|
|
|
plugin_name: loki-docker-driver
|
|
|
|
alias: loki
|
|
|
|
state: present
|
|
|
|
become: true
|
|
|
|
|
2023-09-25 10:57:23 +02:00
|
|
|
- name: Create proxy network
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: proxy
|
|
|
|
state: present
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Create metrics network
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: metrics
|
|
|
|
state: present
|
|
|
|
become: true
|