Skip to content

Custom fields extends #20

@filoucrackeur

Description

@filoucrackeur

Hello

I would like to know if is it possible to add custom added field in ipa_user ansible module?

Freeipa is extensible so i've added some custom fields in my example : "see"

---
- name: Playbook Development
  hosts: localhost
  connection: local
  tasks:
    - name: Ajout de compte de tests dans IPA
      tags: ipa_user_add
      become: true
      ipa_user:
        uid: "{{ item.username }}"
        displayname: "{{ item.username }}"
        givenname: "{{ item.username }}"
        sn: "{{ item.username }}"
        password: "{{ item.password }}"
        state: present
        ipa_host: "localhost"
        ipa_user: administrateur
        ipa_pass: "ahahah"
        see: "{{ item.see }}"<-------------------- my existing custom field
      with_items:
        - {username: "philippe", password: "12345678",see: "kamel,jimmy,emmanuel"}
        - {username: "kamel", password: "12345678",see: "philippe,jimmy,emmanuel"}
        - {username: "jimmy", password: "12345678",see: "philippe,kamel,emmanuel"}
        - {username: "antony", password: "12345678",see: "kamel"}
        - {username: "theo", password: "12345678",see: "antony"}
        - {username: "romain-xavier", password: "12345678",see: "kamel"}
        - {username: "gaetan", password: "12345678",see: "antony,philippe"}
        - {username: "charlie", password: "12345678",see: "antony"}
        - {username: "emmanuel", password: "12345678",see: "philippe,jimmy,kamel"}

Maybe a new mapping property in your module ?

mapped_fields:
      - see: "valeur"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions