Skip to content

Commit 0eeb8fd

Browse files
authored
Allow to use specific version of git managed pipeline (NETWAYS#98)
* Allow to use specific version of git managed pipeline fixes NETWAYS#97
1 parent ed271c0 commit 0eeb8fd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

docs/pipelines.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ logstash_pipelines:
2424
output: syslog_out
2525
```
2626

27+
You can add a `version` attribute to your pipeline. It defaults to `main`. You can use every string, [Ansibles git](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html) module accepts.
28+
2729
## Custom pipelines ##
2830

2931
If you have other ways of putting pipeline code into the correct directories, you can just skip the `source` option.

molecule/run_logstash/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
syslog:
1717
name: syslog
1818
source: https://github.com/widhalmt/syslog-logstash-pipeline.git
19+
version: master
1920
input: syslog
2021
output: syslog
2122
logstash_connector_pipelines:

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
git:
7272
repo: "{{ logstash_pipelines[item].source }}"
7373
dest: "/etc/logstash/conf.d/{{ logstash_pipelines[item].name }}"
74-
version: master
74+
version: "{{ logstash_pipelines[item].version |default('main') }}"
7575
with_items: "{{ logstash_pipelines }}"
7676
when: logstash_pipelines[item].source is defined
7777
notify:

0 commit comments

Comments
 (0)