Bootstrap FreeKB - Ansible - Create and remove groups using the group module
Ansible - Create and remove groups using the group module

Updated:   |  Ansible articles

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

The group module is similar to the groupadd and groupdel commands. The user module is used to create or delete a group on a managed node (e.g. target system). In this example, group001 will be created.

- name: create group001
  group:
    name: group001
    state: present

 

In this example, group001 will be deleted.

- name: delete group001
  group:
    name: group001
    state: absent

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter ef799e in the box below so that we can be sure you are a human.