From 472c53e48cd253cb18d845567e42d3aab49961a1 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Jun 13 2019 04:23:55 +0000 Subject: nodepool: add fedora-rootfs and fix sudoers file path The zuul-jobs revoke-sudo assumes the sudoer path is named zuul. --- diff --git a/nodepool/elements/virt-customize/fedora-cloud.yaml b/nodepool/elements/virt-customize/fedora-cloud.yaml index d619540..85ba8c7 100644 --- a/nodepool/elements/virt-customize/fedora-cloud.yaml +++ b/nodepool/elements/virt-customize/fedora-cloud.yaml @@ -61,6 +61,7 @@ - name: Check if image is already downloaded stat: path: "{{ image_cache_file }}" + get_checksum: no register: _image_cache_file_stat - name: Download if checksum doesn't match @@ -97,7 +98,7 @@ content: | Defaults !requiretty zuul-worker ALL=(ALL) NOPASSWD:ALL - dest: "{{ image_tmp_dir }}/zuul-worker" + dest: "{{ image_tmp_dir }}/zuul" - name: Prepare the authorized_keys file copy: @@ -117,8 +118,8 @@ --chmod '0600:/home/zuul-worker/.ssh/authorized_keys' --run-command 'chown -R zuul-worker:zuul-worker /home/zuul-worker/.ssh/' {# Setup sudoers file #} - --copy-in '{{ image_tmp_dir }}/zuul-worker:/etc/sudoers.d/' - --chmod '0440:/etc/sudoers.d/zuul-worker' + --copy-in '{{ image_tmp_dir }}/zuul:/etc/sudoers.d/' + --chmod '0440:/etc/sudoers.d/zuul' {# Install extra packages #} --install '{{ extra_packages | join(',') }}' {# Disable IPv6 because rdo-cloud does not route v6 #} diff --git a/nodepool/runC/customize.yaml b/nodepool/runC/customize.yaml index 2d13aeb..12594f2 100644 --- a/nodepool/runC/customize.yaml +++ b/nodepool/runC/customize.yaml @@ -3,4 +3,4 @@ - include_tasks: _linters-packages.yaml # Uncomment to configure a fedora environment -# - include_tasks: fedora-rootfs.yaml +- include_tasks: fedora-rootfs.yaml diff --git a/nodepool/runC/fedora-rootfs.yaml b/nodepool/runC/fedora-rootfs.yaml index 0c7e6ee..3378559 100644 --- a/nodepool/runC/fedora-rootfs.yaml +++ b/nodepool/runC/fedora-rootfs.yaml @@ -1,7 +1,7 @@ - name: Set fedora version fact set_fact: - fedora_version: 28 - target_dir: /srv/f28 + fedora_version: 30 + target_dir: /srv/f30 - name: Set bwrap command fact set_fact: