Ansible seems not supporting fundemental user management commands in Arch Linux

25 views
Skip to first unread message

Bilinmek Istemiyor

unread,
Nov 22, 2019, 4:41:17 PM11/22/19
to Ansible Project
Hello,

I am building a nas server with manjaro architect (arch based distribution). I try to automate tasks with ansible. However ansible user management is giving me errors stating that ""msg": "Unsupported parameters for (group) module: append, comment, group, groups, home, shell Supported parameters include: gid, local, name, non_unique, state, system"} "

However to the best of my knowledge command set is the same with debian, ubuntu etc.  The not supported parameters are crucial for account management since I use lots of custom groups and custom home folder paths along with shell option.

I believe ansible detect the environment as follows

        "ansible_distribution": "Archlinux",
        "ansible_distribution_file_path": "/etc/arch-release",
        "ansible_distribution_file_variety": "Archlinux",
        "ansible_distribution_major_version": "18",
        "ansible_distribution_release": "Juhraya",
        "ansible_distribution_version": "18.1.3",

Any help much appreciated


alicia

unread,
Nov 22, 2019, 4:49:38 PM11/22/19
to ansible...@googlegroups.com
Can you add the playbook you’re running? The error message alone only gets us so far.

The error message is telling you that a task using the group module cannot include all the parameters you’re passing to it. Take a look at http://docs.testing.ansible.com/ansible/devel/modules/group_module.html for detailed documentation on how to use the group module and the parameters it accepts.

Hope this helps,
Alicia

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d3c57d1d-c116-4e18-a448-38ada9ec65e6%40googlegroups.com.

Bilinmek Istemiyor

unread,
Nov 22, 2019, 5:23:10 PM11/22/19
to Ansible Project
Thank you for the response.

I have extracted some private information but the playbook is a follows...

- hosts: nas
  remote_user: root
  tasks:
  - name: create users
    group:
      name: "{{ item.name }}"
      comment: "{{ item.comment }}"
      shell: "{{ item.shell }}"
      home: "{{ item.home }}"
      group: "{{ item.name }}"
      groups: "{{ item.groups }}"
      append: yes
    loop:
        - { name: 'user1', comment: 'User1 Information', shell: '/user/bin/bash',    home: '/pool/home/user1', groups: 'group1,group2,group3,group4,group5,group6'}
        - { name: 'user2', comment: 'User2 Information', shell: '/user/bin/nologin', home: '/pool/home/user2', groups: 'group1,group2,group3,group4,group5,group6'}
        - { name: 'user3', comment: 'User3 Information', shell: '/user/bin/nologin', home: '/pool/home/user3', groups: 'group1,group2,group3,group4,group5,group6'}


To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

Jean-Yves LENHOF

unread,
Nov 22, 2019, 5:33:43 PM11/22/19
to ansible...@googlegroups.com

Hi,

You did a mix between the user module and the group module parameters.

Please read docs and samples :

https://docs.ansible.com/ansible/latest/modules/group_module.html

https://docs.ansible.com/ansible/latest/modules/user_module.html


I think you should made a loop around group module to ensure all wanted groups exist,

and a second loop around user module to create users you want

Regards,

JYL

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cbbbdfe8-4a10-4f93-b9e2-5326d58c513e%40googlegroups.com.

Bilinmek Istemiyor

unread,
Nov 22, 2019, 9:58:55 PM11/22/19
to Ansible Project
Thank you for the solution. Embrassing copy and paste error ... Do not know what to say...Thank you again for sparing time..
Reply all
Reply to author
Forward
0 new messages