Creating a user with a dash in their username

Hi there,

I understand that dashes are reserved. I’m wondering though if anybody else has had the need to create users, specifically system ones, that have a dash in their name. At the moment, I have an action that is similar to the below. It returns an error when I attempt to run the playbook that references it. Any ideas how I can do this?

  • name: Create web user account
    user: name=www-data system=yes

Dan.

Excerpts from Dan Rough's message of 2013-10-21 10:26:24 -0400:

- name: Create web user account
  user: name='www-data' system=yes

Should work.

I think this is a misunderstanding.

Dashes are totally fine in constants.

You just can’t use them in variable names (values are fine!)