nested with_fileglob and with_sequence

Hi:

I’m trying to act on the cartesian product of a fileglob and a sequence.

Is there a way to do this with with_nested?

I tried this:

  • cmd: cp {{ item[0] }} {{ item[0] }}.{{ item[1] }}
    with_nested:
  • with_fileglob:
  • /etc/*
  • with_sequence: start=0 end=10

But this produced an error.

I thought about creating lists, but registering for the results of “ls -1 /etc/*” and “seq 0 10”, then using these lists with with_nested, but that seems hacky.

Any suggestions?

Thanks,

Rob

So “with_fileglob” works locally.

The “sequence” idea would generate a range of 1-10, but I’m having a bit trouble modelling your end to end use case and may be able to suggest something better.

Can you explain what the above sytntax would do and return?

Thanks!

For each file in /etc, it should create additional copies with .1, .2, .3, …, .10 extensions.

Rob