Skip to content

Instantly share code, notes, and snippets.

@nezuppo
Created June 24, 2021 11:50
Show Gist options
  • Save nezuppo/fe4f81e3028ed98ee63c894301157a77 to your computer and use it in GitHub Desktop.
Save nezuppo/fe4f81e3028ed98ee63c894301157a77 to your computer and use it in GitHub Desktop.
- hosts: local
connection: local
gather_facts: no
tasks:
- name: apt update
become: true
apt:
update_cache: yes
- name: apt full-upgrade
become: true
apt:
update_cache: no
upgrade: full
- name: raspi-config nonint
become: true
command:
cmd: "/usr/bin/raspi-config nonint {{item}}"
register: output
failed_when: output.rc != 0
loop:
- do_boot_behaviour B1 # B1 Console: Text console, requiring user to login
- do_change_locale en_US.UTF-8
- do_change_timezone Asia/Tokyo
- do_configure_keyboard jp
- do_wifi_country JP
- name: apt install my standard packages
become: true
apt:
update_cache: no
state: present
pkg:
- vim
- byobu
- colordiff
- tree
- name: disable visual mode on vim
become: true
replace:
# Vim 8.1 の場合はこのディレクトリ
path: /usr/share/vim/vim81/defaults.vim
backup: yes
regexp: '^( *)set +mouse *=a *$'
replace: '\1set mouse-=a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment