From b6656c3d9c0d617ab234a253f163e1602ab3c804 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Mon, 14 Jun 2021 16:59:20 +0200 Subject: [PATCH] Fix SSH config;Housekeeping --- .../files/ansible_payload/roles/users/tasks/main.yml | 4 ++-- scripts/Update-OvfConfiguration.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/users/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/users/tasks/main.yml index 44f9575..c59cf1e 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/users/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/users/tasks/main.yml @@ -16,8 +16,8 @@ line: "{{ item.line }}" state: "{{ item.state }}" loop: - - { regex: '$#PasswordAuthentication', line: 'PasswordAuthentication no', state: ''} - - { regex: '', line: 'PasswordAuthentication yes', state: absent} + - { regex: '$#PasswordAuthentication', line: 'PasswordAuthentication no', state: present} + - { regex: ~, line: 'PasswordAuthentication yes', state: absent} - name: Delete 'ubuntu' user ansible.builtin.user: name: ubuntu diff --git a/scripts/Update-OvfConfiguration.yml b/scripts/Update-OvfConfiguration.yml index 5dee162..775e1ae 100644 --- a/scripts/Update-OvfConfiguration.yml +++ b/scripts/Update-OvfConfiguration.yml @@ -38,7 +38,7 @@ PropertyCategories: Configurations: '*' UserConfigurable: true - Key: guestinfo.rootsshkey - Type: string(1..) + Type: password(1..) Label: Local root SSH public key* Description: This line should start with 'ssh-rsa AAAAB3N' DefaultValue: ''