vbotka.freebsd_postinstall
freebsd_postinstall
Ansibleロールvbotka.freebsd_postinstallがgalaxy.ansible.comにあります。
FreeBSDのポストインストール設定:エイリアス、apcupsd、認証キー、cron、devfs、dhclient、freebsd-update、fstab、グループ、hostapd、ホスト名、hosts、inetd、libmap、Linux互換性、login.conf、loader.conf、make.conf、motd、nfsd、ntpd、ntpdate、procmail、qemu、resolvconf.conf、smartd、snmpd、sudoers、ssh、sshd、スワップ、sysctl、syslog、タイムゾーン、tmpmfs、ユーザー、パッケージとポート、periodic.conf、オーバーレイ、wpa_supplicantなど...
ドキュメントAnsibleロールFreeBSDポストインストールをreadthedocs.ioで確認できます。
このロールとドキュメントは進行中です。タスクのドキュメントが欠けている場合は、ソースコードを確認して使い方を学んでください。機能が欠けている場合は、config_lightロールを検討してください。さまざまな例も確認できます。config_lightが目的を達成できない場合は、新しいタスクを作成してください。
フィードバックを共有したり、問題を報告することをお気軽にどうぞ。
対応プラットフォーム
このロールは、FreeBSDのサポートリリースで開発およびテストされています。
要件と依存関係
ロール
- Ansibleロールvbotka.ansible_lib
コレクション
- ansible.posix
- ansible.utils
- community.general >= 9.3.0
パッケージ
デフォルトのmain/pkgdict_*.ymlのpkg_dict_*辞書を参照してください。
変数
デフォルトおよびvarsにある例を確認してください。
freebsd_install_method
デフォルトではfreebsd_install_methodはパッケージをインストールするように設定されています。インストールは早くなります。しかし、後でポートからアップグレードした後(portmaster -a)、メソッドをportsに切り替えてください。
freebsd_install_method: packages
#freebsd_install_method: ports
#freebsd_use_packages: true
オプションとして、パッケージはfreebsd_poudriereでビルドされ、freebsd_packagesでインストールされることができます。
freebsd_use_packages
オプションが設定されている場合、ロールfreebsd_portsはパッケージをインストールします。
#freebsd_install_method: packages
freebsd_install_method: ports
freebsd_use_packages: true
ワークフロー
- 必要に応じて、リモートユーザーのシェルを/bin/shに変更します。
ansible host -e ansible_shell_type=csh -e ansible_shell_executable=/bin/csh -a 'sudo pw usermod user -s /bin/sh'
- ロールをインストールします。
ansible-galaxy role install vbotka.freebsd_postinstall
ansible-galaxy role install vbotka.ansible_lib
必要に応じてコレクションもインストールします。
ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
自分のニーズに合わせて変数を調整します。
プレイブックを作成します。
cat freebsd-postinstall.yml
- hosts: host
roles:
- vbotka.freebsd_postinstall
ベストプラクティスを確認してください。
- システムを構成します。
ansible-playbook freebsd-postinstall.yml
Ansible lint
ansible-lintを実行する際には構成ファイル*.ansible-lint.local*を使用してください。一部のルールが無効になっている場合や、警告が無視されることがあります。構成ファイルのメモを確認してください。
shell> ansible-lint -c .ansible-lint.local
ロールの構成
プレイブック*.configure.yml*にはロールを構成するためのタスクのブロックが含まれています。詳細を理解するために読んでください。
注意事項
- devfs
"/etc/rc.d/devfs rcvar"は変数を返しません。その結果、モジュール"system"が失敗します。
fatal: [srv.example.com]: FAILED! => changed=false
msg: unable to determine rcvar
この問題を解決するために、以下のパッチを適用してください。
--- devfs.orig 2019-07-13 20:31:04.688022000 +0200
+++ devfs 2019-07-13 20:34:49.347159000 +0200
@@ -11,6 +11,7 @@
. /etc/rc.subr
name="devfs"
+rcvar="devfs_load_rulesets"
desc="Device filesystem"
start_cmd='devfs_start'
stop_cmd=':'
ライセンス
著者情報
参考文献
- FreeBSD handbook: Post-Installation
- aliases - FreeBSD handbook: Sendmail Configuration Files
- apcupsd - FreeBSD diary: Configuring a UPS daemon
- cron - FreeBSD handbook: Configuring cron
- devfs - man 5
- devfs - man 8
- devfs.conf - man
- devfs.rules - man
- devfs rules - FreeBSD Wiki
- devfs rules not applied by default for jails - FreeBSD-SA-14:07.devfs
- dhclient - FreeBSD handbook: Configuring a DHCP Client
- freebsd-update - FreeBSD handbook: FreeBSD Update
- fstab - FreeBSD handbook: Mounting and Unmounting File Systems
- git - FreeBSD forum: How to setup a Git repository
- git - Getting Git on a Server
- hostapd - Atheros wireless driver support
- inetd - FreeBSD handbook: The inetd Super-Server
- login.conf - FreeBSD handbook: Resource Limits
- linux - FreeBSD handbook: Linux Binary Compatibility
- linprocfs - FreeBSD man
- loader.conf - FreeBSD handbook: FreeBSD Boot Process
- make.conf - FreeBSD forum: Prioritizing SSL/TLS in make.conf
- make.conf - FreeBSD wiki: Design for Flavors and Sub Packages
- make.conf - GNU emacs flavours in FreeBSD
- mount - FreeBSD handbook: Mounting and Unmounting File Systems
- nfs - FreeBSD handbook: Network File System (NFS)
- nfsd - FreeBSD forum: NFSv4 without Kerberos
- ntp - FreeBSD handbook: Clock Synchronization with NTP
- ntp - FreeBSD forum: Testing NTP
- ntp - NTP Support Wiki
- ntp - How to use pool.ntp.org
- periodic.conf - FreeBSD forum: periodic and cron doubt
- ports - FreeBSD handbook: Upgrading Ports Using Portmaster
- procmail - Documentation Project
- qemu - FreeBSD Wiki: Qemu on FreeBSD as host
- qemu - QEMU Wiki: Hosts/BSD
- resolv.conf - FreeBSD handbook: Configuration Files
- smartd - FreeBSD forum: camcontrol hdd smart status
- snmp - Install and configure snmp in Freebsd
- snmp - Simple Network Management Protocol (SNMP)
- ssh - FreeBSD handbook: OpenSSH
- ssl - OpenSSL Wiki
- sudo - FreeBSD handbook: Shared Administration with Sudo
- swap - FreeBSD handbook: Adding Swap Space
- sysctl - FreeBSD handbook: Tuning with sysctl
- syslog - FreeBSD handbook: Configuring System Logging
- timezone - How to set up FreeBSD for my region?
- tmpmfs - FreeBSD forum: Questions about ramdisk in FreeBSD
- tmpfs - FreeBSD forum: /dev/shm | md questions
- users - FreeBSD handbook: Adding Users and Groups
- vars - FreeBSD Wiki: Ports/DEFAULT_VERSIONS
- wpa_supplicant - Project site
- wpa_supplicant - FreeBSD handbook: Wireless Networking
クラウドプロバイダー
Postinstallation configuration of FreeBSD.
ansible-galaxy install vbotka.freebsd_postinstall