Remove redundant key/value;Add debugging
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
44befeda4b
commit
2f976898eb
@ -164,51 +164,58 @@
|
|||||||
method: GET
|
method: GET
|
||||||
register: gitea_existing_config
|
register: gitea_existing_config
|
||||||
|
|
||||||
- name: Create organization(s)
|
- debug:
|
||||||
ansible.builtin.uri:
|
var: gitea_existing_config
|
||||||
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs
|
|
||||||
method: POST
|
|
||||||
headers:
|
|
||||||
Authorization: token {{ gitea_api_token.json.sha1 }}
|
|
||||||
body: "{{ item }}"
|
|
||||||
loop:
|
|
||||||
- full_name: Meta-cluster
|
|
||||||
description: Meta-cluster configuration items
|
|
||||||
username: mc
|
|
||||||
website: https://git.{{ vapp['metacluster.fqdn'] }}/mc
|
|
||||||
location: '[...]'
|
|
||||||
visibility: public
|
|
||||||
- full_name: Workload-cluster
|
|
||||||
description: Workload-cluster configuration items
|
|
||||||
username: wl
|
|
||||||
website: https://git.{{ vapp['metacluster.fqdn'] }}/wl
|
|
||||||
location: '[...]'
|
|
||||||
visibility: public
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.full_name }}"
|
|
||||||
|
|
||||||
- name: Create repositories
|
- block:
|
||||||
ansible.builtin.uri:
|
|
||||||
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs/{{ item.organization }}/repos
|
- name: Create organization(s)
|
||||||
method: POST
|
ansible.builtin.uri:
|
||||||
headers:
|
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs
|
||||||
Authorization: token {{ gitea_api_token.json.sha1 }}
|
method: POST
|
||||||
body: "{{ item.body }}"
|
headers:
|
||||||
loop:
|
Authorization: token {{ gitea_api_token.json.sha1 }}
|
||||||
- organization: mc
|
body: "{{ item }}"
|
||||||
body:
|
loop:
|
||||||
name: ArgoCD.Config
|
- full_name: Meta-cluster
|
||||||
auto_init: true
|
description: Meta-cluster configuration items
|
||||||
default_branch: main
|
username: mc
|
||||||
description: GitOps manifests
|
website: https://git.{{ vapp['metacluster.fqdn'] }}/mc
|
||||||
- organization: wl
|
location: '[...]'
|
||||||
body:
|
visibility: public
|
||||||
name: Template.ArgoCD.Config
|
- full_name: Workload-cluster
|
||||||
auto_init: true
|
description: Workload-cluster configuration items
|
||||||
default_branch: main
|
username: wl
|
||||||
description: GitOps manifests
|
website: https://git.{{ vapp['metacluster.fqdn'] }}/wl
|
||||||
loop_control:
|
location: '[...]'
|
||||||
label: "{{ item.organization + '/' + item.body.name }}"
|
visibility: public
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.full_name }}"
|
||||||
|
|
||||||
|
- name: Create repositories
|
||||||
|
ansible.builtin.uri:
|
||||||
|
url: https://git.{{ vapp['metacluster.fqdn'] }}/api/v1/orgs/{{ item.organization }}/repos
|
||||||
|
method: POST
|
||||||
|
headers:
|
||||||
|
Authorization: token {{ gitea_api_token.json.sha1 }}
|
||||||
|
body: "{{ item.body }}"
|
||||||
|
loop:
|
||||||
|
- organization: mc
|
||||||
|
body:
|
||||||
|
name: ArgoCD.Config
|
||||||
|
auto_init: true
|
||||||
|
default_branch: main
|
||||||
|
description: GitOps manifests
|
||||||
|
- organization: wl
|
||||||
|
body:
|
||||||
|
name: Template.ArgoCD.Config
|
||||||
|
auto_init: true
|
||||||
|
default_branch: main
|
||||||
|
description: GitOps manifests
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.organization + '/' + item.body.name }}"
|
||||||
|
|
||||||
|
# when: gitea_existing_config.json.data is undefined
|
||||||
|
|
||||||
module_defaults:
|
module_defaults:
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
@ -245,7 +252,6 @@
|
|||||||
method: POST
|
method: POST
|
||||||
force_basic_auth: yes
|
force_basic_auth: yes
|
||||||
body:
|
body:
|
||||||
token: token_init_{{ lookup('password', '/dev/null length=5 chars=ascii_letters,digits') }}
|
|
||||||
username: admin
|
username: admin
|
||||||
password: "{{ vapp['guestinfo.rootpw'] }}"
|
password: "{{ vapp['guestinfo.rootpw'] }}"
|
||||||
register: argocd_api_token
|
register: argocd_api_token
|
||||||
|
Loading…
Reference in New Issue
Block a user