DEV Community

Eutychus Towett
Eutychus Towett

Posted on • Edited on • Originally published at citizix.com

3 2

Creating a Linux User With Ansible

Linux is a multi user system, this means you can create multiple users.

To create user use this:

- name: Create user on a linux server
  hosts: remote-server
  become: yes
  gather_facts: false
  vars:
    - user: rocky
    - password: $6$OmUdHERAMzqjcbvb$bKp/b76h7EZ1EpFuXeN7ygvyzBgbZUdyQOK6seakitssSSrfYS50.JcXXsWxyBu7tUehMJGvB0alPR.Ls3BOR/
  tasks:
    - name: Create a login user
      user:
        name: "{{ user }}"
        password: "{{ password }}"
        groups:
          - wheel
        state: present
Enter fullscreen mode Exit fullscreen mode

Please check out this blog post on Citizix here

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay