plasmabio / plasma

Plasma is an e-learning Jupyter-based platform for data analysis

Home Page:https://docs.plasmabio.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing group prior to user creation

pierrepo opened this issue · comments

The user creation task failed if groups are not created:

$ ansible-playbook users.yml -i hosts.old -u ubuntu -e @users-config.yml
|...]
TASK [Add users] *******************************************************************************************************************************************************************************
Monday 22 June 2020  22:03:21 +0200 (0:00:02.859)       0:00:02.911 *********** 
failed: [51.68.113.239] (item={'name': 'claire2', 'password': 'claire'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "claire2", "password": "claire"}, "msg": "Group claire2 does not exist"}
failed: [51.68.113.239] (item={'name': 'sandrine2', 'password': 'sandrine'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "sandrine2", "password": "sandrine"}, "msg": "Group sandrine2 does not exist"}

[...]

If passed to ansible, user groups need to exist.

Do you think groups should be created automatically when executing the users playbook if they don't already exist?

OK let's discuss this in #165