Salt minion won't create user

19 views
Skip to first unread message

Alexander Solla

unread,
Jun 28, 2022, 12:26:41 AM6/28/22
to Salt-users
I am having a weird problem migrating my salt stack from an older version (I think 2019) of SaltStack to the latest stable (3004 I believe).  I am running Debian Bullseye on the master and minions.  Incidentally, the machines are managed by Vagrant and libvirt.

Here's the problem:  I have a user.required state to create a user and have set up require: user: clauses in a bunch of states to ensure the user is created first.  But when I call salt-call state.apply, the user.required state does not return a boolean result, and the comment says "User foo is set to be added".  At this point, all the states that depend on it fail too.

I did some googling and found that this comment is apparently related to the test=True flag being set on the salt minion.  But when I call salt-call state.apply test=False, it still fails with the same issues.  If something is setting the flag to true behind my back, it "must" be internal to salt.

Here is what the user.required state looks like:

    foo:
      user.present:
      - shell: /bin/bash
      - home: /home/foo
      - password: ...
      - optional_groups:
        - salt

Any syntax errors are due to retyping -- the real code has worked for years.  But anyway, none of what is going on in that state seems complicated.  I really don't understand what is going on.

Reply all
Reply to author
Forward
0 new messages