File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 39
39
run : |
40
40
mkdir -p test_playbooks test_job_storage
41
41
touch test_inventory.ini
42
- - name : create test playbook
42
+ - name : Create test playbook
43
43
working-directory : ${{ github.workspace }}/src
44
44
run : |
45
45
cat << EOF > test_playbooks/test_playbook.yml
55
55
- name : Show structure and files
56
56
working-directory : ${{ github.workspace }}/src
57
57
run : |
58
+ pwd
59
+ echo "LS --------------------"
58
60
ls -R
61
+ echo "CONFIG --------------------"
59
62
cat config.yml
63
+ echo "PLAYBOOK --------------------"
60
64
cat test_playbooks/test_playbook.yml
61
65
- name : Run tests
62
66
run : |
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def validate_playbook_request(data, config):
85
85
if 'inventory' in data :
86
86
inventory_path = Path (data ['inventory' ])
87
87
if not inventory_path .is_absolute ():
88
- inventory_path = Path (config [ 'playbook_dir' ] ) / inventory_path
88
+ inventory_path = Path (__file__ ). parent . absolute ( ) / inventory_path
89
89
else :
90
90
inventory_path = Path (config ['inventory_file' ])
91
91
@@ -244,7 +244,7 @@ class AnsiblePlaybook(Resource):
244
244
def post (self ):
245
245
try :
246
246
data = api .payload
247
-
247
+ logger . debug ( f"Received /playbook request: { data } " )
248
248
validation_errors = validate_playbook_request (data , config )
249
249
if validation_errors :
250
250
logger .error (f"Validation errors: { validation_errors } " )
You can’t perform that action at this time.
0 commit comments