Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor ansible changes that fix failing rules after remediations #6034

Merged
merged 1 commit into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
dest: /etc/sssd/sssd.conf
section: pam
option: pam_cert_auth
value: true
value: 'true'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

create: yes
mode: 0600
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
path: /etc/opensc-{{ ansible_architecture }}.conf
register: opensc_conf_cd

- name: "{{{ rule_title }}}"
lineinfile:
path: /etc/opensc-{{ ansible_architecture }}.conf
line: ' card_drivers = {{ var_smartcard_drivers }}'
regexp: '(^\s+#|^)\s+card_drivers\s+=\s+.*'
state: present
when: opensc_conf_cd.stat.exists
- name: Configure smartcard driver block
block:
- name: Check if card_drivers is defined
command: /usr/bin/opensc-tool -G app:default:card_drivers
changed_when: false
register: card_drivers

- name: "{{{ rule_title }}}"
command: |
/usr/bin/opensc-tool -S app:default:card_drivers:{{ var_smartcard_drivers }}
when:
- card_drivers.stdout != var_smartcard_drivers
when:
- opensc_conf_cd.stat.exists
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
path: /etc/opensc-{{ ansible_architecture }}.conf
register: opensc_conf_fcd

- name: "{{{ rule_title }}}"
lineinfile:
path: /etc/opensc-{{ ansible_architecture }}.conf
line: ' force_card_driver = {{ var_smartcard_drivers }}'
regexp: '(^\s+#|^)\s+force_card_driver\s+=\s+.*'
state: present
when: opensc_conf_fcd.stat.exists
- name: Force smartcard driver block
block:
- name: Check if force_card_driver is defined
command: /usr/bin/opensc-tool -G app:default:force_card_driver
changed_when: false
register: force_card_driver

- name: "{{{ rule_title }}}"
command: |
/usr/bin/opensc-tool -S app:default:force_card_driver:{{ var_smartcard_drivers }}
when:
- force_card_driver.stdout != var_smartcard_drivers
when:
- opensc_conf_fcd.stat.exists
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ ocil: |-
To verify that <tt><sub idref="var_smartcard_drivers" /></tt> is configured
as the smart card driver, run the following command changing <i>ARCH</i> for
the architecture of your operating system:
<pre>$ grep card_drivers /etc/opensc-<i>ARCH</i></pre>
<pre>$ grep force_card_driver /etc/opensc-<i>ARCH</i></pre>
The output should return something similar to:
<pre>card_drivers = <sub idref="var_smartcard_drivers" />;</pre>
<pre>force_card_drivers = <sub idref="var_smartcard_drivers" />;</pre>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
section: Disable General User Access to NetworkManager
option: "{{ item.option }}"
value: "{{ item.value }}"
no_extra_spaces: yes
create: yes
loop:
- { option: 'Identity', value: 'default' }
Expand Down