Skip to content

Commit

Permalink
increased webhook version
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-ebert-sva committed May 24, 2024
1 parent 0b7c007 commit fe4d472
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 50 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ logo_pic: "https://www.clipartmax.com/png/middle/120-1208387_cereal-guy-interest
failure_pic: "https://anthillonline.com/wp-content/uploads/2020/06/failure.png"
ms_teams_notification_type: simple

webhook_version: 2.8.0
webhook_version: 2.8.1
systemd_path: /etc/systemd/system
webhook_service_name: "webhook-{{ webhook }}.service"
webhook_working_dir: /tmp
Expand Down
49 changes: 0 additions & 49 deletions tasks/install-webhook-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,3 @@
vars:
groups_to_create: "{{ webhook_group }}"
users: "{{ webhook_user }}"

- name: Create webhook data directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ webhook_username }}"
group: "{{ webhook_groupname }}"
mode: 0644
tags: webhook_server, config
loop:
- "{{ path_execute_script | dirname }}"
- "{{ path_webhook_config | dirname }}"
- "{{ webhook_work_dir }}"

- name: Create config files for {{ webhook }}
ansible.builtin.template:
src: "{{ item.template }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
owner: "{{ webhook_username }}"
group: "{{ webhook_groupname }}"
loop:
- { template: webhook-server-service.j2, dest: "{{ systemd_path }}/{{ webhook_service_name }}", mode: 0644 }
- { template: script.sh.j2, dest: "{{ path_execute_script }}", mode: a+x }
- { template: webhook-config.yaml.j2, dest: "{{ path_webhook_config }}", mode: a+x }

- name: Ensure container's exposed ports firewall state
tags: firewall
ansible.posix.firewalld:
port: "{{ webhook_port }}/tcp"
permanent: true
immediate: true
state: enabled
when: webhook_port is defined and ansible_os_family == 'RedHat'

- name: Ensure container's exposed ports firewall state
tags: firewall
community.general.ufw:
rule: allow
port: "{{ webhook_port }}"
proto: tcp
when: webhook_port is defined and ansible_os_family == 'Debian'

- name: Ensure webhook {{ webhook }} service is enabled at boot, and systemd is reloaded
ansible.builtin.systemd:
name: "{{ webhook_service_name }}"
enabled: true
state: started
daemon_reload: true

0 comments on commit fe4d472

Please sign in to comment.