Skip to content

Commit f776820

Browse files
committed
Change show_2fa workflow, also test the show_2fa command during CI
1 parent a22ddeb commit f776820

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

roles/authelia/handlers/main.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

roles/authelia/tasks/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,13 @@
5656
- "{{ docker_dir }}/authelia:/config"
5757
restart_policy: unless-stopped
5858

59-
- name: Add a 2FA alias to .bashrc
59+
- name: Add a 2FA alias shortcut command
6060
ansible.builtin.blockinfile:
61-
path: "/home/{{ username }}/.bashrc"
61+
path: "/usr/bin/show_2fa"
6262
create: yes
63-
owner: "{{ username }}"
64-
group: "{{ username }}"
63+
owner: root
6564
mode: 0755
6665
state: present
6766
block: |
68-
alias show_2fa="sudo cat {{ docker_dir }}/authelia/notification.txt"
69-
notify:
70-
- Source .bashrc
67+
#! /usr/bin/env bash
68+
sudo cat {{ docker_dir }}/authelia/notification.txt

testing/selenium/acceptance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def register_2fa(driver, base_url, username, password):
6666

6767
s = pxssh.pxssh()
6868
s.login(base_url, username, password)
69-
s.sendline('sudo cat /opt/docker/authelia/notification.txt')
69+
s.sendline('sudo show_2fa')
7070
s.prompt()
7171

7272
# Convert output to utf-8 due to pexpect weirdness

0 commit comments

Comments
 (0)