- name: Load docker images
  shell:
    cmd: docker load -i {{ item }}
    chdir: /tmp/images
  with_items: "{{ lists.stdout_lines }}"
在2021年1月12日星期二 UTC+8 下午6:24:57<[email protected]> 写道:

> On Tue, 12 Jan 2021 at 10:15, [email protected] <[email protected]> wrote:
> >
> > versions
> >
> > ansible version: 2.10.4
> > system version: CentOS7.9
> > kernel version: 3.10.0-1160.11.1.el7.x86_64
> >
> > bug errorswhen I use the ansible-playbook ,the yml file is below:
> >
> > name: List images
> > shell: ls /tmp/images
> > register: lists
> >
> > name: show lists
> > debug:
> > var: lists.stdout_lines
> >
> > name: Load docker images
> > shell:
> > chdir: /tmp/images
> > cmd: docker load -i {{ item }}
> > with_items: "{{ lists.stdout_lines }}"
>
> The indentation looks wrong here.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/12684249-d901-4fcc-8c9f-aa8a5b3fae79n%40googlegroups.com.

Reply via email to