Just clone the repository and add the library folder to the ansible module path. For more information have a look at the ansible documentation.
To add a rewrite rule to the AdGuard config:
- name: Add a rewrite rule to config
adguard_rewrite:
path: adguard.yaml
domain: hello.example.net
answer: 192.168.0.1
To remove a rewrite rulr from the AdGuard config:
- name: Remove a rewrite rule from config
adguard_rewrite:
path: adguard.yaml
domain: hello.example.net
answer: 192.168.0.1
state: absent
Have a look at the example playbook