watame / setup_for_mac

Mac設定用Ansibleレポジトリ
5 stars 0 forks source link

AnsibleのGUIコマンドインストール定義を追加 #4

Closed watame closed 2 years ago

watame commented 2 years ago

やったこと

Close #3

watame commented 2 years ago

実行結果のログ

$ ansible-playbook setup.yml -i inventory 

PLAY [setup for mac] ***********************************************************

TASK [homebrew : homebrew update/upgrade] **************************************
[WARNING]: Platform darwin on host 127.0.0.1 is using the discovered Python
interpreter at /usr/bin/python3, but future installation of another Python
interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.12/reference_appendices/interpreter_discovery.html for more information.
ok: [127.0.0.1]

TASK [homebrew : homebrew tap] *************************************************
changed: [127.0.0.1] => (item=homebrew/cask)
changed: [127.0.0.1] => (item=homebrew/cask-versions)
changed: [127.0.0.1] => (item=homebrew/cask-fonts)

TASK [homebrew : homebrew install] *********************************************
changed: [127.0.0.1] => (item={'name': 'git', 'state': 'present'})
changed: [127.0.0.1] => (item={'name': 'peco', 'state': 'present'})
changed: [127.0.0.1] => (item={'name': 'tree', 'state': 'present'})

TASK [homebrew_cask : homebrew cask install] ***********************************
failed: [127.0.0.1] (item={'name': 'iterm2', 'state': 'present'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "iterm2", "state": "present"}, "msg": "Error: It seems there is already an App at '/Applications/iTerm.app'."}
failed: [127.0.0.1] (item={'name': 'visual-studio-code', 'state': 'present'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "visual-studio-code", "state": "present"}, "msg": "Error: It seems there is already an App at '/Applications/Visual Studio Code.app'."}
failed: [127.0.0.1] (item={'name': 'slack', 'state': 'present'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "slack", "state": "present"}, "msg": "Error: It seems there is already an App at '/Applications/Slack.app'."}
changed: [127.0.0.1] => (item={'name': 'fig', 'state': 'present'})
failed: [127.0.0.1] (item={'name': 'docker', 'state': 'present'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "docker", "state": "present"}, "msg": "Error: It seems there is already an App at '/Applications/Docker.app'."}

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=3    changed=2    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

インストールに失敗した下記ツールはすでにインストールしているため、失敗して問題なしとする。

watame commented 2 years ago

また、brewでインストールパッケージの確認をすると下記のようになっている

watame@watamenoMacBook-Pro setup_for_mac % brew list      
==> Formulae
ansible         gdbm            git             mpdecimal       pcre2           python@3.10     six             tree
ca-certificates gettext         libyaml         openssl@1.1     peco            readline        sqlite          xz

==> Casks
fig

定義したものはインストールできていると判断