mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-30 17:01:33 +08:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
---
|
|
- name: install pam_url
|
|
package: name=pam_url state=present
|
|
tags:
|
|
- packages
|
|
when: ansible_distribution_major_version|int < 8 and ansible_distribution == 'RedHat'
|
|
|
|
- name: install pam_url
|
|
dnf: name=pam_url state=present
|
|
tags:
|
|
- packages
|
|
when: ansible_distribution_major_version|int > 7 and ansible_distribution == 'RedHat'
|
|
|
|
- name: install pam_url
|
|
dnf: name=pam_url state=present
|
|
tags:
|
|
- packages
|
|
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'RedHat'
|
|
|
|
- name: /etc/pki/tls/private/totpcgi.pem
|
|
copy: src="{{ private }}/files/2fa-certs/keys/{{ inventory_hostname }}.pem" dest=/etc/pki/tls/private/totpcgi.pem mode=0400
|
|
tags:
|
|
- config
|
|
|
|
- name: /etc/pki/tls/private/totpcgi-ca.cert
|
|
copy: src="{{ private }}/files/2fa-certs/keys/ca.crt" dest=/etc/pki/tls/private/totpcgi-ca.cert mode=0400
|
|
tags:
|
|
- config
|
|
|
|
- name: /etc/pam_url.conf - split for staging/phx2/everyone else
|
|
template: src={{ item }} dest=/etc/pam_url.conf mode=0644
|
|
with_first_found:
|
|
- "{{ files }}/2fa/pam_url.conf.{{ inventory_hostname }}"
|
|
- "{{ files }}/2fa/pam_url.conf.{{ ansible_domain }}"
|
|
- "{{ files }}/2fa/pam_url.conf.{{ datacenter }}"
|
|
- "{{ files }}/2fa/pam_url.conf.j2"
|
|
tags:
|
|
- config
|
|
- pam_url
|
|
|
|
- name: /etc/pam.d/sudo
|
|
copy: src={{ item }} dest=/etc/pam.d/sudo mode=0644
|
|
with_first_found:
|
|
- "{{ files }}/2fa/sudo.pam.{{ inventory_hostname }}"
|
|
- "{{ files }}/2fa/sudo.pam.{{ ansible_domain }}"
|
|
- "{{ files }}/2fa/sudo.pam"
|
|
tags:
|
|
- config
|
|
|
|
|