TASK [moismailzai.protonmail_bridge_headless : include_tasks] **
included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-protonmail-bridge.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Kill the bridge (this is required because of the way the bridge works -- if there's a running instance the proceeding info command would be ignored)] ***
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'pipe'. Error was a <class 'ansible.errors.AnsibleError'>, original message: lookup_plugin.pipe(pkill -f protonmail-bridge) returned -15"}
...ignoring
TASK [moismailzai.protonmail_bridge_headless : Check if the user has already been added to the bridge] *****
protonmail-bridge: no process found
ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Restart the service since we killed it to gather facts (shouldn't use handler to ensure idempotency)] ***
Failed to restart protonmail-bridge-headless.service: Unit protonmail-bridge-headless.service not found.
ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Parse the local user's email and password from protonmail-bridge info] **
ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Prompt the user for a two-factor authentication code if required] ***
[moismailzai.protonmail_bridge_headless : Prompt the user for a two-factor authentication code if required]
Please input a two-factor authentication code (wait for a fresh code to avoid having it expire before being used):
327070^Mok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add user to protonmail-bridge] **
changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Parse the local user's email and password from protonmail-bridge info] **
ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add a symlink to the protonmail-bridge self-signed certificate on non-RHEL machines (required for postfix to communicate with bridge correctly)] ***
changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Explicitly trust the above cert on Archlinux] ***
skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add a symlink to the protonmail-bridge self-signed certificate on RHEL machines] ****
skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : enable the dynamic CA configuration feature] ****
skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : set SELinux types] **
skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Check to see if /etc/postfix/sasl_passwd contents require an update] ****
cat: /etc/postfix/sasl_passwd: No such file or directory
ok: [localhost]
Hi again, sorry it's been so long
Got 2FA working by taking your default playbook with the few lines and added the 2FA variable
However I have no idea what to do to fix this
let me know if I need to submit anything more
Cheers
root@Nextcloud:~/ansible-role-protonmail-bridge-headless# ansible-playbook -c local -i localhost, main.yml
PLAY [install and configure protonmail-bridge as a headless service] ***
TASK [Gathering Facts] ***** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Include OS-specific variables] ** ok: [localhost] => (item=/root/.ansible/roles/moismailzai.protonmail_bridge_headless/vars/Debian.yml)
TASK [moismailzai.protonmail_bridge_headless : Define variables] *** ok: [localhost] => (item={'key': 'deps', 'value': '__deps'})
TASK [moismailzai.protonmail_bridge_headless : Define SELinux default for RHEL hosts] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Define SELinux default for non RHEL hosts] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Ensure configuration directory exists] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Download the latest PKGBUILD to parse current metadata] ***** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Check if protonmail-bridge is already installed] **** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/setup-Debian.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Install dependencies] *** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Set protonmail-bridge package name] ***** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Download the protonmail-bridge, policy file, and public key] **** ok: [localhost] => (item={'url': 'https://protonmail.com/download/bridge/protonmail-bridge_1.8.10-1_amd64.deb', 'file': 'protonmail-bridge_1.8.10-1_amd64.deb'}) ok: [localhost] => (item={'url': 'https://protonmail.com/download/bridge.pol', 'file': 'bridge.pol'}) ok: [localhost] => (item={'url': 'https://protonmail.com/download/bridge_pubkey.gpg', 'file': 'bridge_pubkey.gpg'})
TASK [moismailzai.protonmail_bridge_headless : Unpack the public key] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Create the keyring and policy folders] ** ok: [localhost] => (item=/usr/share/debsig/keyrings/E2C75D68E6234B07) ok: [localhost] => (item=/etc/debsig/policies/E2C75D68E6234B07)
TASK [moismailzai.protonmail_bridge_headless : Copy the key to the keyring] **** skipping: [localhost] => (item={'src': '/var/lib/protonmail/debsig.gpg', 'dest': '/usr/share/debsig/keyrings/E2C75D68E6234B07/debsig.gpg'}) skipping: [localhost] => (item={'src': '/var/lib/protonmail/bridge.pol', 'dest': '/etc/debsig/policies/E2C75D68E6234B07/bridge.pol'})
TASK [moismailzai.protonmail_bridge_headless : Verify the debsig before package installation] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Install protonmail-bridge package] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-user.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Add protonmail user] **** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-gpg.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Get protonmail-bridge-headless service key id] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add protonmail-bridge gpg key and reload gpg-connect-agent] ***** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Get protonmail-bridge-headless service key id] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-pass.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Get protonmail-bridge-headless service key id] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Initialize pass] **** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-protonmail-bridge.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Kill the bridge (this is required because of the way the bridge works -- if there's a running instance the proceeding info command would be ignored)] *** fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'pipe'. Error was a <class 'ansible.errors.AnsibleError'>, original message: lookup_plugin.pipe(pkill -f protonmail-bridge) returned -15"} ...ignoring
TASK [moismailzai.protonmail_bridge_headless : Check if the user has already been added to the bridge] ***** protonmail-bridge: no process found ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Restart the service since we killed it to gather facts (shouldn't use handler to ensure idempotency)] *** Failed to restart protonmail-bridge-headless.service: Unit protonmail-bridge-headless.service not found. ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Parse the local user's email and password from protonmail-bridge info] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Prompt the user for a two-factor authentication code if required] *** [moismailzai.protonmail_bridge_headless : Prompt the user for a two-factor authentication code if required] Please input a two-factor authentication code (wait for a fresh code to avoid having it expire before being used): 327070^Mok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add user to protonmail-bridge] ** changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Parse the local user's email and password from protonmail-bridge info] ** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add a symlink to the protonmail-bridge self-signed certificate on non-RHEL machines (required for postfix to communicate with bridge correctly)] *** changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Explicitly trust the above cert on Archlinux] *** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Add a symlink to the protonmail-bridge self-signed certificate on RHEL machines] **** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : enable the dynamic CA configuration feature] **** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : set SELinux types] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : apply SELinux file contexts to filesystem] ** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : add the root cert to the server] **** skipping: [localhost]
TASK [moismailzai.protonmail_bridge_headless : include_tasks] ** included: /root/.ansible/roles/moismailzai.protonmail_bridge_headless/tasks/configure-postfix.yml for localhost
TASK [moismailzai.protonmail_bridge_headless : Add protonmail-bridge configuration to postfix] ***** changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Calculate sasl_passwd contents] ***** ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Check to see if /etc/postfix/sasl_passwd contents require an update] **** cat: /etc/postfix/sasl_passwd: No such file or directory ok: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Update sasl_passwd file with calculated contents] *** changed: [localhost]
TASK [moismailzai.protonmail_bridge_headless : Update postfix lookup tables] *** fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["postmap", "/etc/postfix/sasl_passwd"], "delta": "0:00:01.035135", "end": "2021-10-28 03:59:25.954003", "msg": "non-zero return code", "rc": 1, "start": "2021-10-28 03:59:24.918868", "stderr": "postmap: warning: /etc/postfix/main.cf, line 49: overriding earlier entry: inet_interfaces=all\npostmap: warning: /etc/postfix/main.cf, line 50: overriding earlier entry: myhostname=Nextcloud\npostmap: warning: /etc/postfix/main.cf, line 51: overriding earlier entry: relayhost=\npostmap: warning: /etc/postfix/main.cf, line 56: overriding earlier entry: smtp_tls_security_level=may\npostmap: warning: /etc/postfix/main.cf, line 57: overriding earlier entry: smtp_tls_session_cache_database=btree:${data_directory}/smtp_scache\npostmap: fatal: bad string length 0 < 1: myhostname = ", "stderr_lines": ["postmap: warning: /etc/postfix/main.cf, line 49: overriding earlier entry: inet_interfaces=all", "postmap: warning: /etc/postfix/main.cf, line 50: overriding earlier entry: myhostname=Nextcloud", "postmap: warning: /etc/postfix/main.cf, line 51: overriding earlier entry: relayhost=", "postmap: warning: /etc/postfix/main.cf, line 56: overriding earlier entry: smtp_tls_security_level=may", "postmap: warning: /etc/postfix/main.cf, line 57: overriding earlier entry: smtp_tls_session_cache_database=btree:${data_directory}/smtp_scache", "postmap: fatal: bad string length 0 < 1: myhostname = "], "stdout": "", "stdout_lines": []}
RUNNING HANDLER [moismailzai.protonmail_bridge_headless : restart postfix] *****
RUNNING HANDLER [moismailzai.protonmail_bridge_headless : restart protonmail-bridge-headless] **
PLAY RECAP ***** localhost : ok=34 changed=4 unreachable=0 failed=1 skipped=13 rescued=0 ignored=1