takunoko / macOS_setup

0 stars 0 forks source link

Ansible構築メモ #2

Open takunoko opened 2 years ago

takunoko commented 2 years ago

Xcodeのインスコ

xcode-select --install

brewのインスコ

公式サイト: https://brew.sh/index_ja

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/takunoko/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Xcodeが入ってなかったら勝手に入るみたい 一旦、Ansibleのインスコに使いたいので環境変数なども登録しておく

ssh-keyの作成

ssh-keygen -t ed25519

(ed25519ではダメなサービスがあれば修正する)

gitのインスコ

brew install git

githubに公開鍵登録

cat $HOME/.ssh/id_ed25519.pub | pbcopy

https://github.com/settings/keys

ansibleのインスコ

brew install ansible

ansibleの適用

# macOS_setup以下にて
ansible-playbook setup.yml -i inventory