moismailzai / ansible-role-protonmail-bridge-headless

Installs the ProtonMail bridge, registers it as a headless service, and configures Postfix to use it.
MIT License
24 stars 2 forks source link

Playbook Error #2

Closed boiUneedAwash closed 3 years ago

boiUneedAwash commented 3 years ago

Hi there again, everything ran successfully up until the last command before setup triggering:

ERROR! A playbook must be a list of plays, got a <class 'ansible.parsing.yaml.objects.AnsibleMapping'> instead

The error appears to be in '/root/.ansible/roles/moismailzai.protonmail_bridge_headless/defaults/main.yml': line 4, column 1, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

mandatory variables ################################################################################################## protonmail_username: "nameRedacted" ^ here

I will attach my main.yml file as a .txt

Thank you for your work!

moismailzai commented 3 years ago

Hi, please change your protonmail password as it's attached in that file you posted.

The defaults/main.yml file looks correct to me. Could you post what your playbook looks like? From reading the error, it seems like you're trying to run the defaults/main.yml file as a playbook. Instead, your playbook should look something like this:

- name: "install and configure protonmail-bridge as a headless service"
  become: "yes"
  hosts: "all"
  vars:
    protonmail_username: "your_username"
    protonmail_password: "your_password"
    protonmail_custom_domain: "your_domain"
  roles:
    - "moismailzai.protonmail_bridge_headless"
boiUneedAwash commented 3 years ago

Awesome, yeah I was trying to do that, I'll give it another go soon thanks!