From 207a30d7d136f8372664b69ada4c8d27a7f03df7 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 27 Nov 2023 16:29:57 +0800 Subject: [PATCH] update semaphore --- semaphore/README.md | 34 ++++++++++++++++++++++++++++++++++ semaphore/docker-compose.yml | 1 + 2 files changed, 35 insertions(+) diff --git a/semaphore/README.md b/semaphore/README.md index 5dbecbc..b7f4b9f 100644 --- a/semaphore/README.md +++ b/semaphore/README.md @@ -4,4 +4,38 @@ semaphore Ansible [Semaphore][1] is beautiful web interface for running Ansible playbooks. You do not need to change your playbooks to start using it. +## up and running + +``` +$ mkdir -m 777 data +$ docker compose up -d +$ curl :3000/api/ping +``` + +## call api (FIXME) + +```bash +$ http :3000/api/auth/login auth=admin password=********** + +HTTP/1.1 204 No Content +Content-Type: application/json +Date: Mon, 27 Nov 2023 07:58:43 GMT +Set-Cookie: semaphore=******; Path=/ + +$ http POST :3000/api/user/tokens 'Cookie: semaphore=******' + +{ + "created": "0001-01-01T00:00:00Z", + "expired": false, + "id": "***", + "user_id": 1 +} + +$ http :3000/api/project/1 'Authorization: Bearer ***' +HTTP/1.1 401 Unauthorized +Content-Length: 0 +Content-Type: application/json +Date: Mon, 27 Nov 2023 08:27:14 GMT +``` + [1]: https://ansible-semaphore.com/ diff --git a/semaphore/docker-compose.yml b/semaphore/docker-compose.yml index 5f53b34..5112760 100644 --- a/semaphore/docker-compose.yml +++ b/semaphore/docker-compose.yml @@ -10,6 +10,7 @@ services: #- ./data:/var/lib/semaphore/ - ./data:/etc/semaphore environment: + ANSIBLE_HOST_KEY_CHECKING: "False" #SEMAPHORE_DB_DIALECT: bolt #SEMAPHORE_DB_PATH: /var/lib/semaphore SEMAPHORE_DB_DIALECT: postgres