semaphore
semaphore copied to clipboard
Semaphore does not pull git repositories with its name
Hello,
semaphore does not pull the git repository with its name, that is why the task in UI complaints about not founding the role.
I am using v2.8.53

# pwd
/opt/semaphore
# tree
.
|-- inventory
|-- roles
| `-- repository_1_1
| |-- defaults
| | `-- main.yml
| |-- handlers
| | `-- main.yml
| |-- meta
| | `-- main.yml
| |-- README.md
| |-- tasks
| | `-- main.yml
| |-- tests
| | |-- inventory
| | `-- test.yml
| `-- vars
| `-- main.yml
`-- test.yml
8 directories, 10 files
# semaphore version
v2.8.53
# cat config.json
.....
"dialect": "mysql",
"port": "",
"interface": "",
"tmp_path": "/opt/semaphore/roles",
.....
cat test.yml
---
- hosts: all
remote_user: root
become: true
roles:
- ansible_test
To me it looks like you are trying to reference a role (ansible_test) which your playbook does not have access to. The roles directory needs to be on the same level as the playbook you are running in the directory structure, and it needs to contain individual roles directories inside, see here,
@AndrewSav @fiftin That is why I opened this Issue here. This is a bug, Semaphore does not build the individual role directory. He should clone the GitHub repository or Ansible role in a directory, which has the same repository name, exactly like what git clone command makes. See please the output of my tree command.
@afeefghannam89 I do not think it is supposed to work this way. You should follow the documented directory structure that I linked. If your "bug" is that the directory named "repository_1_1" - this is by design and worked as expected. You should have the correct structure inside your repo in the first place.