# platform = multi_platform_all
# reboot = false
# strategy = restrict
# complexity = low
# disruption = low
- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - DISA-STIG-UBTU-22-612040
  - low_complexity
  - low_disruption
  - low_severity
  - no_reboot_needed
  - restrict_strategy
  - verify_use_mappers

- name: Verify that 'use_mappers' is set to 'pwent' in PAM
  ansible.builtin.lineinfile:
    path: /etc/pam_pkcs11/pam_pkcs11.conf
    create: true
    regexp: ''
    line: use_mappers = pwent
    state: present
  when: '"linux-base" in ansible_facts.packages'
  tags:
  - DISA-STIG-UBTU-22-612040
  - low_complexity
  - low_disruption
  - low_severity
  - no_reboot_needed
  - restrict_strategy
  - verify_use_mappers
