21. 設定ファイルだけのデプロイ
recipes/archlinux/mysql.py
from alnair import Package
mysql = Package()
mysql.setup.config('/etc/my.cnf').contents("""
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
""")
22. 設定ファイルだけのデプロイ
% alnair config archlinux mysql
or
from alnair import Distribution
distname = 'archlinux'
with Distribution(distname) as dist:
dist.config('mysql')
24. セットアップ後のコマンド実行
% alnair setup archlinux mysql
or
from alnair import Distribution
distname = 'archlinux'
with Distribution(distname) as dist:
dist.setup('mysql')