robertdebock.autofs
Ansibleロール autofs
システムにautofsをインストールして設定します。
GitHub | GitLab | ダウンロード | バージョン |
---|---|---|---|
サンプルプレイブック
この例は、molecule/default/converge.yml
から取得され、各プッシュ、プルリクエスト、リリースでテストされています。
---
- タイトル: converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.autofs
autofs_maps:
- mountpoint: /bind/mnt
options:
- "--timeout 60"
directories:
- path: mount
server: ":/mnt"
options:
- "fstype=bind"
- name: direct-mounts
mountpoint: /-
options:
- "--timeout 60"
- "--ghost"
directories:
- path: /bind/direct/mount
server: ":/mnt"
options:
- "fstype=bind"
- mountpoint: /do_not_exist
state: absent
nis_master_map: auto.master
マシンを準備する必要があります。CIでは、molecule/default/prepare.yml
を使用して行います:
---
- タイトル: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
これらのロールの使用方法については、完全な説明と例も参照してください。
ロール変数
変数のデフォルト値は、defaults/main.yml
に設定されています:
---
# autofsのデフォルトファイル
# パスの最初のスラッシュは削除され、残りのスラッシュはこの文字に置き換えられます。
# 例: mountpoint=/bind/mount & autofs_slash_replace_char="-"
# 出力ファイル名: /etc/auto.bind-mount(先頭のスラッシュが削除され、残りが "-" に置き換えられます)
autofs_slash_replace_char: "-"
# autofsを設定するだけで開始したくない場合は、これを "stopped" に設定します。
autofs_service_state: "started"
# 自動マウントのマウントポイントをここで設定できます。
# autofs_maps:
# - mountpoint: /home
# directories:
# - path: "*"
# server: "server.example.com/&"
# - mountpoint: /net
# options:
# - "--timeout=60"
# directories:
# - path: server
# options:
# - rw
# - soft
# - intr
# - rsize=8192
# - wsize=8192
# server: "server.example.com:/"
# - name: cifs-mounts # 任意でマップに名前を付けることができます(ファイル名で使用するため)。
# mountpoint: /cifs
# directories:
# - path: data
# options:
# - fstype=cifs
# server: "://server.example.com/sharename/"
# - mountpoint: /fuse
# directories:
# - path: ftpserver
# options:
# - fstype=curl
# - rw
# - allow_others
# - nodev
# - nonempty
# - noatime
# server: ':ftp\://username\:password\@ftp.example.com'
# - mountpoint: /do_not_exist
# state: absent
# nis_master_mapを設定します。
# nis_master_map: auto.master
要件
- requirements.txtにリストされたpipパッケージ。
使用されるロールの状態
システムを準備するために以下のロールが使用されます。別の方法でシステムを準備することもできます。
要件 | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
コンテキスト
このロールは、多くの互換性のあるロールの一部です。さらに詳しい情報については、これらのロールのドキュメントをご覧ください。
関連するロールの概要:
互換性
このロールは、以下のコンテナイメージでテストされています:
コンテナ | タグ |
---|---|
Debian | bullseye |
EL | 9 |
Fedora | 全て |
Ubuntu | 全て |
必要な最小Ansibleバージョンは2.12で、以下のテストが実施されています:
- 前のバージョン。
- 現在のバージョン。
- 開発バージョン。
問題が見つかった場合は、GitHubに登録してください。
ライセンス
著者情報
インストール
ansible-galaxy install robertdebock.autofs
ライセンス
apache-2.0
ダウンロード
89.1k
所有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.