Help us understand the problem. What is going on with this article?

Fabric を使って FreeBSD に pkg をインストールする方法

More than 1 year has passed since last update.

構成管理ツールのFabricを使ってFreeBSDにpkgをインストールしてみます
fabricのcuisineを使って冪等性を持たせます(下記の記事を参考にしました)
https://qiita.com/techys/items/71983349a84683959e86

fabricを実行するホストのOSはFreeBSD以外でも大丈夫ですが
今回はFreeBSDから実行してみます

pkgを使ってfabricとcuisineをインストールします

$ sudo pkg install py27-fabric py27-cuisine

fabfile.pyを下記の内容にします

# coding: utf-8
from fabric import api as fab
import cuisine

# この3行を設定しておけばfabricはFreeBSDで動作しそう
fab.env.shell = '/bin/sh -c'
cuisine.select_package("pkgng")
cuisine.select_os_flavour("bsd")

def install():
        cuisine.package_ensure('zip ja-nkf')

fabricを実行

fab -H "リモートホスト名" install

これでリモートホストにzip ja-nkfがインストールされます

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away