Browse Source

Linting change in molecule playbooks

tags/v1.1.0^2
ceighlano 9 months ago
parent
commit
d8bfb9b5c9
Signed by: ceighlano <arleking@protonmail.com> GPG Key ID: 74DA4DAB970532C7
1 changed files with 22 additions and 4 deletions
  1. 22
    4
      molecule/default/playbook.yml

+ 22
- 4
molecule/default/playbook.yml View File

@@ -48,7 +48,15 @@
48 48
 - name: '[Pretask] Install registry on the registry instance'
49 49
   hosts: ui-registry-registry-instance
50 50
   vars:
51
-    docker_command: /usr/bin/docker run -i --name {{ registry_service_name }} -p 127.0.0.1:5000:5000 --rm -v {{ registry_data }}:/var/lib/registry -v {{ registry_auth }}:/var/lib/auth -v {{ registry_config }}/:/etc/docker/registry -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e REGISTRY_AUTH_HTPASSWD_PATH=/var/lib/auth/htpasswd registry:2
51
+    docker_command: >-
52
+            /usr/bin/docker run -i --name {{ registry_service_name }}
53
+            -p 127.0.0.1:5000:5000 --rm
54
+            -v {{ registry_data }}:/var/lib/registry
55
+            -v {{ registry_auth }}:/var/lib/auth
56
+            -v {{ registry_config }}/:/etc/docker/registry
57
+            -e "REGISTRY_AUTH=htpasswd"
58
+            -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm"
59
+            -e REGISTRY_AUTH_HTPASSWD_PATH=/var/lib/auth/htpasswd registry:2
52 60
   roles:
53 61
     - role: docker-registry
54 62
 
@@ -56,14 +64,21 @@
56 64
 - name: Converge
57 65
   hosts: all
58 66
   vars:
59
-    remote_build: True
60 67
     registry_user: testuser
61 68
     registry_password: testpassword
69
+    docker_image_tag: ui-registry
62 70
     docker_registry: "localhost:5000"
63 71
     docker_registry_read: "{{ docker_registry }}"
64
-    docker_command: /usr/bin/docker run --link 'docker-registry' --rm --name "{{ service_name }}" -i -p 127.0.0.1:8080:8080 "{{ docker_registry_read }}/{{ service_name }}" --username testuser --password testpassword --insecure --registry "docker-registry:5000"
72
+    docker_command: >-
73
+            /usr/bin/docker run --link 'docker-registry'
74
+            --rm --name "{{ service_name }}" -i -p 127.0.0.1:8080:8080
75
+            "{{ docker_registry_read }}/{{ service_name }}"
76
+            server --username testuser --password testpassword
77
+            --force-non-ssl --registry "docker-registry:5000"
65 78
   roles:
66 79
     - role: ui-registry
80
+      when: remote_build
81
+
67 82
 
68 83
   #- name: '[Pretask] Prepare the ui-registry instance'
69 84
   #  hosts: all
@@ -122,7 +137,10 @@
122 137
   #     docker_registry: "{{ hostvars['ui-registry-registry-instance'].ansible_default_ipv4.address }}"
123 138
   #     docker_registry_url: "{{ docker_registry }}:5000"
124 139
   #     docker_registry_read: "{{ docker_registry_url }}"
125
-  #     docker_command: /usr/bin/docker run --rm --name "{{ service_name }}" -i -p 127.0.0.1:8080:8080 "{{ docker_registry_read }}/{{ service_name }}" --registry "{{ docker_registry_read }}"
140
+  #     docker_command: >-
141
+  #         /usr/bin/docker run --rm --name "{{ service_name }}"
142
+  #         -i -p 127.0.0.1:8080:8080 "{{ docker_registry_read }}/{{ service_name }}"
143
+  #         --registry "{{ docker_registry_read }}"
126 144
   #   roles:
127 145
   #     - role: ui-registry
128 146
   #       when: inventory_hostname == 'ui-registry-registry-instance'

Loading…
Cancel
Save