|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- ---
- - name: Update sources.list
- template:
- src: etc/apt/sources.list
- dest: /etc/apt/sources.list
- owner: root
- group: root
- mode: 0644
-
- - name: Upgrade packages
- apt:
- upgrade: dist
- update_cache: yes
-
- - name: Install packages
- apt:
- name: "{{ item }}"
- loop:
- - ubuntu-minimal
- - ifupdown
- - bridge-utils
- - bash-completion
- - net-tools
- - pciutils
- - python3-dev
- - python3-pip
- - ssh
- - usbutils
- - unzip
- - pkg-config
- - iotop
- - re2c
- - ninja-build
- - cmake
- - build-essential
-
- - name: Install Ubuntu Server
- apt:
- name: ubuntu-server
- install_recommends: no
-
- - name: Generate locales
- locale_gen:
- name: en_US.UTF-8
- state: present
-
- - name: Enable services
- shell: systemctl enable {{ item }}
- loop:
- - ssh
- - systemd-networkd
- - systemd-resolved
-
- - name: Create network conf
- template:
- src: etc/netplan/netcfg.yaml
- dest: /etc/netplan/netcfg.yaml
- owner: root
- group: root
- mode: 0644
-
- - name: Create new user
- user:
- name: "{{ user.name }}"
- shell: "{{ user.shell }}"
- password: "{{ user.password | password_hash('sha512') }}"
- create_home: yes
- groups: sudo,sys,video,uucp,lp,input,audio,plugdev
- state: present
-
- - name: Ensure default multi-user target
- shell: systemctl set-default multi-user.target
|