Created
March 10, 2023 22:58
-
-
Save maxamillion/13bc87461d5310d6cc73f9ec63e0ea45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Receptor configs: | |
foo.yml | |
--- | |
- node: | |
id: foo | |
- log-level: | |
level: Debug | |
- tcp-listener: | |
port: 2222 | |
- control-service: | |
service: control | |
filename: /tmp/foo.sock | |
- work-command: | |
worktype: filemodifiedevent | |
command: bash | |
params: "-c \"/usr/bin/touch /tmp/testing/foo\"" | |
bar.yml | |
--- | |
- node: | |
id: bar | |
- log-level: | |
level: Debug | |
- tcp-peer: | |
address: localhost:2222 | |
- control-service: | |
service: control | |
- work-command: | |
worktype: filemodifiedevent | |
command: bash | |
params: "-c \"/usr/bin/touch /tmp/testing/foo\"" | |
Receptor commands: | |
./receptor --config foo.yml | |
./receptor --config bar.yml | |
Receptorctl commmand: receptorctl --socket /tmp/foo.sock work submit filemodifiedevent --no-payload | |
Ansible Rulebook: | |
test_rulebook.yml | |
--- | |
- name: Hello Events | |
hosts: localhost | |
sources: | |
- ansible.eda.file_watch: | |
path: /tmp/testing/ | |
recursive: false | |
rules: | |
- name: debug output | |
condition: event.type == "FileModifiedEvent" | |
action: | |
print_event: | |
Rulebook command: JAVA_HOME=/usr/lib/jvm/java-17-openjdk-17.0.6.0.10-1.fc37.x86_64/ ansible-rulebook -r test_rulebook.yml -i ~/src/maxible/inventory.ini --print-events |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment