From c22e4c1cc3f55c86d28e2be035216894cab6f4ff Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Thu, 23 Feb 2023 11:50:01 +0100 Subject: [PATCH] Changes to make fips work on ubuntu Change-Id: Ibda3e9369a177151ce222f87bbf05fc5a37a47d6 --- roles/enable-fips/tasks/main.yaml | 3 +-- roles/enable-fips/tasks/ubuntu.yaml | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/enable-fips/tasks/main.yaml b/roles/enable-fips/tasks/main.yaml index e339ca4be..dc13803a9 100644 --- a/roles/enable-fips/tasks/main.yaml +++ b/roles/enable-fips/tasks/main.yaml @@ -17,5 +17,4 @@ - name: Do tasks for Ubuntu include_tasks: ubuntu.yaml - when: > - (ansible_distribution == "Ubuntu") + when: ansible_distribution == 'Ubuntu' diff --git a/roles/enable-fips/tasks/ubuntu.yaml b/roles/enable-fips/tasks/ubuntu.yaml index d2137852f..9a6db5154 100644 --- a/roles/enable-fips/tasks/ubuntu.yaml +++ b/roles/enable-fips/tasks/ubuntu.yaml @@ -4,9 +4,14 @@ name: ubuntu-advantage-tools state: present -- name: Enable fips +- name: Enable fips and fips-updates become: true - command: ua enable fips + shell: | + set -o pipefail + yes | ua enable fips + echo + args: + executable: '/bin/bash' - name: Verify fips is enabled become: true