---
- include: go-common.yml
- name: yum install go-server
  sudo: yes
  yum: pkg=go-server-{{go_version}} state=present
  notify:
  - restart go-server
  when: ansible_pkg_mgr=='yum'

- name: apt install go-server
  sudo: yes
  apt: pkg=go-server={{go_version}} state=present force=yes
  when: ansible_pkg_mgr=='apt'
  notify:
  - restart go-server

- name: start go-server
  sudo: yes
  service: name=go-server state=started
  notify:
     - ensure go-server running

# These won't work if you don't have firewalld, but they won't error out either
- name: enable Go HTTP traffic through firewalld
  sudo: yes
  firewalld: port=8153 permanent=true state=enabled

- name: enable Go HTTPS traffic through firewalld
  sudo: yes
  firewalld: port=8154/tcp permanent=true state=enabled

---
- name: yum install go-server
  sudo: yes
  yum: pkg=go-server-{{go_version}} state=present
  notify:
  - restart go-server
  when: ansible_pkg_mgr=='yum'

- name: apt install go-server
  sudo: yes
  apt: pkg=go-server={{go_version}} state=present force=yes
  when: ansible_pkg_mgr=='apt'
  notify:
  - restart go-server

- name: start go-server
  sudo: yes
  service: name=go-server state=started
  notify:
     - ensure go-server running

# These won't work if you don't have firewalld, but they won't error out either
- name: enable Go HTTP traffic through firewalld
  sudo: yes
  firewalld: port=8153/tcp permanent=true state=enabled

- name: enable Go HTTPS traffic through firewalld
  sudo: yes
  firewalld: port=8154/tcp permanent=true state=enabled

Add back in protocol to the firewalld statement. Removed for an example and accidentally saved.
Add back in protocol to the firewalld statement.  Removed for an example and accidentally saved.
