# \#yaml

**URL:** https://forum.ansible.com/tag/yaml/301.md

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

---

## [Run a remote command from a template \*file\*](https://forum.ansible.com/t/run-a-remote-command-from-a-template-file/46319)

<div class="topic-metadata">

**Author:** [@mirabilos](https://forum.ansible.com/u/mirabilos)\
**Replies:** 12\
**Last updated:** [October 14, 2026, 10:35pm UTC](https://forum.ansible.com/t/run-a-remote-command-from-a-template-file/46319 "2026-10-14T22:35:06Z")

</div>

I need to run a few lines of shell on a remote system, and I find YAML more than awkward to use for this and would prefer to put this into a foo.sh.j2 file instead. Now I could do the dance: stat to test if a remote d…

---

## [Parsing and vaulting yaml the Ansible way with ruamel.yaml](https://forum.ansible.com/t/parsing-and-vaulting-yaml-the-ansible-way-with-ruamel-yaml/2433)

<div class="topic-metadata">

**Author:** [@utoddl](https://forum.ansible.com/u/utoddl)\
**Replies:** 5\
**Last updated:** [January 2, 2026, 12:24am UTC](https://forum.ansible.com/t/parsing-and-vaulting-yaml-the-ansible-way-with-ruamel-yaml/2433 "2026-01-02T00:24:30Z")

</div>

I tend to favor vaulted scalar values in vars files over entire vaulted files, partly because I can grep for variable names successfully. (I grep a lot!) But creating and managing vaulted scalars is a bit clunky. To mak…

---

## [When variable is vaulted, to\_nice\_yaml renders output differently](https://forum.ansible.com/t/when-variable-is-vaulted-to-nice-yaml-renders-output-differently/45007)

<div class="topic-metadata">

**Author:** [@spike](https://forum.ansible.com/u/spike)\
**Replies:** 4\
**Last updated:** [December 18, 2025, 8:13pm UTC](https://forum.ansible.com/t/when-variable-is-vaulted-to-nice-yaml-renders-output-differently/45007 "2025-12-18T20:13:57Z")

</div>

Hi everyone, :waving\_hand: I’m a bit puzzled and would appreciate some input. I’ve got a variable (network\_key) containing a list of integers (nested in a dictionary, but that shouldn’t matter). This is eventually pipe…

---

## [Parsing a YAML file using Ansible](https://forum.ansible.com/t/parsing-a-yaml-file-using-ansible/44535)

<div class="topic-metadata">

**Author:** [@AmirShalom](https://forum.ansible.com/u/AmirShalom)\
**Replies:** 2\
**Last updated:** [September 23, 2025, 3:36pm UTC](https://forum.ansible.com/t/parsing-a-yaml-file-using-ansible/44535 "2025-09-23T15:36:55Z")

</div>

Hi Ansible forum, Using ansible, Im trying to read a yaml file structured like this: version: 111 inventory: folder1: - file1: True - file2: False folder2: - file1: False - file2: True - file3: True folder3: -…

---

## [How to copy a folder between two virtual machines?](https://forum.ansible.com/t/how-to-copy-a-folder-between-two-virtual-machines/42695)

<div class="topic-metadata">

**Author:** [@virusek391](https://forum.ansible.com/u/virusek391)\
**Replies:** 6\
**Last updated:** [May 17, 2025, 1:24pm UTC](https://forum.ansible.com/t/how-to-copy-a-folder-between-two-virtual-machines/42695 "2025-05-17T13:24:41Z")

</div>

Hi, I have vritual machine with Ansible. Now i want copy data from directory certyfikaty on svrhost to directory /svr/vaultwarden/cert folder on svrdocker. I don’t know what’s wrong, but below code dosen;t work - name…

---

## [The callback\_result\_format yaml indentation](https://forum.ansible.com/t/the-callback-result-format-yaml-indentation/40300)

<div class="topic-metadata">

**Author:** [@vbotka](https://forum.ansible.com/u/vbotka)\
**Replies:** 5\
**Last updated:** [February 26, 2025, 4:45pm UTC](https://forum.ansible.com/t/the-callback-result-format-yaml-indentation/40300 "2025-02-26T16:45:27Z")

</div>

Already announced community.general.yaml has been deprecated. This callback indentes the output by 2. For example, given the below dictionary test: a: \[foo, bar\] b: {x: foo, y: bar} The debug - deb…

---

## [Yaml confusion with local\_action](https://forum.ansible.com/t/yaml-confusion-with-local-action/39248)

<div class="topic-metadata">

**Author:** [@halloleo](https://forum.ansible.com/u/halloleo)\
**Replies:** 4\
**Last updated:** [December 19, 2024, 4:27pm UTC](https://forum.ansible.com/t/yaml-confusion-with-local-action/39248 "2024-12-19T16:27:43Z")

</div>

I needed to add the local\_action directive to an action, so I tried this: - name: Create unique tempdir path local\_action: ansible.builtin.tempfile: state: directory suffix: \_sshp…

---

## [New user: need support to exclude some files from directory for clang operation in yaml with ansible with zuul jobs](https://forum.ansible.com/t/new-user-need-support-to-exclude-some-files-from-directory-for-clang-operation-in-yaml-with-ansible-with-zuul-jobs/39228)

<div class="topic-metadata">

**Author:** [@Ajay107246](https://forum.ansible.com/u/Ajay107246)\
**Replies:** 5\
**Last updated:** [December 18, 2024, 2:51pm UTC](https://forum.ansible.com/t/new-user-need-support-to-exclude-some-files-from-directory-for-clang-operation-in-yaml-with-ansible-with-zuul-jobs/39228 "2024-12-18T14:51:24Z")

</div>

I need support to exclude some files from directory for clang operation in yaml with ansible with zuul jobs. purpose: I need to exclude unwanted files (e.g. exclude 4 / 10 files) from directory to perform clang operatio…

---

## [Prevent to\_nice\_yaml filter from quoting integers when populated from variable](https://forum.ansible.com/t/prevent-to-nice-yaml-filter-from-quoting-integers-when-populated-from-variable/8823)

<div class="topic-metadata">

**Author:** [@spike](https://forum.ansible.com/u/spike)\
**Replies:** 3\
**Last updated:** [September 27, 2024, 5:21pm UTC](https://forum.ansible.com/t/prevent-to-nice-yaml-filter-from-quoting-integers-when-populated-from-variable/8823 "2024-09-27T17:21:20Z")

</div>

Hi, I’m trying to deploy the contents of a dictionary to a yaml file: - name: Deploy template vars: - cloud\_init\_config: fqdn: "{{ inventory\_hostname }}" prefer\_fqdn\_over\_hostname: true ma…

---

## [Not able to run ansible playbook , getting error with passing input file and taking input from user using assert module](https://forum.ansible.com/t/not-able-to-run-ansible-playbook-getting-error-with-passing-input-file-and-taking-input-from-user-using-assert-module/5872)

<div class="topic-metadata">

**Author:** [@jatin821](https://forum.ansible.com/u/jatin821)\
**Replies:** 2\
**Last updated:** [May 21, 2024, 6:28am UTC](https://forum.ansible.com/t/not-able-to-run-ansible-playbook-getting-error-with-passing-input-file-and-taking-input-from-user-using-assert-module/5872 "2024-05-21T06:28:23Z")

</div>

Hello All, I am trying to pass a file (VAULT-PASS.YML) using Ansible built in module vars and taking input from user and then comparing it using assert module , If the input matches with the content given in file vault…

---

## [Facilitate ansible-vaulting of variables from within text editors](https://forum.ansible.com/t/facilitate-ansible-vaulting-of-variables-from-within-text-editors/2527)

<div class="topic-metadata">

**Author:** [@utoddl](https://forum.ansible.com/u/utoddl)\
**Replies:** 0\
**Last updated:** [November 22, 2023, 10:11pm UTC](https://forum.ansible.com/t/facilitate-ansible-vaulting-of-variables-from-within-text-editors/2527 "2023-11-22T22:11:56Z")

</div>

Continuing the discussion from Parsing and vaulting yaml the Ansible way with ruamel.yaml: This code now has a github repo to make collaboration easier. Your participation is welcome. Here’s an interesting suggestion: …
