You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like the following could be added to the role:
- name: Use gitea cli to create useransible.builtin.command: > /usr/local/bin/gitea -c {{ gitea_configuration_path }}/gitea.ini admin user create --username "{{ item.name }}" --password "{{ item.password }}" --email "{{ item.email }}" --must-change-password=falsebecome_user: "{{ gitea_user }}"register: gitearesultfailed_when:
- '"successfully created" not in gitearesult.stdout'
- '"user already exists" not in gitearesult.stderr'changed_when:
- '"successfully created" in gitearesult.stdout'loop: "{{ gitea_users }}"
With defaults/main.yml looking like:
# list of users to add to Gitea, default is an empty list so that no user is createdgitea_users: []# example of entry# - name: johndoe# password: verysecret# email: "johndoe@{{ gitea_fqdn }}"
The text was updated successfully, but these errors were encountered:
Something like the following could be added to the role:
With
defaults/main.yml
looking like:The text was updated successfully, but these errors were encountered: