---
# tasks on Ubuntu
- set_fact:
    apt_repositories:
      - bionic main restricted
      - bionic-updates main restricted
      - bionic universe
      - bionic-updates universe
      - bionic multiverse
      - bionic-updates multiverse
      - bionic-backports main restricted universe multiverse
- name: Remove archive.ubuntu.com
  apt_repository:
    repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
    state: absent
  with_items: "{{ apt_repositories }}"
  become: yes
- name: Add ftp.jaist.ac.jp
  apt_repository:
    repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
    state: present
  with_items: "{{ apt_repositories }}"
  become: yes

---
# tasks on Ubuntu
- set_fact:
    apt_repositories:
      - bionic main restricted
      - bionic-updates main restricted
      - bionic universe
      - bionic-updates universe
      - bionic multiverse
      - bionic-updates multiverse
      - bionic-backports main restricted universe multiverse

- block:
  - name: Install tzdata
    apt:
      name: tzdata
      update_cache: yes
      cache_valid_time: 3600
      install_recommends: no
  - name: set timezone to Asia/Tokyo
    timezone:
      name: Asia/Tokyo
  become: yes

- name: Remove archive.ubuntu.com
  apt_repository:
    repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
    state: absent
  with_items: "{{ apt_repositories }}"
  become: yes
- name: Add ftp.jaist.ac.jp
  apt_repository:
    repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
    state: present
  with_items: "{{ apt_repositories }}"
  become: yes

Set timezone to Asia/Tokyo. This image is usually used in Japan.
Set timezone to Asia/Tokyo. This image is usually used in Japan.
