Struggling with initial setup
Closed this issue · 6 comments
I tried to use this repository, but am struggling with multiple little issues.
For me (future users) following aspect might be helpful:
- an example (I tried to follow https://github.com/SovereignCloudStack/github-permissions)
- more clarity in the readme (what is currently working, prerequisites, install/setup)
- more debug output, when running ansible-playbook run.yaml -vvv.
Thanks in advance.
you can also look at https://github.com/opentelekomcloud-infra/gitstyring/ for more examples
- agree that an example better than in the readme would be useful
- the only requirement at the moment is really the python requests library. We are considering usage of some SDK for github, but were so far not able to find anything really promising
- debug in Ansible modules is not something you can easily achieve, since modules are being executed on the "remote" location (whether it is localhost does not really play a big role). Therefore Ansible itself does not give easy technical capabilities to make such output. For this reason module gathers output for each entry it is processing.
Overall I will try to improve docs
Hey,
thanks for the feedback.
Follow up questions:
- We are targeting a github enterprise, could that be an issue.
Also this is the verbose Debug output, so it seems its not finding the org.
ok: [localhost] => {
"changed": false,
"errors": [],
"invocation": {
"module_args": {
"github_url": "https://api.github.******.net",
"root": "/Users/********/Documents/Coding/ansible/manage_IaC_org/orgs",
"token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
}
},
"repositories": {}
}
Our Structure:
└── Testing-IaC
├── people
│ ├── dismissed_members.yml
│ └── members.yml
├── repositories
│ ├── Docs.yml
│ └── website.yml
└── teams
├── dismissed_members.yml
└── members.yml```
- using GHE is not a problem, SCS folks are using it
- I assume you point root as
.../orgs/
, while it should point to the dir where configuration is underorgs
. So please try putting yourroot
one level higher (./Users/********/Documents/Coding/ansible/manage_IaC_org
)
Hey,
thanks again. Pointing or one level higher works.
Currently it only works if the repo already exists and is initialised.
If I try to create a new Repo I get following error:
Repo elab@Testing-IaC cannot be fetched:
Is this already supported or do all repos need to exist.
right, creating repos is not really implemented as of now (can be done relatively easy), but setting of the params on the repo is working
kk, then thanks for your help.
Short Feedback:
- For some reason I was unable to parse the variables via -e so I insert them via vars.
- gitub_url works
- Changing the readme so its clear where to point the gitstyring_root_dir, as in both examples. /org is the path.
hosts: localhost
vars:
github_token: "XYZ"
gitstyring_root_dir: "/Users/XYZ/Documents/Coding/ansible/manage_IaC_org"
github_url: "https://api.github.XYZ.net"
tasks:
- name: manage teams
opentelekomcloud.gitcontrol.teams:
root: "{{ gitstyring_root_dir }}"
token: "{{ github_token }}"
github_url: "{{github_url}}"
- name: manage repositories
opentelekomcloud.gitcontrol.repositories:
root: "{{ gitstyring_root_dir }}"
token: "{{ github_token }}"
github_url: "{{github_url}}"
Thx for the fast feedback and help!