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