vmware.ansible-role-assets

ansible-role-assets

!ビルドステータス

ファイル資産を自動でダウンロードし、必要に応じて httpでローカルでホストするためのAnsibleプレイブックです。

このロールは Chaperoneプロジェクトの一部として使用されます。

資産のURLは一度ダウンロードされ、ローカルファイルに保存されます。 SHA1チェックサムが変更されるか、ファイルが失われない限り、 資産は再度ダウンロードされません。

要件

  • ansible_ssh_userによって作成可能で書き込み可能なdownloads_dir
  • 有効な資産の辞書
  • 資産をhttpでホストする必要がある場合は、ansibleロールjdauphant.nginxが利用可能であることを確認し、assets_http_hostedをTrueに設定します。

ロール変数

# Trueの場合はダウンロード、Falseの場合はすべての資産のダウンロードをスキップします(デフォルト)
download_files: False

# ダウンロードした資産を配置するディレクトリ。
downloads_dir: /var/www/html/downloads

# URLリクエストのタイムアウト(秒)
downloads_timeout: 10

# Falseの場合、SSL証明書は検証されません。
# これは自己署名証明書を使用する個人的に管理されたサイトでのみ使用されるべきです。
assets_validate_certs: True

# ダウンロードする資産の辞書
# assetsのキーは、URLからダウンロードしたファイルの名前です。
# チェックサムは資産のSHA1サムです。
# URLは資産の有効で到達可能なURLです。
# 例:
# assets:
#   google-image.png:
#     description: google image
#     checksum: 26f471f6ebe3b11557506f6ae96156e0a3852e5b
#     url: https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
#   index.html:
#     description: "記述用のみ、必須ではない"
#     checksum: "3af37af6ebe3b11557506f6ae96156e0a381211e"
#     url: "http://some.url/to/a/file"
assets: {}

# Boolean、将来のダウンロードのために資産をホストするウェブサーバーを立ち上げるべきですか?
assets_http_hosted: False

# httpサーバーをホストするポート
assets_http_port: 8484

例プレイブック


---
- hosts: apache_servers
  sudo: True
  roles:
    - assets
  vars:
    download_files: True
    assets:
      Notice.txt:
        description: notice.txt
        checksum: e6b8bfe20303703e30acf9e67d012060
        url: "https://github.com/vmware/photon-controller/releases/download/v1.1.1/Notice.txt"
        validate_certs: False
      logo.png:
        description: google logo
        checksum: 80fa4bcab0351fdccb69c66fb55dcd00
        url: "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
        validate_certs: False

ライセンスと著作権

Copyright © 2015-2017 VMware, Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-only

このコードはApache License 2.0またはGPLv3のデュアルライセンスです。

ライセンスのコピーを取得するには、以下のリンクを参照してください。

http://www.apache.org/licenses/LICENSE-2.0

または

https://www.gnu.org/licenses/gpl-3.0.en.html
プロジェクトについて

Download and verify files once for use with minimal bandwidth

インストール
ansible-galaxy install vmware.ansible-role-assets
ライセンス
other
ダウンロード
80
所有者