HomebrewとかAnsibleのwarningを一掃した
タイトルの通り,HomebrewとかAnsible周りのwarningを一掃したのでメモ.
Homebrew Cask
最近,brew cask list
するとwarningが出てる気がしていました.
1 2 3 4 5 6 7 8 9 10 |
$ brew cask list Warning: The default Caskroom location has moved to /usr/local/Caskroom. Please migrate your Casks to the new location and delete /opt/homebrew-cask/Caskroom, or if you would like to keep your Caskroom at /opt/homebrew-cask/Caskroom, add the following to your HOMEBREW_CASK_OPTS: --caskroom=/opt/homebrew-cask/Caskroom For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913. |
気のせいではなかったのでよくよく読んでみると,Homebrew Cask経由のアプリのデフォルトインストール先が変更になったっぽいです.
基本,このサイトの通りに/opt/homebrew-cask/Caskroomを/usr/local/以下にmv
すれば良さそうですけど,僕の場合いつの間にか/usr/local/以下にCaskroomができちゃってました.どうやら気付かないうちに旧Caskroomと新Caskroomの両方がごちゃまぜになって使われていたっぽいので,一旦旧Caskroomはごっそり削除しました.
その時点で先のwarningは出なくなったのですが,旧Caskroomにはあって新Caskroomにないアプリを再インストールするため,思考停止的に全てを強制再インストールしました.
1 |
$ brew cask install --force $(brew cask list) |
途中,Steamのみがインストールに失敗しましたが,そもそもCask経由のSteamは使ってなかったので無視.念のためbrew cask doctor
しても問題なさそうなのでOK.
Homebrew
順序がHomebrew Caskと逆な気がしますが,時系列に書いてるのでそのまま.
とりあえずbrew doctor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: python is symlinked to python3 This will confuse build scripts and in general lead to subtle breakage. Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /Users/kage/.pyenv/shims/python-config /Users/kage/.pyenv/shims/python3-config /Users/kage/.pyenv/shims/python3.5-config /Users/kage/.pyenv/shims/python3.5m-config Warning: Broken symlinks were found. Remove them with `brew prune`: /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W6 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W3 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W6 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStd-W8 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStdN-W8 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruPro-W4 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruProN-W4 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W3 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W6 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W3 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W6 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W3 /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W6 /usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Demibold /usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Medium |
1つ目のwarningは悩んだ末に無視.2つ目のwarningはこのIssueを見るに,無視してもよさそうなので無視.
最後のwarningは多分MacTeXの埋め込みフォント関係のsymlinksだけれど,壊れてるんなら仕方ないのでsudo brew prune
.結局3つ目のwarningしか解消せず.
Ansible
Ansibleについてはコチラの記事の環境に依存してます.
ansible-playbook
するとDEPRECATION WARNINGなるものがいくつか出るようになってました.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
$ ansible-playbook -i hosts localhost.yml [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. PLAY [localhost] *************************************************************** TASK [add tap repositories of homebrew] **************************************** [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{homebrew_taps}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [localhost] => (item=homebrew/binary) ok: [localhost] => (item=homebrew/dupes) ok: [localhost] => (item=homebrew/science) ok: [localhost] => (item=caskroom/cask) TASK [update homebrew] ********************************************************* ok: [localhost] TASK [install brew packages] *************************************************** [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{homebrew_packages}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [localhost] => (item={u'name': u'openssl'}) .............................................. ok: [localhost] => (item={u'name': u'carthage'}) TASK [create directory for brew package information] *************************** ok: [localhost] TASK [save brew package information] ******************************************* [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{brew_result.results | selectattr('changed') | map(attribute='item') | map(attribute='name') | list}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. changed: [localhost] => (item=openssl) TASK [install homebrew-cask] *************************************************** ok: [localhost] TASK [install cask packages] *************************************************** [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{homebrew_cask_packages}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [localhost] => (item={u'name': u'iterm2'}) ..................................................... ok: [localhost] => (item={u'name': u'intel-power-gadget'}) TASK [create directory for cask package information] *************************** ok: [localhost] TASK [save cask package information] ******************************************* [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{cask_result.results | selectattr('changed') | map(attribute='item') | map(attribute='name') | list}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. PLAY RECAP ********************************************************************* localhost : ok=8 changed=2 unreachable=0 failed=0 |
1つ目のwarningは,「sudoの代わりにbecome使ってね」ということなので,言われた通りにlocalhost.ymlを変更.
2つ目以降のwarningは,「変数は‘{{variable_name}}’という形式で使ってね」ということなので,これも言われた通りにlocalhost.ymlを変更.これでスッキリしました.
感想(?)
大学の前期と夏休み期間中ずっと目をつぶってたwarningsを(一部を除いて)掃除できたので,気持ちよく後期を迎えられそうです.
今日以降は気付く度になるべくFixしていこうと思います.おわり.
最近のコメント