Browse Source

* Remove support for creating directories

tags/v1.2.0^2
Lyz 1 year ago
parent
commit
f4ce6273d1
Signed by: Lyz <lyz@riseup.net> GPG Key ID: 6C7D7C1612CDE02F
4 changed files with 0 additions and 47 deletions
  1. 0
    2
      README.md
  2. 0
    6
      molecule/default/playbook.yml
  3. 0
    29
      molecule/default/tests/test_default.py
  4. 0
    10
      tasks/main.yml

+ 0
- 2
README.md View File

@@ -29,8 +29,6 @@ Role Variables
29 29
 * `docker_image`: If you want to download a docker image and not a git repository
30 30
 * `docker_image_tag`: Docker tag.
31 31
 * `docker_command`: Docker command used to launch the container.
32
-* `docker_data_directories`: List of directories where the data is going to be
33
-  saved on the host.
34 32
 * `remote_build`: Whether to build the docker remotely or locally [Default:
35 33
   `False`]
36 34
 

+ 0
- 6
molecule/default/playbook.yml View File

@@ -56,9 +56,6 @@
56 56
     remote_build: True
57 57
     docker_image: nginx
58 58
     service_name: image-nginx
59
-    docker_data_directories:
60
-      - "/root/docker/image-nginx/data"
61
-      - "/root/docker/image-nginx/auth"
62 59
     docker_registry: "docker-registry:5000"
63 60
     docker_registry_read: "{{ docker_registry }}"
64 61
     registry_user: testuser
@@ -77,9 +74,6 @@
77 74
     git_repository_extra_path: stable/stretch
78 75
     git_repository_tag: master
79 76
     service_name: git-nginx
80
-    docker_data_directories:
81
-      - "/root/docker/git-nginx/data"
82
-      - "/root/docker/git-nginx/auth"
83 77
     docker_registry: "docker-registry:5000"
84 78
     docker_registry_read: "{{ docker_registry }}"
85 79
     registry_user: testuser

+ 0
- 29
molecule/default/tests/test_default.py View File

@@ -25,20 +25,6 @@ def test_required_pip_packages_exist(host, pip_package):
25 25
 
26 26
 # Test remotely build from image
27 27
 
28
-@pytest.mark.parametrize("directories", [
29
-    ("/root/docker/"),
30
-    ("/root/docker/image-nginx/data"),
31
-    ("/root/docker/image-nginx/auth"),
32
-])
33
-def test_required_directories_exist(host, directories):
34
-    with host.sudo():
35
-        directory = host.file(directories)
36
-        assert directory.exists
37
-        assert directory.user == 'root'
38
-        assert directory.group == 'root'
39
-        assert oct(directory.mode) == '0700'
40
-
41
-
42 28
 def test_build_nginx_image_is_downloaded(host):
43 29
     with host.sudo():
44 30
         registry_exist = host.check_output(
@@ -61,21 +47,6 @@ def test_build_nginx_is_working(host):
61 47
 
62 48
 # Test remotely build from git
63 49
 
64
-
65
-@pytest.mark.parametrize("directories", [
66
-    ("/root/docker/"),
67
-    ("/root/docker/git-nginx/data"),
68
-    ("/root/docker/git-nginx/auth"),
69
-])
70
-def test_required_directories_exist_for_git_build(host, directories):
71
-    with host.sudo():
72
-        directory = host.file(directories)
73
-        assert directory.exists
74
-        assert directory.user == 'root'
75
-        assert directory.group == 'root'
76
-        assert oct(directory.mode) == '0700'
77
-
78
-
79 50
 def test_image_nginx_image_is_downloaded(host):
80 51
     with host.sudo():
81 52
         registry_exist = host.check_output(

+ 0
- 10
tasks/main.yml View File

@@ -1,14 +1,4 @@
1 1
 ---
2
-- name: Create docker data directories
3
-  become: True
4
-  file:
5
-    path: "{{ item }}"
6
-    state: directory
7
-    owner: root
8
-    group: root
9
-    mode: 0700
10
-  with_items: "{{ docker_data_directories}}"
11
-
12 2
 - name: Log locally into private registry
13 3
   local_action:
14 4
     module: docker_login

Loading…
Cancel
Save