Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AnsibleでVSCode拡張を管理しちゃおう!/why dont you manage v...

AnsibleでVSCode拡張を管理しちゃおう!/why dont you manage vscode extension with Ansible?

あんでぃー

April 07, 2020
Tweet

More Decks by あんでぃー

Other Decks in Technology

Transcript

  1. Ϗϟοʂʂʂʂʂ - name: ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ command: code --list-extensions register: result_extension_list changed_when:

    false check_mode: false - name: ֦ுػೳͷΠϯετʔϧ command: "code --install-extension {{ item }}" loop: "{{ vscode_extensions | map('lower') | list }}" when: not item in (result_extension_list.stdout_lines | map('lower') | list) → VSCode֦ுΛΠϯετʔϧ͢ΔAnsibleͷίʔυ vscode_extensions: - MS-CEINTL.vscode-language-pack-ja - redhat.vscode-yaml - vscoss.vscode-ansible +͜Μͳײ͡Ͱ֦ுػೳΛϦετ
  2. - name: ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ command: code --list-extensions register: result_extension_list changed_when: false

    check_mode: false - name: ֦ுػೳͷΠϯετʔϧ command: "code --install-extension {{ item }}" loop: "{{ vscode_extensions | map('lower') | list }}" when: not item in (result_extension_list.stdout_lines | map('lower') | list) codeίϚϯυͰ֦ுػೳͷ ϦετΛऔಘͯ͠ม਺ʹ֨ೲ vscode_extensions: - MS-CEINTL.vscode-language-pack-ja - redhat.vscode-yaml - vscoss.vscode-ansible
  3. - name: ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ command: code --list-extensions register: result_extension_list changed_when: false

    check_mode: false - name: ֦ுػೳͷΠϯετʔϧ command: "code --install-extension {{ item }}" loop: "{{ vscode_extensions | map('lower') | list }}" when: not item in (result_extension_list.stdout_lines | map('lower') | list) ม਺͔Βϧʔϓ࣮ߦ ɹ→ ϧʔϓதɺ֤ཁૉ͸itemͱ͍͏໊લʹͳΔ ※ ֦ுػೳ໊͸େจࣈখจࣈΛ۠ผ͠ͳ͍ͨΊɺlower ϑΟϧλͰจࣈྻൺֱ͠΍ͯ͘͢͠Δ(͜͜޻෉) vscode_extensions: - MS-CEINTL.vscode-language-pack-ja - redhat.vscode-yaml - vscoss.vscode-ansible ͜͜Λίϐϖ
  4. - name: ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ command: code --list-extensions register: result_extension_list changed_when: false

    check_mode: false - name: ֦ுػೳͷΠϯετʔϧ command: "code --install-extension {{ item }}" loop: "{{ vscode_extensions | map('lower') | list }}" when: not item in (result_extension_list.stdout_lines | map('lower') | list) ৚݅෼ذ: ֦ுػೳ͕Πϯετʔϧ͞Ε ͍ͯͳ͔ͬͨΒॲཧ࣮ߦ vscode_extensions: - MS-CEINTL.vscode-language-pack-ja - redhat.vscode-yaml - vscoss.vscode-ansible
  5. - name: ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ command: code --list-extensions register: result_extension_list changed_when: false

    check_mode: false - name: ֦ுػೳͷΠϯετʔϧ command: "code --install-extension {{ item }}" loop: "{{ vscode_extensions | map('lower') | list }}" when: not item in (result_extension_list.stdout_lines | map('lower') | list) codeίϚϯυͰ֦ுػೳΛ Πϯετʔϧ vscode_extensions: - MS-CEINTL.vscode-language-pack-ja - redhat.vscode-yaml - vscoss.vscode-ansible
  6. ࣮ߦΠϝʔδ TASK [vscode : ΠϯετʔϧࡁΈͷ֦ுػೳΛऔಘ] ******************************* ok: [localhost] TASK [vscode

    : ֦ுػೳͷΠϯετʔϧ] *************************************** changed: [localhost] => (item=ms-ceintl.vscode-language-pack-ja) changed: [localhost] => (item=vscode-icons-team.vscode-icons) changed: [localhost] => (item=ms-python.python) changed: [localhost] => (item=redhat.vscode-yaml) changed: [localhost] => (item=vscoss.vscode-ansible) changed: [localhost] => (item=wraith13.background-phi-colors) changed: [localhost] => (item=wraith13.clairvoyant) changed: [localhost] => (item=wraith13.zoombar-vscode) changed: [localhost] => (item=oderwat.indent-rainbow) changed: [localhost] => (item=mechatroner.rainbow-csv) changed: [localhost] => (item=ms-azuretools.vscode-docker) changed: [localhost] => (item=davidanson.vscode-markdownlint) changed: [localhost] => (item=wholroyd.jinja) changed: [localhost] => (item=eamodio.gitlens) changed: [localhost] => (item=74th.monokai-charcoal-high-contrast) changed: [localhost] => (item=johnpapa.vscode-peacock) changed: [localhost] => (item=dracula-theme.theme-dracula) changed: [localhost] => (item=skyapps.fish-vscode) changed: [localhost] => (item=alefragnani.bookmarks) changed: [localhost] => (item=ms-kubernetes-tools.vscode-kubernetes-tools) changed: [localhost] => (item=ipedrazas.kubernetes-snippets) changed: [localhost] => (item=ms-vscode.go)
  7. (঺հ) ԶͷMacbookΛߏங͢ΔAnsibleϓϨΠϒοΫ • VSCode֦ுͷ؅ཧҎ֎ʹ΋͜Μͳ͜ͱΛ·ͱΊͯ΍Γ·͢ - homebrew/caskͰύοέʔδ௥Ճ - OSઃఆ(OSX defaults) -

    ϗετ໊ઃఆ - fish+powerline؀ڥߏங - γΣϧͷΤΠϦΞεͱ͔Λઃఆ - VSCode settings.jsonઃఆ - gitconfigͱ͔vimrcͱ͔ઃఆ https://github.com/answer-d/mac_os_setup_playbook