Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with defaults/main.yml syntax #549

Open
gdadev opened this issue Sep 8, 2023 · 1 comment
Open

Problem with defaults/main.yml syntax #549

gdadev opened this issue Sep 8, 2023 · 1 comment
Assignees

Comments

@gdadev
Copy link

gdadev commented Sep 8, 2023

Role fails with this error:

ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting value: line 1 column 1 (char 0)

Syntax Error while loading YAML.
  found character '\t' that cannot start any token

The error appears to be in '/nvme1/work/git-repos/__ansible-roles/anxs.postgresql/defaults/main.yml': line 236, column 42, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

postgresql_bgwriter_lru_multiplier: 2.0    # 0-10.0 multiplier on buffers scanned/round
postgresql_bgwriter_flush_after:    512kB               # measured in pages, 0 disables
                                         ^ here
There appears to be a tab character at the start of the line.

YAML does not use tabs for formatting. Tabs should be replaced with spaces.

For example:
    - name: update tooling
      vars:
        version: 1.2.3
#    ^--- there is a tab there.

Should be written as:
    - name: update tooling
      vars:
        version: 1.2.3
# ^--- all spaces here.
task: Failed to run task "pb": exit status 4
@MrMegaNova MrMegaNova self-assigned this Dec 15, 2023
@MrMegaNova MrMegaNova added the bug label Dec 15, 2023
@MrMegaNova
Copy link
Collaborator

We expect more context to be able to reproduce the error and give you some help.
Are you able to reproduce with the latest version of the role ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants