[FIX] linting

This commit is contained in:
Carrol Cox 2019-10-14 17:33:55 +05:00
parent 1ada072371
commit 321b1ca24c
6 changed files with 16 additions and 16 deletions

View File

@ -6,18 +6,18 @@ docker_package_state: present
# Service options. # Service options.
docker_service_state: started docker_service_state: started
docker_service_enabled: yes docker_service_enabled: true
docker_restart_handler_state: restarted docker_restart_handler_state: restarted
# Docker Compose options. # Docker Compose options.
docker_compose_install: yes docker_compose_install: true
docker_compose_version: '1.24.1' docker_compose_version: '1.24.1'
docker_compose_path: '/usr/local/bin/docker-compose' docker_compose_path: '/usr/local/bin/docker-compose'
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64" docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64"
# LazyDocker options. # LazyDocker options.
lazydocker_install: yes lazydocker_install: true
lazydocker_version: '0.4' lazydocker_version: '0.7.4'
lazydocker_path: '/usr/local/bin/lazydocker' lazydocker_path: '/usr/local/bin/lazydocker'
lazydocker_url: "https://github.com/jesseduffield/lazydocker/releases/download/v{{ lazydocker_version }}/lazydocker_{{ lazydocker_version }}_Linux_x86_64.tar.gz" lazydocker_url: "https://github.com/jesseduffield/lazydocker/releases/download/v{{ lazydocker_version }}/lazydocker_{{ lazydocker_version }}_Linux_x86_64.tar.gz"
@ -26,7 +26,7 @@ lazydocker_url: "https://github.com/jesseduffield/lazydocker/releases/download/v
docker_apt_release_channel: stable docker_apt_release_channel: stable
docker_apt_arch: amd64 docker_apt_arch: amd64
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
docker_apt_ignore_key_error: yes docker_apt_ignore_key_error: true
# Used only for RedHat/CentOS/Fedora. # Used only for RedHat/CentOS/Fedora.
docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo

View File

@ -2,14 +2,14 @@
- name: docker-compose | check binary installed - name: docker-compose | check binary installed
stat: stat:
path: "{{ docker_compose_path }}" path: "{{ docker_compose_path }}"
changed_when: no changed_when: false
register: docker_compose_current_binary register: docker_compose_current_binary
- name: docker-compose | get current binary version - name: docker-compose | get current binary version
shell: | shell: |
sudo -Hu nobody timeout 2 {{ docker_compose_path }} --version 2>&1 | grep -Eoi '([0-9]{1,}\.){1,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1 sudo -Hu nobody timeout 2 {{ docker_compose_path }} --version 2>&1 | grep -Eoi '([0-9]{1,}\.){1,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1
register: docker_compose_current_version register: docker_compose_current_version
changed_when: no changed_when: false
when: when:
- docker_compose_current_binary.stat.exists - docker_compose_current_binary.stat.exists
@ -17,7 +17,7 @@
get_url: get_url:
url: "{{ docker_compose_url }}" url: "{{ docker_compose_url }}"
dest: "{{ docker_compose_path }}" dest: "{{ docker_compose_path }}"
force: yes force: true
owner: root owner: root
mode: 0755 mode: 0755
when: when:

View File

@ -3,7 +3,7 @@
shell: | shell: |
sudo -Hu nobody timeout 2 docker --version 2>&1 | grep -Eoi '([0-9]{1,}\.){2,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1 sudo -Hu nobody timeout 2 docker --version 2>&1 | grep -Eoi '([0-9]{1,}\.){2,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1
register: docker_current_version register: docker_current_version
changed_when: no changed_when: false
- name: docker-shim | Setup shim if required - name: docker-shim | Setup shim if required
block: block:
@ -29,6 +29,6 @@
- name: docker-shim | Reload systemd daemon if template is changed - name: docker-shim | Reload systemd daemon if template is changed
systemd: systemd:
daemon_reload: yes daemon_reload: true
when: when:
- docker_service_override_template is changed - docker_service_override_template is changed

View File

@ -2,14 +2,14 @@
- name: lazydocker | check binary installed - name: lazydocker | check binary installed
stat: stat:
path: "{{ lazydocker_path }}" path: "{{ lazydocker_path }}"
changed_when: no changed_when: false
register: lazydocker_current_binary register: lazydocker_current_binary
- name: lazydocker | get current binary version - name: lazydocker | get current binary version
shell: | shell: |
sudo -Hu nobody timeout 2 {{ lazydocker_path }} --version 2>&1 | grep -Eoi '([0-9]{1,}\.){1,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1 sudo -Hu nobody timeout 2 {{ lazydocker_path }} --version 2>&1 | grep -Eoi '([0-9]{1,}\.){1,3}[0-9]{1,}(|-[a-z0-9]{1,})' | sort -uV | head -1
register: lazydocker_current_version register: lazydocker_current_version
changed_when: no changed_when: false
when: when:
- lazydocker_current_binary.stat.exists - lazydocker_current_binary.stat.exists
@ -20,8 +20,8 @@
exclude: exclude:
- 'README.md' - 'README.md'
- 'LICENSE' - 'LICENSE'
remote_src: yes remote_src: true
force: yes force: true
owner: root owner: root
mode: 0755 mode: 0755
when: when:

View File

@ -49,4 +49,4 @@
apt_repository: apt_repository:
repo: "{{ docker_apt_repository }}" repo: "{{ docker_apt_repository }}"
state: present state: present
update_cache: yes update_cache: true

View File

@ -1,3 +1,3 @@
# {{ ansible_managed }} {{ ansible_managed | comment }}
[Service] [Service]
ExecStartPre= ExecStartPre=