Skip to content

Commit 1886fae

Browse files
committed
Merge branch 'feature/lmi' of https://github.com/LaurentMarchelli/ansible_virtualization into LaurentMarchelli-feature/lmi
2 parents 5a0306d + 208acd7 commit 1886fae

18 files changed

+106
-61
lines changed

roles/docker/tasks/install_CentOS.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
name: docker-ce, docker-ce-cli, containerd.io
2424
state: present
2525
become: yes
26+
27+
- import_tasks: configure.yml

roles/docker/tasks/install_Debian.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
state: absent
88
become: yes
99

10-
- name: add Docker apt signing key
10+
- name: Add Docker apt signing key
1111
apt_key:
1212
url: "{{ item }}"
1313
state: present
1414
with_items:
1515
- https://download.docker.com/linux/debian/gpg
1616
become: yes
1717

18-
- name: setup Docker apt repository on Debian
18+
- name: Setup Docker apt repository on Debian
1919
apt_repository:
2020
repo: "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
2121
state: present
@@ -34,3 +34,5 @@
3434
name: "{{ debian_docker_packages }}"
3535
state: present
3636
become: yes
37+
38+
- import_tasks: configure.yml

roles/docker/tasks/install_Fedora.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
name: docker-ce, docker-ce-cli, containerd.io
2424
state: present
2525
become: yes
26+
27+
- import_tasks: configure.yml

roles/docker/tasks/install_Ubuntu.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
state: absent
88
become: yes
99

10-
- name: add Docker apt signing key
10+
- name: Add Docker apt signing key
1111
apt_key:
1212
url: "{{ item }}"
1313
state: present
1414
with_items:
1515
- https://download.docker.com/linux/ubuntu/gpg
1616
become: yes
1717

18-
- name: setup Docker apt repository on Ubuntu
18+
- name: Setup Docker apt repository on Ubuntu
1919
apt_repository:
2020
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
2121
state: present
@@ -34,3 +34,5 @@
3434
name: "{{ ubuntu_docker_packages }}"
3535
state: present
3636
become: yes
37+
38+
- import_tasks: configure.yml

roles/docker/tasks/main.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
---
22
# tasks file for docker
33

4-
- include: install_CentOS.yml
4+
- name: 'CentOS'
5+
include_tasks: install_CentOS.yml
56
when: ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_version']|int <= 7
67

7-
- include: install_Fedora.yml
8+
- name: 'Debian'
9+
include_tasks: install_Debian.yml
10+
when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version']|int >= 10
11+
12+
- name: 'Fedora'
13+
include_tasks: install_Fedora.yml
814
when: ansible_facts['distribution'] == "Fedora" and ansible_facts['distribution_version']|int == 30
915

10-
- include: install_Ubuntu.yml
16+
- name: 'Ubuntu'
17+
include_tasks: install_Ubuntu.yml
1118
when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] == "18.04"
12-
13-
- include: install_Debian.yml
14-
when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version']|int >= 10
15-
16-
- include: configure.yml
17-
when: ansible_facts['distribution'] != 'RedHat'

roles/vagrant/tasks/install_Debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Install vagrant on Debian
33

4-
- name: install Debian packages
4+
- name: Install Debian packages
55
apt:
66
deb: "{{ item }}"
77
loop: "{{ debian_packages }}"

roles/vagrant/tasks/install_Fedora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Install vagrant on Fedora
33

4-
- name: install Fedora packages
4+
- name: Install Fedora packages
55
package:
66
name: "{{ fedora_packages }}"
77
state: present

roles/vagrant/tasks/install_RedHat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Install vagrant on RedHat
33

4-
- name: install RedHat packages
4+
- name: Install RedHat packages
55
package:
66
name: "{{ redhat_packages }}"
77
state: present

roles/vagrant/tasks/install_Ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Install vagrant on Ubuntu
33

4-
- name: install Ubuntu packages
4+
- name: Install Ubuntu packages
55
apt:
66
deb: "{{ item }}"
77
loop: "{{ ubuntu_packages }}"

roles/vagrant/tasks/main.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
---
22
# tasks file for vagrant
33

4-
- include: install_CentOS.yml
4+
- name: 'CentOS'
5+
include_tasks: install_CentOS.yml
56
when: ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_version']|int <= 7
67

7-
- include: install_RedHat.yml
8-
when: ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_version']|int <= 8
8+
- name: 'Debian'
9+
include_tasks: install_Debian.yml
10+
when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version']|int >= 10
911

10-
- include: install_Fedora.yml
12+
- name: 'Fedora'
13+
include_tasks: install_Fedora.yml
1114
when: ansible_facts['distribution'] == "Fedora" and ansible_facts['distribution_version']|int == 30
1215

13-
- include: install_Ubuntu.yml
14-
when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] == "18.04"
16+
- name: 'RedHat'
17+
include_tasks: install_RedHat.yml
18+
when: ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_version']|int <= 8
1519

16-
- include: install_Debian.yml
17-
when: ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_version']|int >= 10
20+
- name: 'Ubuntu'
21+
include_tasks: install_Ubuntu.yml
22+
when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] == "18.04"

0 commit comments

Comments
 (0)