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


Le 22/11/2019 à 23:23, Bilinmek Istemiyor a écrit :
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'}




On Saturday, November 23, 2019 at 12:49:38 AM UTC+3, alicia wrote:

    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
    <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

    On Nov 22, 2019, at 3:41 PM, Bilinmek Istemiyor
    <beni...@gmail.com <javascript:>> wrote:

    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



-- 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...@googlegroups.com <javascript:>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/ansible-project/d3c57d1d-c116-4e18-a448-38ada9ec65e6%40googlegroups.com
    
<https://groups.google.com/d/msgid/ansible-project/d3c57d1d-c116-4e18-a448-38ada9ec65e6%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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-project+unsubscr...@googlegroups.com <mailto:ansible-project+unsubscr...@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 <https://groups.google.com/d/msgid/ansible-project/cbbbdfe8-4a10-4f93-b9e2-5326d58c513e%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c8a26db6-0d7c-c0a8-8639-7acb17ec3392%40lenhof.eu.org.

Reply via email to