--- - hosts: all tasks: - name: Felhasználók felvétele user: name: "{{ item.name }}" comment: "{{ item.comment}}" groups: "{{ item.groups }}" shell: "{{ item.shell }}" password: "{{ item.password | password_hash('sha512','soso') }}" state: "{{ item.state }}" loop: - { name: 'kati', comment: 'Pe Katalin', groups: 'informatika', shell: '/bin/bash', password: 'titok', state: 'present' } - { name: 'mari', comment: 'Kiss Mária', groups: 'informatika', shell: '/bin/bash', password: 'titok', state: 'present' } become: yes