[GH-ISSUE #570] Self Hosting deployment with Ansible fails on non Debian Systems #1718

Closed
opened 2026-03-01 18:35:44 +03:00 by kerem · 0 comments
Owner

Originally created by @GR360RY on GitHub (Feb 4, 2020).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/570

Describe the bug
Running self-hosting deployment on CentOS 7.7 results in the following error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"}

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo to /opt/
  2. Run the playbook with ansible-playbook -i inventory site.yml
  3. See error:
TASK [netbootxyz : Generate ipxe disk checksums] *****************************************************************
changed: [localhost]

TASK [netbootxyz : Generate site name banner for index] **********************************************************
skipping: [localhost]

TASK [netbootxyz : Generate netboot.xyz index template] **********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"}

Quick Fix
There is an issue jinja template for index.html.j2 at line 27:

{% if index_title is defined %}
  {{ index_title.stdout }}
  {% else %}
  <h1>{{ site_name }}</h1>
  {% endif %}

index_title variable is defined even when the task is skipped but missing stdout key - see debug for index_title variable:

TASK [netbootxyz : Generate site name banner for index] **********************************************************
skipping: [localhost]

TASK [netbootxyz : debug] ****************************************************************************************
ok: [localhost] => {
    "index_title": {
        "changed": false,
        "skip_reason": "Conditional result was False",
        "skipped": true
    }
}

TASK [netbootxyz : Generate netboot.xyz index template] **********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"}

The if statement should look as follows:

 {% if index_title.stdout is defined %}
  {{ index_title.stdout }}
  {% else %}
  <h1>{{ site_name }}</h1>
  {% endif %}
Originally created by @GR360RY on GitHub (Feb 4, 2020). Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/570 **Describe the bug** Running self-hosting deployment on CentOS 7.7 results in the following error: `fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"}` **To Reproduce** Steps to reproduce the behavior: 1. Clone the repo to /opt/ 2. Run the playbook with `ansible-playbook -i inventory site.yml` 3. See error: ``` TASK [netbootxyz : Generate ipxe disk checksums] ***************************************************************** changed: [localhost] TASK [netbootxyz : Generate site name banner for index] ********************************************************** skipping: [localhost] TASK [netbootxyz : Generate netboot.xyz index template] ********************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"} ``` **Quick Fix** There is an issue jinja template for `index.html.j2` at line 27: ``` {% if index_title is defined %} {{ index_title.stdout }} {% else %} <h1>{{ site_name }}</h1> {% endif %} ``` `index_title` variable is defined even when the task is skipped but missing `stdout` key - see debug for `index_title` variable: ``` TASK [netbootxyz : Generate site name banner for index] ********************************************************** skipping: [localhost] TASK [netbootxyz : debug] **************************************************************************************** ok: [localhost] => { "index_title": { "changed": false, "skip_reason": "Conditional result was False", "skipped": true } } TASK [netbootxyz : Generate netboot.xyz index template] ********************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'stdout'"} ``` The if statement should look as follows: ``` {% if index_title.stdout is defined %} {{ index_title.stdout }} {% else %} <h1>{{ site_name }}</h1> {% endif %} ```
kerem closed this issue 2026-03-01 18:35:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/netboot.xyz#1718
No description provided.