|
27 | 27 | hosts: hostservers,DPUs |
28 | 28 | become: yes |
29 | 29 | tasks: |
30 | | - - import_tasks: debian.yml |
| 30 | + - name: Install usefull packages |
| 31 | + ansible.builtin.package: |
| 32 | + name: python3-pip,sshpass,git |
| 33 | + state: present |
| 34 | + |
| 35 | + - name: Debian | Docker |
31 | 36 | when: ansible_os_family == 'Debian' |
| 37 | + block: |
| 38 | + - name: Debian | Remove old docker |
| 39 | + ansible.builtin.package: |
| 40 | + name: docker.io,docker-doc,docker-compose,docker-compose-v2,podman-docker,containerd,runc |
| 41 | + state: absent |
| 42 | + - name: Debian | Install new docker |
| 43 | + ansible.builtin.package: |
| 44 | + name: docker-ce,docker-ce-cli,containerd.io,docker-buildx-plugin,docker-compose-plugin |
| 45 | + state: present |
32 | 46 |
|
33 | | - - import_tasks: redhat.yml |
| 47 | + - name: Red Hat | Docker |
34 | 48 | when: ansible_os_family == 'RedHat' |
35 | | - |
36 | | - #- import_tasks: suse.yml |
37 | | - # when: ansible_os_family == 'Suse' |
38 | | - |
39 | | - - name: Install other generic packages |
40 | | - ansible.builtin.package: |
41 | | - name: python3-pip,sshpass,git |
42 | | - state: present |
43 | | - |
44 | | - - name: Testing |
45 | | - shell: uname -a |
| 49 | + block: |
| 50 | + - name: Red Hat | Install package dependencies |
| 51 | + ansible.builtin.package: |
| 52 | + name: podman,podman-docker,podman-plugins |
| 53 | + state: present |
| 54 | + # docker-compose >=2 does not work with podman currently |
| 55 | + - name: Red Hat | Install docker-compose |
| 56 | + ansible.builtin.pip: |
| 57 | + name: docker-compose>=1.29,<2 |
| 58 | + state: present |
| 59 | + - name: Red Hat | Enable podman socket for docker-compose |
| 60 | + ansible.builtin.systemd: |
| 61 | + name: podman.socket |
| 62 | + state: started |
46 | 63 |
|
47 | 64 | # TODO: copy correct telegraf.conf file per host... |
48 | 65 |
|
|
0 commit comments