1 #!/usr/bin/env ansible-playbook
2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: Apache-2.0
6 - name: Validate build arguments
9 - name: Check compute_authorized_keys is set
11 msg: "`compute_authorized_keys` is not set"
12 when: "compute_authorized_keys is not defined"
14 - name: Check compute_authorized_keys exists
16 msg: "`compute_authorized_keys` file not found: {{ compute_authorized_keys }}"
17 when: "compute_authorized_keys is not exists"
20 - name: Build compute node
21 # `default` is the name that the Packer Ansible plugin assigns to the
22 # instance used to create the image.
26 - name: Bootstrap packages required for Ansible
27 ansible.builtin.raw: "apt-get -o DPkg::Lock::Timeout=300 -qy {{ item }}"
30 - install gnupg python3-apt python3-debian xz-utils
35 - name: Upgrade packages
39 - name: Remove unwanted packages
49 when: "arvados_compute_nvidia|default(false)|bool"
51 name: "compute_{{ arvados_container_engine|default('docker') }}"
53 name: compute_encrypt_tmp
57 - name: Install Arvados FUSE driver
59 name: python3-arvados-fuse
60 - name: Configure FUSE
61 ansible.builtin.lineinfile:
63 regexp: "^[# ]*user_allow_other *$"
64 line: user_allow_other
65 - name: Configure locale
66 ansible.builtin.lineinfile:
68 regexp: "^[# ]*en_US.UTF-8 +UTF-8 *$"
69 line: en_US.UTF-8 UTF-8
72 ansible.builtin.lineinfile:
73 path: /etc/dhcp/dhclient.conf
74 regexp: "^[# ]*prepend +domain-name-servers "
75 line: "prepend domain-name-servers {{ dns_resolver }};"
76 when: dns_resolver is defined
80 ansible.builtin.debug:
81 msg: Skipping apt update handler before an apt upgrade
84 ansible.builtin.command: locale-gen