3 Commits

Author SHA1 Message Date
  3moon 2190dc18d5 install mosh 6 years ago
  3moon f762578150 fix locale setup 6 years ago
  3moon 6159fb7b9c README: add provision line 6 years ago
6 changed files with 20 additions and 15 deletions
Split View
  1. +3
    -1
      README.md
  2. +2
    -2
      roles/rpi-base/defaults/main.yml
  3. +0
    -3
      roles/rpi-base/handlers/main.yml
  4. +7
    -1
      roles/rpi-base/tasks/access.yml
  5. +8
    -7
      roles/rpi-base/tasks/locale.yml
  6. +0
    -1
      roles/rpi-base/templates/etc/default/locale.j2

+ 3
- 1
README.md View File

@ -5,6 +5,8 @@
ansible, `sshpass`
```sh
λ ~/git/comfy.lab/inf-aux
λ ~/git/comfy.lab/inf-aux
» ansible-playbook bootstrap.yml --extra-vars "unprepped=raspberrypi.lab.uncomfortably.online provision_hostname=aux" -i inventory
# ...
» ansible-playbook provision.yml -i inventory
```

+ 2
- 2
roles/rpi-base/defaults/main.yml View File

@ -1,6 +1,6 @@
#### locale ####
default_locale: 'en-US.UTF-8'
default_locale: 'en_US.UTF-8'
locales:
- 'en-US.UTF-8'
- 'en_US.UTF-8 UTF-8'
tz: America/Chicago

+ 0
- 3
roles/rpi-base/handlers/main.yml View File

@ -1,3 +0,0 @@
- name: locale-gen
shell: locale-gen
become: yes

+ 7
- 1
roles/rpi-base/tasks/access.yml View File

@ -1,5 +1,11 @@
- name: ACCESS | install mosh
apt:
package: mosh
state: present
become: yes
- name: ACCESS | enable & start sshd
service:
name: ssh
state: started
enabled: yes
enabled: yes

+ 8
- 7
roles/rpi-base/tasks/locale.yml View File

@ -1,13 +1,14 @@
- name: LOCALE | build locales
- name: LOCALE | configure locales
lineinfile:
path: /etc/locale.gen
regexp: '#\s*{{item}}'
line: '{{item}}'
regexp: '#\s*({{item | regex_escape()}}[\s\w]*)'
line: '\1'
backrefs: yes
state: present
with_items: "{{locales}}"
notify: locale-gen
- name: LOCALE | generate locales
shell: locale-gen
- name: LOCALE | set default locale
template:
src: etc/default/locale.j2
dest: /etc/default/locale
shell: update-locale LANG={{default_locale}}

+ 0
- 1
roles/rpi-base/templates/etc/default/locale.j2 View File

@ -1 +0,0 @@
LOCALE="{{default_locale}}"

Loading…
Cancel
Save