Skip to content

Commit 208acd7

Browse files
Keep tasks grouped per distribution
- include_tasks configure.yml changed into import_tasks configure.yml - import_tasks configure.yml moved into install_*.yml - include_tasks extensions.yml moved into install_*.yml - Typo fixed - docker - vagrant - virtualbox
1 parent 0f47ad5 commit 208acd7

17 files changed

+72
-43
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: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@
1616
- name: 'Ubuntu'
1717
include_tasks: install_Ubuntu.yml
1818
when: ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_version'] == "18.04"
19-
20-
- name: 'Configure'
21-
include_tasks: configure.yml
22-
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/virtualbox/tasks/configure.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
# configure task for virtualbox
33

4-
- name: check kernel module status
4+
- name: Check kernel module status
55
command: /usr/lib/virtualbox/vboxdrv.sh status
66
register: vboxdrv_status
77
changed_when: False
88

9-
- name: rebuild kernel modules
9+
- name: Rebuild kernel modules
1010
command: /usr/lib/virtualbox/vboxdrv.sh setup
1111
when: "'is loaded' not in vboxdrv_status.stdout"
1212
become: yes
1313

14-
- name: setup VirtualBox user
14+
- name: Setup VirtualBox user
1515
user:
1616
name: "{{ item }}"
1717
groups: vboxusers

0 commit comments

Comments
 (0)