salt rendering

Đang mở
#129 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Lĩnh vực
devops

Hướng nghiên cứu

Start with the Jinja state shown in the issue and compare its http.query data construction with the working salt-call command. Reproduce the rendering error and determine the discrepancy; done means the state renders successfully and produces the expected ticket response.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I am experiencing an issue when trying to assign a value(icinga_ticket) on my post http query request.
Have the fqdn value set from grain

Below is how it is defined in my state

{% set fqdn = salt'grains.get' %}
{% set icinga_ticket = salt['http.query']('https://ticket-generator.az.dev.opd.com', method='POST', header_dict='{"Content-Type":"application/json"}', data='{"hostname": {{ fqdn }} }', backend='requests') %}

Error:
Rendering SLS 'base:icinga.icinga2_core' failed: Jinja error: 'str' object does not support item assignment
Traceback (most recent call last):

But when i execute the below command through cli it works fine.

salt-call http.query https://ticket-generator.az.dev.opd.com method=POST header_dict='{"Content-Type":"application/json"}' data="'{"hostname": "minion.node.dev.opd.com"}'" backend=requests
local:
----------
body:
{"icinga_ticket":"7609f6bc84d97748e15df9436aab07fbf48756d3"}

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
36
Fork
13
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của saltstack/community

Tất cả issue của saltstack/community

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.