Itamae
で以下のようにapt
の外部リポジトリを追加した後にapt-get update
をhookさせて走らせたいんですが、何か良い方法はありますか?
remote_file '/etc/apt/sources.list.d/mesosphere.list' do
source 'files/mesosphere.list'
end
Itamae
で外部リポジトリを追加する一般的な書き方を
探してはみたのですが見つかりませんでした。
スタック・オーバーフローはプログラマーとプログラミングに熱心な人のためのQ&Aサイトです。すぐ登録できます。
登録してこのコミュニティに参加するsubscribe
を利用して以下のようにしてます。
itamae実践Tips こちらの記事の解説がとてもわかりやすいです。
remote_file '/etc/apt/sources.list.d/mesosphere.list' do
owner 'root'
group 'root'
end
execute 'apt-get update' do
subscribes :run, "remote_file[/etc/apt/sources.list.d/mesosphere.list]", :immediately
action :nothing
end