Ansible - What's the proper syntax for loop + zip when combining more than two lists?How does PHP 'foreach' actually work?Joining two lists of dicts based on unique key in Jinja2/Ansible using map() functionLoop through hosts with ansibleExtract filename from file result in ansibleansible: correct way to check a list of variables has been set?Iterating through nested dictionaries in Ansibles group_varsHow to provide Ansible default value that includes another variable?with_subelements when subelement is a dictionaryIssue in passing Loop values to Ansible Debug message

Are medical malpractice lawsuits part of the public record?

Why is Trump moving to Florida?

Why use a recurrent neural network over a feedforward neural network for sequence prediction?

How tall would a rainforest need to be to make it completely dark at ground level

Why are dates (of writing or publication) missing in scientific papers?

Max of the reversed of two numbers

CircuiTikZ: How to change the node options of labels and annotations?

Why does the single dot entry exist in file systems?

(Re-)entering UK academic system after a long time abroad

Are these special (one production) Context-Free Grammars always unambiguous?

Submitting list of forbidden words

Solve an ODE containing a 3rd degree polynomial

Why is Carbon Dioxide a Greenhouse Gas whereas Ammonia is not?

In the top five, I'm odd

Drying clothes: windy but cold outside vs warm(ish) inside?

Options for installing sub-panel

What are the catcode 11 / letter codepoints in Xe(La)Tex?

Famous statistical wins and horror stories for teaching purposes

Function to calculate "Nd6 take highest 2, sort descending" probabilities in AnyDice

Why is it possible to teach real numbers before even rigorously defining them?

Does Amoxicillin (as trihydrate) degrade in stomach acid?

Energy cost of C−N rotation in hydroxamate group

Is this a deadly encounter?

LWC not evaluating the if:true statement



Ansible - What's the proper syntax for loop + zip when combining more than two lists?


How does PHP 'foreach' actually work?Joining two lists of dicts based on unique key in Jinja2/Ansible using map() functionLoop through hosts with ansibleExtract filename from file result in ansibleansible: correct way to check a list of variables has been set?Iterating through nested dictionaries in Ansibles group_varsHow to provide Ansible default value that includes another variable?with_subelements when subelement is a dictionaryIssue in passing Loop values to Ansible Debug message






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















I haven't been able to find the syntax for loop + zip when combining more than 2 lists.



Since Ansible 2.5, as shown here, the following syntax replaces with_together with loop + zip:



- name: with_together
debug:
msg: " item.0 - item.1 "
with_together:
- " list_one "
- " list_two "

- name: with_together -> loop
debug:
msg: " item.0 - item.1 "
loop: "zip(list_two)"


My question is, whereas when using with_together, you could simply append lists, and reference them with iterating numbers, I haven't been able to find the method to use with loop + zip. I have tried:



loop: "zip(list_three)"


Without success.










share|improve this question
































    2

















    I haven't been able to find the syntax for loop + zip when combining more than 2 lists.



    Since Ansible 2.5, as shown here, the following syntax replaces with_together with loop + zip:



    - name: with_together
    debug:
    msg: " item.0 - item.1 "
    with_together:
    - " list_one "
    - " list_two "

    - name: with_together -> loop
    debug:
    msg: " item.0 - item.1 "
    loop: "zip(list_two)"


    My question is, whereas when using with_together, you could simply append lists, and reference them with iterating numbers, I haven't been able to find the method to use with loop + zip. I have tried:



    loop: "zip(list_three)"


    Without success.










    share|improve this question




























      2












      2








      2








      I haven't been able to find the syntax for loop + zip when combining more than 2 lists.



      Since Ansible 2.5, as shown here, the following syntax replaces with_together with loop + zip:



      - name: with_together
      debug:
      msg: " item.0 - item.1 "
      with_together:
      - " list_one "
      - " list_two "

      - name: with_together -> loop
      debug:
      msg: " item.0 - item.1 "
      loop: "zip(list_two)"


      My question is, whereas when using with_together, you could simply append lists, and reference them with iterating numbers, I haven't been able to find the method to use with loop + zip. I have tried:



      loop: "zip(list_three)"


      Without success.










      share|improve this question















      I haven't been able to find the syntax for loop + zip when combining more than 2 lists.



      Since Ansible 2.5, as shown here, the following syntax replaces with_together with loop + zip:



      - name: with_together
      debug:
      msg: " item.0 - item.1 "
      with_together:
      - " list_one "
      - " list_two "

      - name: with_together -> loop
      debug:
      msg: " item.0 - item.1 "
      loop: "zip(list_two)"


      My question is, whereas when using with_together, you could simply append lists, and reference them with iterating numbers, I haven't been able to find the method to use with loop + zip. I have tried:



      loop: "zip(list_three)"


      Without success.







      loops ansible






      share|improve this question














      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 21:27









      TravisTravis

      285 bronze badges




      285 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          2


















          You can append additional arrays inside the zip filter itself.



          zip(list, list, list, ...)


          For example:



          - hosts: localhost
          become: false
          gather_facts: false
          tasks:
          - vars:
          list_one:
          - one
          - two
          list_two:
          - three
          - four
          list_three:
          - five
          - six
          debug:
          msg: " item.0 item.1 item.2 "
          loop: " list_one "


          When run:



          PLAY [localhost] *********************************************************************************************************************************************

          TASK [debug] *************************************************************************************************************************************************
          ok: [localhost] => (item=['one', 'three', 'five']) =>
          "msg": "one three five"

          ok: [localhost] => (item=['two', 'four', 'six']) =>
          "msg": "two four six"


          PLAY RECAP ***************************************************************************************************************************************************
          localhost : ok=1 changed=0 unreachable=0 failed=0





          share|improve this answer


























          • Thanks so much. I couldn't find that documented anywhere online.

            – Travis
            Mar 29 at 12:20












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407094%2fansible-whats-the-proper-syntax-for-loop-zip-when-combining-more-than-two-l%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2


















          You can append additional arrays inside the zip filter itself.



          zip(list, list, list, ...)


          For example:



          - hosts: localhost
          become: false
          gather_facts: false
          tasks:
          - vars:
          list_one:
          - one
          - two
          list_two:
          - three
          - four
          list_three:
          - five
          - six
          debug:
          msg: " item.0 item.1 item.2 "
          loop: " list_one "


          When run:



          PLAY [localhost] *********************************************************************************************************************************************

          TASK [debug] *************************************************************************************************************************************************
          ok: [localhost] => (item=['one', 'three', 'five']) =>
          "msg": "one three five"

          ok: [localhost] => (item=['two', 'four', 'six']) =>
          "msg": "two four six"


          PLAY RECAP ***************************************************************************************************************************************************
          localhost : ok=1 changed=0 unreachable=0 failed=0





          share|improve this answer


























          • Thanks so much. I couldn't find that documented anywhere online.

            – Travis
            Mar 29 at 12:20















          2


















          You can append additional arrays inside the zip filter itself.



          zip(list, list, list, ...)


          For example:



          - hosts: localhost
          become: false
          gather_facts: false
          tasks:
          - vars:
          list_one:
          - one
          - two
          list_two:
          - three
          - four
          list_three:
          - five
          - six
          debug:
          msg: " item.0 item.1 item.2 "
          loop: " list_one "


          When run:



          PLAY [localhost] *********************************************************************************************************************************************

          TASK [debug] *************************************************************************************************************************************************
          ok: [localhost] => (item=['one', 'three', 'five']) =>
          "msg": "one three five"

          ok: [localhost] => (item=['two', 'four', 'six']) =>
          "msg": "two four six"


          PLAY RECAP ***************************************************************************************************************************************************
          localhost : ok=1 changed=0 unreachable=0 failed=0





          share|improve this answer


























          • Thanks so much. I couldn't find that documented anywhere online.

            – Travis
            Mar 29 at 12:20













          2














          2










          2









          You can append additional arrays inside the zip filter itself.



          zip(list, list, list, ...)


          For example:



          - hosts: localhost
          become: false
          gather_facts: false
          tasks:
          - vars:
          list_one:
          - one
          - two
          list_two:
          - three
          - four
          list_three:
          - five
          - six
          debug:
          msg: " item.0 item.1 item.2 "
          loop: " list_one "


          When run:



          PLAY [localhost] *********************************************************************************************************************************************

          TASK [debug] *************************************************************************************************************************************************
          ok: [localhost] => (item=['one', 'three', 'five']) =>
          "msg": "one three five"

          ok: [localhost] => (item=['two', 'four', 'six']) =>
          "msg": "two four six"


          PLAY RECAP ***************************************************************************************************************************************************
          localhost : ok=1 changed=0 unreachable=0 failed=0





          share|improve this answer














          You can append additional arrays inside the zip filter itself.



          zip(list, list, list, ...)


          For example:



          - hosts: localhost
          become: false
          gather_facts: false
          tasks:
          - vars:
          list_one:
          - one
          - two
          list_two:
          - three
          - four
          list_three:
          - five
          - six
          debug:
          msg: " item.0 item.1 item.2 "
          loop: " list_one "


          When run:



          PLAY [localhost] *********************************************************************************************************************************************

          TASK [debug] *************************************************************************************************************************************************
          ok: [localhost] => (item=['one', 'three', 'five']) =>
          "msg": "one three five"

          ok: [localhost] => (item=['two', 'four', 'six']) =>
          "msg": "two four six"


          PLAY RECAP ***************************************************************************************************************************************************
          localhost : ok=1 changed=0 unreachable=0 failed=0






          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Mar 28 at 22:32









          NickNick

          9229 silver badges19 bronze badges




          9229 silver badges19 bronze badges















          • Thanks so much. I couldn't find that documented anywhere online.

            – Travis
            Mar 29 at 12:20

















          • Thanks so much. I couldn't find that documented anywhere online.

            – Travis
            Mar 29 at 12:20
















          Thanks so much. I couldn't find that documented anywhere online.

          – Travis
          Mar 29 at 12:20





          Thanks so much. I couldn't find that documented anywhere online.

          – Travis
          Mar 29 at 12:20




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407094%2fansible-whats-the-proper-syntax-for-loop-zip-when-combining-more-than-two-l%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현