Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • What if using ansible instead of ansiable-playbook? Commented Nov 21, 2022 at 9:43
  • 1
    Using shell: > actually results in ansible inserting line breaks, so this is incorrect. Commented Jan 20, 2023 at 15:43
  • 2
    Nowhere in this answer do I show an example of using shell: >, and furthermore your statement is simply incorrect: Ansible doesn't know whether you use " or > or |; it only knows what text it receives after parsing the YAML. The > quote operating is a folding operator and does not preserve newlines. If you're seeing different behavior, feel free to open a question and I would be happy to take a look at it. Commented Jan 20, 2023 at 23:35
  • 1
    There's a slight gotcha about the indentation of the rows beneath >: they all must be indented the same amount for the folding to work correctly (at least in Ansible). I posted a complementary answer about this. This might be what @PhilippLudwig was seeing? Commented Mar 23, 2023 at 14:22