playbooks/upgrade-docker-ce: fix YAML literal-block indentation
Multi-line shell with backslash-continued URL had the continuation
line starting at column 0, which breaks YAML's | literal block
('could not find expected :'). Stash the URL into a shell variable
and emit on one logical line.
This commit is contained in:
@@ -99,9 +99,9 @@ steps:
|
||||
shell: |
|
||||
codename=$(lsb_release -cs)
|
||||
arch=$(dpkg --print-architecture)
|
||||
echo "deb [arch=${arch} signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||
https://download.docker.com/linux/debian ${codename} stable" \
|
||||
| sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
url="https://download.docker.com/linux/debian"
|
||||
line="deb [arch=${arch} signed-by=/etc/apt/keyrings/docker.gpg] ${url} ${codename} stable"
|
||||
echo "${line}" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
sudo: true
|
||||
when: '[ ! -f /etc/apt/sources.list.d/docker.list ]'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user