Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
atosatto committed Nov 9, 2019
1 parent 5cf01e3 commit c3358bb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
10 changes: 5 additions & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion molecule/common/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Docker Driver
- block:

- name: Destroy molecule Docker instance(s)
docker_container:
name: "{{ item.name }}"
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 4 additions & 7 deletions tasks/swarm_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -87,4 +85,3 @@
and inventory_hostname != groups['docker_swarm_manager'][0]"
tags:
- skip_ansible_lint # Suppressing the linter

0 comments on commit c3358bb

Please sign in to comment.