ホストの作成
post
/api/v2/hosts/
このエンドポイントではhost_filterを使用可能です。このフィルタは、リレーショナル問合せ、and orブール・ロジックおよび()による式のグループ化をサポートします。
?host_filter=name=my_host
?host_filter=name="my host" or name=my_host
?host_filter=groups__name="my group"
?host_filter=name=my_host and groups__name="my group"
?host_filter=name=my_host and groups__name="my group"
?host_filter=(name=my_host and groups__name="my group") or (name=my_host2 and groups__name=my_group2)
host_filterは、関連するansible_factsのJSONデータの問合せにも使用できます。__は、JSONディクショナリの走査に使用できます。[]は、JSON配列の走査に使用できます。
?host_filter=ansible_facts__ansible_processor_vcpus=8
?host_filter=ansible_facts__ansible_processor_vcpus=8 and name="my_host" and ansible_facts__ansible_lo__ipv6[]__scope=host
リクエスト
サポートされているメディア・タイプ
- application/json
ルート・スキーマ : Host
型:
ソースを表示
object- ansible_facts_modified: 文字列(日付-時間)
タイトル:
Ansible facts modified読取り専用:trueansible_factsが最後に変更された日時。 - created: 文字列
タイトル:
Created読取り専用:true - description: 文字列
タイトル:
Description - enabled: ブール
タイトル:
Enabledデフォルト値:trueこのホストはオンラインであり、ジョブの実行に使用できますか。 - has_active_failures: 文字列
タイトル:
Has active failures読取り専用:true - has_inventory_sources: 文字列
タイトル:
Has inventory sources読取り専用:true - id: 整数
タイトル:
ID読取り専用:true - instance_id: 文字列
タイトル:
Instance id最大長:1024ホストを一意に識別するためにリモート・インベントリ・ソースによって使用される値 - inventory(必須): 整数
タイトル:
Inventory - last_job: 文字列
タイトル:
Last job読取り専用:true - last_job_host_summary: 整数
タイトル:
Last job host summary読取り専用:true - modified: 文字列
タイトル:
Modified読取り専用:true - name(必須): 文字列
タイトル:
Name最小長:1最大長:512 - related: 文字列
- summary_fields: 文字列
タイトル:
Summary fields読取り専用:true - type: 文字列
タイトル:
Type読取り専用:true - url: 文字列
タイトル:
Url読取り専用:true - variables: 文字列
タイトル:
VariablesJSONまたはYAML形式のホスト変数。
レスポンス
サポートされているメディア・タイプ
- application/json
201レスポンス
ルート・スキーマ : Host
型:
ソースを表示
object- ansible_facts_modified: 文字列(日付-時間)
タイトル:
Ansible facts modified読取り専用:trueansible_factsが最後に変更された日時。 - created: 文字列
タイトル:
Created読取り専用:true - description: 文字列
タイトル:
Description - enabled: ブール
タイトル:
Enabledデフォルト値:trueこのホストはオンラインであり、ジョブの実行に使用できますか。 - has_active_failures: 文字列
タイトル:
Has active failures読取り専用:true - has_inventory_sources: 文字列
タイトル:
Has inventory sources読取り専用:true - id: 整数
タイトル:
ID読取り専用:true - instance_id: 文字列
タイトル:
Instance id最大長:1024ホストを一意に識別するためにリモート・インベントリ・ソースによって使用される値 - inventory(必須): 整数
タイトル:
Inventory - last_job: 文字列
タイトル:
Last job読取り専用:true - last_job_host_summary: 整数
タイトル:
Last job host summary読取り専用:true - modified: 文字列
タイトル:
Modified読取り専用:true - name(必須): 文字列
タイトル:
Name最小長:1最大長:512 - related: 文字列
- summary_fields: 文字列
タイトル:
Summary fields読取り専用:true - type: 文字列
タイトル:
Type読取り専用:true - url: 文字列
タイトル:
Url読取り専用:true - variables: 文字列
タイトル:
VariablesJSONまたはYAML形式のホスト変数。