diff --git a/defaults/main.yml b/defaults/main.yml index d2dcfbb..3319619 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,10 +20,10 @@ docker_swarm_port: 2377 # List of the users in the Docker group docker_admin_users: - - "{{ ansible_user | default(ansible_user_id) }}" # if ansible_user is not defined, we default to the ansible ansible_user_id fact + - "{{ ansible_user | default(ansible_user_id) }}" # if ansible_user is not defined, we default to the ansible ansible_user_id fact # Switches disabling the docker-engine, docker group and swarm-mode setup. -skip_engine: False # if true, skip the docker engine installation -skip_group: False # if true, does not add the docker_admin_users to the docker_group_name -skip_swarm: False # if true, skip the swarm setup -skip_docker_py: False # if true, skip the docker-py +skip_engine: False # if true, skip the docker engine installation +skip_group: False # if true, does not add the docker_admin_users to the docker_group_name +skip_swarm: False # if true, skip the swarm setup +skip_docker_py: False # if true, skip the docker-py diff --git a/molecule/common/destroy.yml b/molecule/common/destroy.yml index 5601380..8e35d0c 100644 --- a/molecule/common/destroy.yml +++ b/molecule/common/destroy.yml @@ -9,7 +9,7 @@ # Docker Driver - block: - + - name: Destroy molecule Docker instance(s) docker_container: name: "{{ item.name }}" diff --git a/tasks/main.yml b/tasks/main.yml index 2bda181..87e0f3b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,6 +56,6 @@ # Setup the Docker Swarm Cluster - block: - - include: swarm_cluster.yml - - include: swarm_labels.yml + - include: swarm_cluster.yml + - include: swarm_labels.yml when: not skip_swarm diff --git a/tasks/swarm_cluster.yml b/tasks/swarm_cluster.yml index 0d59bd6..899adfd 100644 --- a/tasks/swarm_cluster.yml +++ b/tasks/swarm_cluster.yml @@ -10,8 +10,6 @@ ipam_options: subnet: "{{ docker_swarm_network }}" gateway: "{{ docker_swarm_network | ipaddr('net') | ipaddr('1') | ipaddr('ip') }}" - tags: - - skip_ansible_lint # Suppressing the linter when: docker_swarm_network is defined and docker_swarm_network | ipaddr('net') - name: Check if "Swarm Mode" is enabled. @@ -28,7 +26,7 @@ when: "docker_info.stdout.find('Swarm: active') == -1 and inventory_hostname == groups['docker_swarm_manager'][0]" tags: - - skip_ansible_lint # Suppressing the linter + - skip_ansible_lint # Suppressing the linter - name: Get the worker join-token. shell: docker swarm join-token -q worker @@ -38,7 +36,7 @@ delegate_facts: True when: "'docker_swarm_worker' in group_names" tags: - - skip_ansible_lint # Suppressing the linter + - skip_ansible_lint # Suppressing the linter - name: Get the manager join-token. shell: docker swarm join-token -q manager @@ -49,7 +47,7 @@ when: "'docker_swarm_manager' in group_names and inventory_hostname != groups['docker_swarm_manager'][0]" tags: - - skip_ansible_lint # Suppressing the linter + - skip_ansible_lint # Suppressing the linter - name: Declare the address of the first Swarm manager as a fact. set_fact: @@ -72,7 +70,7 @@ and docker_info.stdout.find('Swarm: pending') == -1 and 'docker_swarm_worker' in group_names" tags: - - skip_ansible_lint # Suppressing the linter + - skip_ansible_lint # Suppressing the linter - name: Join the pending Swarm manager nodes. shell: docker swarm join @@ -87,4 +85,3 @@ and inventory_hostname != groups['docker_swarm_manager'][0]" tags: - skip_ansible_lint # Suppressing the linter -