Oefenweb / ansible-postfix

Ansible role to set up postfix in Debian-like systems
MIT License
174 stars 83 forks source link

ERROR! the role 'postfix' was not found #109

Closed motorcb closed 3 years ago

motorcb commented 3 years ago

I have this simple configuration:

root@kuki-vm:/home/kuki/ansible/myvps# cat playbooks/postfix.yml 
---
- hosts: bettingVpsOn
  roles:
    - postfix
  vars:
    postfix_mydestination:
      - mydomain.cz
      - '$mydomain'
      - localdomain
      - localhost
      - localhost.localdomain
    postfix_virtual_aliases:
      - virtual: admin@mydomain.cz
        alias: splash@gmail.com

When I run the playbook: root@kuki-VM:/home/kuki/ansible/myvps# ansible-playbook ./playbooks/postfix.yml -i ./hosts

I have this error: ERROR! the role 'postfix' was not found in /home/kuki/ansible/myvps/playbooks/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/kuki/ansible/myvps/playbooks

The error appears to be in '/home/kuki/ansible/myvps/playbooks/postfix.yml': line 4, column 7, but maybe elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - postfix
      ^ here

How to fix it? Thanks I tryed install: ansible-galaxy install mrlesmithjr.postfix but still is same error

xtof-osd commented 3 years ago

Maybe you should use oefenweb.postfix as your role name if you installed using ansible-galaxyor ansible-postfix if you just cloned the repo.

tersmitten commented 3 years ago

Indeed @xtof-osd.

The README is the way it is because we use git submodules and for us the path to the role actually is postfix, but for "others" it probably is oefenweb.postfix or ansible-postfix.