Improve ansible yaml output for humans

We use ansible's to_nice_yaml output filter when writing ansible
datastructures to yaml. This has a default indent of 4, but we humans
usually write yaml with an indent of 2. Make the generated yaml more
similar to what us humans write and set the indent to 2.

Change-Id: I3dc41b54e1b6480d7085261bc37c419009ef5ba7
changes/75/736775/1
Clark Boylan 3 years ago
parent bec4b57d81
commit f7e92ee669

@ -67,7 +67,7 @@
- name: Write nodepool config
copy:
content: "{{ nodepool_config | to_nice_yaml }}"
content: "{{ nodepool_config | to_nice_yaml(indent=2) }}"
dest: /etc/nodepool/nodepool.yaml
- name: Symlink in elements from project-config repo

@ -103,7 +103,7 @@
# otherwise throws a j2 formatting exception.
- name: Write out testinfra extra data fixture
copy:
content: "{{ testinfra_extra_data | default('') | to_nice_yaml }}"
content: "{{ testinfra_extra_data | default('') | to_nice_yaml(indent=2) }}"
dest: '/home/zuul/testinfra_extra_data_fixture.yaml'
- name: Run testinfra to validate configuration

Loading…
Cancel
Save