Fails on fresh debian 13 as root #6

Open
opened 2026-02-15 17:17:41 -05:00 by yindo · 1 comment
Owner

Originally created by @kyeotic on GitHub (Jan 28, 2026).

Running as root, which the requirements say is supported

# fails without these
$ apt update && apt install curl git 
# url from this readme, but doesnt point to this repo...
$ curl -fsSL https://raw.githubusercontent.com/pasogott/clawdbot-ansible/main/install.sh | bash 
// a whole bunch of stuff
// ..
TASK [Install Homebrew (macOS and Linux)] ********************************************************************************************************************************************************************************
[ERROR]: Task failed: Module failed: non-zero return code
Origin: /tmp/tmp.zCmgyLbLJM/clawdbot-ansible/playbook.yml:74:7

72       register: homebrew_check
73
74     - name: Install Homebrew (macOS and Linux)
         ^ column 7

fatal: [localhost]: FAILED! => {"changed": true, "cmd": "NONINTERACTIVE=1 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n", "delta": "0:00:00.110638", "end": "2026-01-28 05:56:09.066233", "msg": "non-zero return code", "rc": 1, "start": "2026-01-28 05:56:08.955595", "stderr": "Don't run this as root!", "stderr_lines": ["Don't run this as root!"], "stdout": "==> Running in non-interactive mode because `$NONINTERACTIVE` is set.\n==> Checking for `sudo` access (which may request your password)...", "stdout_lines": ["==> Running in non-interactive mode because `$NONINTERACTIVE` is set.", "==> Checking for `sudo` access (which may request your password)..."]}

I tested with curl -fsSL https://raw.githubusercontent.com/moltbot/clawdbot-ansible/main/install.sh | bash just to be safe and it fails in the same way

I also created a new user, gave it sudo permission, and ran the script (on a fresh install). It fails with the same error to not run as root.

Originally created by @kyeotic on GitHub (Jan 28, 2026). Running as root, which the [requirements](https://docs.molt.bot/install/ansible#requirements) say is supported ``` # fails without these $ apt update && apt install curl git # url from this readme, but doesnt point to this repo... $ curl -fsSL https://raw.githubusercontent.com/pasogott/clawdbot-ansible/main/install.sh | bash // a whole bunch of stuff // .. TASK [Install Homebrew (macOS and Linux)] ******************************************************************************************************************************************************************************** [ERROR]: Task failed: Module failed: non-zero return code Origin: /tmp/tmp.zCmgyLbLJM/clawdbot-ansible/playbook.yml:74:7 72 register: homebrew_check 73 74 - name: Install Homebrew (macOS and Linux) ^ column 7 fatal: [localhost]: FAILED! => {"changed": true, "cmd": "NONINTERACTIVE=1 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n", "delta": "0:00:00.110638", "end": "2026-01-28 05:56:09.066233", "msg": "non-zero return code", "rc": 1, "start": "2026-01-28 05:56:08.955595", "stderr": "Don't run this as root!", "stderr_lines": ["Don't run this as root!"], "stdout": "==> Running in non-interactive mode because `$NONINTERACTIVE` is set.\n==> Checking for `sudo` access (which may request your password)...", "stdout_lines": ["==> Running in non-interactive mode because `$NONINTERACTIVE` is set.", "==> Checking for `sudo` access (which may request your password)..."]} ``` I tested with `curl -fsSL https://raw.githubusercontent.com/moltbot/clawdbot-ansible/main/install.sh | bash` just to be safe and it fails in the same way I also created a new user, gave it sudo permission, and ran the script (on a fresh install). It fails with the same error to not run as root.
Author
Owner

@slayer01 commented on GitHub (Feb 4, 2026):

Edit: Its already addressed here -> https://github.com/openclaw/openclaw-ansible/issues/3

this is because the playbook overwrites ansible_env in pre_tasks.

Change this in playbook.yml

pre_tasks:
    #- name: Enable color terminal for current session
    #  ansible.builtin.set_fact:
    #    ansible_env:
    #      TERM: xterm-256color
    #      COLORTERM: truecolor
    - name: Enable color terminal for current session
      ansible.builtin.set_fact:
        ansible_env: "{{ ansible_env | combine({'TERM': 'xterm-256color', 'COLORTERM': 'truecolor'}) }}"
@slayer01 commented on GitHub (Feb 4, 2026): Edit: Its already addressed here -> https://github.com/openclaw/openclaw-ansible/issues/3 this is because the playbook overwrites ansible_env in pre_tasks. Change this in playbook.yml ``` pre_tasks: #- name: Enable color terminal for current session # ansible.builtin.set_fact: # ansible_env: # TERM: xterm-256color # COLORTERM: truecolor - name: Enable color terminal for current session ansible.builtin.set_fact: ansible_env: "{{ ansible_env | combine({'TERM': 'xterm-256color', 'COLORTERM': 'truecolor'}) }}" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/openclaw-ansible#6