mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-09-26 17:51:03 +02:00
[FIX] linting
* add pipefail for shell module * set bash instead sh for shell module
This commit is contained in:
parent
321b1ca24c
commit
88a8494528
@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
- name: docker-compose | get current binary version
|
- name: docker-compose | get current binary version
|
||||||
shell: |
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
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
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: docker_compose_current_version
|
register: docker_compose_current_version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -21,4 +24,4 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when:
|
when:
|
||||||
- not docker_compose_current_binary.stat.exists or (docker_compose_current_version.stdout and docker_compose_current_version.stdout is version(docker_compose_version, '!='))
|
- not docker_compose_current_binary.stat.exists or docker_compose_current_version.stdout is version(docker_compose_version, '!=')
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: docker-shim | get current version when installed
|
- name: docker-shim | get current version when installed
|
||||||
shell: |
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
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
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: docker_current_version
|
register: docker_current_version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
- name: lazydocker | get current binary version
|
- name: lazydocker | get current binary version
|
||||||
shell: |
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
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
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
register: lazydocker_current_version
|
register: lazydocker_current_version
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -25,4 +28,4 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when:
|
when:
|
||||||
- not lazydocker_current_binary.stat.exists or (lazydocker_current_version.stdout and lazydocker_current_version.stdout is version(lazydocker_version, '!='))
|
- not lazydocker_current_binary.stat.exists or lazydocker_current_version.stdout is version(lazydocker_version, '!=')
|
||||||
|
@ -38,10 +38,11 @@
|
|||||||
|
|
||||||
- name: Add Docker apt key (alternative for older systems without SNI).
|
- name: Add Docker apt key (alternative for older systems without SNI).
|
||||||
shell: |
|
shell: |
|
||||||
set -euxo pipefail
|
set -o pipefail
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
|
executable: /bin/bash
|
||||||
when:
|
when:
|
||||||
- add_repository_key is failed
|
- add_repository_key is failed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user