sort
This commit is contained in:
parent
ac3b3f68ca
commit
5747ba4077
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
|
||||
---
|
||||
- name: Ensure LDAP config is set up
|
||||
no_log: true
|
||||
become_user: gitea
|
||||
ansible.builtin.command: |
|
||||
forgejo admin auth add-ldap \
|
||||
--config "/etc/gitea/gitea.ini" \
|
||||
|
@ -21,7 +23,6 @@
|
|||
register: setup
|
||||
ignore_errors: true
|
||||
failed_when: 'not "Command error: login source already exists [name: lldap]" in setup.stderr' # fail Task wenn LDAP schon konfiguriert ist
|
||||
become_user: gitea
|
||||
changed_when: "setup.rc == 0" # chnaged nur wenn Task rc 0 hat, sollte nur beim ersten lauf vorkommen; ungetestet
|
||||
|
||||
- name: debug
|
||||
|
@ -29,6 +30,8 @@
|
|||
msg: "{{ setup }}"
|
||||
|
||||
- name: Modify LDAP config
|
||||
no_log: true
|
||||
become_user: gitea
|
||||
ansible.builtin.command: |
|
||||
forgejo admin auth update-ldap \
|
||||
--config "/etc/gitea/gitea.ini" \
|
||||
|
@ -47,6 +50,5 @@
|
|||
--avatar-attribute "jpegPhoto" \
|
||||
--synchronize-users
|
||||
when: '"Command error: login source already exists [name: lldap]" in setup.stderr' # führe nur aus wenn erster Task fehlgeschlagen ist
|
||||
become_user: gitea
|
||||
changed_when: false # keine idee wie ich changed feststellen kann
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue