18.8. Ignition の設定オプション


Ignition の設定セクションを使用することで、システムのさまざまな側面を設定できます。正しい設定構文と構造を確保するために、以下のガイドラインに従ってください。

設定の形式
Ignition は設定に JSON 形式を使用します。標準的なワークフローでは、人間が読みやすい形式で記述するために Butane (YAML) を使用し、その後 Ignition JSON に変換します。

Butane から Ignition への変換

$ butane --strict config.bu > config.ign

Expand
表18.5 Ignition の設定セクション
セクション目的

ignition

設定のバージョンと、必要に応じてリモート設定ソースを指定します。

storage

ファイル、ディレクトリー、リンク、ディスク、ファイルシステム、および RAID アレイを定義します。

passwd

ユーザーおよびグループを設定します。

systemd

systemd ユニットを管理します (有効化、無効化、マスク、またはユニットの内容の提供)。

kernel_arguments

以降のブート時にカーネルのコマンドラインパラメーターを変更します。

ストレージの設定
storage セクションは、以下のリソースをサポートしています。
Expand
表18.6 storage セクションのリソース
リソース説明ユースケースの例

files

指定された内容、モード、および所有権でファイルを作成または上書きします。

設定ファイル、スクリプト

directories

指定されたモードと所有権でディレクトリーを作成します。

ログディレクトリー、アプリケーションデータ

links

シンボリックリンクまたはハードリンクを作成します。

代替パス、互換性

disks

GPT を使用してディスクのパーティションを設定します。

データパーティション

filesystems

ファイルシステムの作成とフォーマット。

追加のストレージボリューム

raid

ソフトウェア RAID アレイを設定します。

冗長ストレージ

ファイルの設定例
  storage:
    files:
      - path: /etc/resolv.conf
        mode: 0644
        contents:
          inline: |
            ...
      - path: /etc/chrony.conf      # <-- same level as first entry
        mode: 0644
ユーザー設定
passwd:
  users:
    - name: admin
      uid: 1001
      groups:
        - wheel
        - sudo
      ssh_authorized_keys:
        - ssh-rsa AAAAB3... admin@example.com
      password_hash: $6$rounds=4096$salt$hash...
    - name: appuser
      uid: 1002
      system: true
      no_create_home: true
Systemd ユニットの設定
systemd:
  units:
    - name: myapp.service
      enabled: true
      contents: |
        [Unit]
        Description=My Application
        After=network-online.target

        [Service]
        Type=simple
        ExecStart=/usr/bin/myapp
        Restart=always

        [Install]
        WantedBy=multi-user.target
    - name: debug-shell.service
      mask: true
カーネル引数
kernel_arguments:
  should_exist:
    - systemd.unified_cgroup_hierarchy=1
    - mitigations=auto
  should_not_exist:
    - quiet
複数のデータセンターの設定例
複数のデータセンターにまたがるシステムを管理する場合は、環境固有の設定を作成します。
variant: r4e
version: 1.5.0
storage:
  files:
    - path: /etc/resolv.conf
      mode: 0644
      contents:
        inline: |
          nameserver 10.1.0.1
          nameserver 10.1.0.2
          search dc1.example.com example.com
      - path: /etc/chrony.conf
        mode: 0644
        contents:
          inline: |
            server ntp.dc1.example.com iburst prefer
            server ntp.example.com iburst
            driftfile /var/lib/chrony/drift
      - path: /etc/datacenter
        mode: 0644
        contents:
          inline: dc1
設定検証
デプロイを実行する前に、Ignition の設定を検証できます。
$ ignition-validate config.ign

または、変換時に Butane の strict モードを使用することもできます。

$ butane --strict config.bu > config.ign
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る