Browse Source

allow optionally dependency installation

master
Robert Kaussow 1 month ago
parent
commit
e1b31e2b51
3 changed files with 16 additions and 0 deletions
  1. 6
    0
      defaults/main.yml
  2. 4
    0
      molecule/ec2-centos-7/playbook.yml
  3. 6
    0
      tasks/install.yml

+ 6
- 0
defaults/main.yml View File

@@ -1,5 +1,11 @@
1 1
 ---
2 2
 dockerengine_package: docker
3
+# The role requires epel repository and pip to work
4
+# You can use dockerengine_dependencies to install these dependencys
5
+# dockerengine_dependencies:
6
+#   - epel-release
7
+#   - python2-pip
8
+dockerengine_dependencies: []
3 9
 dockerengine_docker_group_enabled: False
4 10
 
5 11
 dockerengine_secure_registries: []

+ 4
- 0
molecule/ec2-centos-7/playbook.yml View File

@@ -1,6 +1,10 @@
1 1
 ---
2 2
 - name: Converge
3 3
   hosts: all
4
+  vars:
5
+    dockerengine_dependencies:
6
+      - epel-release
7
+      - python2-pip
4 8
 
5 9
   roles:
6 10
     - role: xoxys.docker-engine

+ 6
- 0
tasks/install.yml View File

@@ -5,6 +5,12 @@
5 5
         name: "{{ dockerengine_package }}"
6 6
         state: installed
7 7
 
8
+    - name: Install dependencies
9
+      package:
10
+        name: "{{ item }}"
11
+        state: installed
12
+      loop: "{{ dockerengine_dependencies }}"
13
+
8 14
     - name: Install python dependencies
9 15
       pip:
10 16
         name:

Loading…
Cancel
Save