Skip to content

1.8.2 | Ensure GDM login banner is configured (Automated) | Configure banner-message-enable if gdm3 installed fails #24

Open
@omerfsen

Description

@omerfsen

1.8.2, 1.8.3, 1.8.4 are failing while building packer image.

TASK [darkwizard242.cis_ubuntu_2004 : 1.8.2 | Ensure GDM login banner is configured (Automated) | Configure banner-message-enable if gdm3 installed] is failing because file does not exist (or installed by OS)

{"changed": false, "msg": "Destination /etc/gdm3/greeter.dconf-defaults does not exist !", "rc": 257}

ISSUE TYPE

  • Bug Report

ANSIBLE VERSION

ansible --version
ansible [core 2.12.8]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True
root@f036d784698e:~/rd-ih-ubuntu-vm-template# ansible-config dump --only-changed
root@f036d784698e:~/rd-ih-ubuntu-vm-template# 
 cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

STEPS TO REPRODUCE

Just run ansible against ubuntu 20.04.4

 - name: darkwizard242.cis_ubuntu_2004
   version: 3.1.0

EXPECTED RESULTS

If file does not exist skip this test

ACTUAL RESULTS

Even file does not exist it tries to run it and fails. This file is not installed by OS pkg manager (apt)

dpkg -l  /etc/gdm3/greeter.dconf-defaults 
dpkg-query: no packages found matching /etc/gdm3/greeter.dconf-defaults
, did rescue? False, did start at task? False
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.23219: getting the next task for host default
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.23254: done getting next task for host default
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.23264:  ^ task is: None
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.23276:  ^ state is: HOST STATE: block=8, task=27, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu: fatal: [default]: FAILED! => {"changed": false, "msg": "Destination /etc/gdm3/greeter.dconf-defaults does not exist !", "rc": 257}
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.24264: no more pending results, returning what we have
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.24308: results queue empty
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.24347: checking for any_errors_fatal
2022-08-28T20:01:06+01:00:     vsphere-iso.ubuntu:  42513 1661713266.24380: done checking for any_errors_fatal

I think this file is created AFTER OS is first booted but since we use packer to build it this file does not exist yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions