Skip to content

Commit

Permalink
Handle result of allowing port if not already authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
dsoumis authored and rpelisse committed Oct 10, 2023
1 parent 9ab204f commit 3b8dcac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/jws/tasks/systemd/seport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
when:
- seport_status.rc != 0
ansible.builtin.command: "semanage port --add -t http_port_t -p tcp {{ requested_port }}"
register: result
failed_when: result.rc != 0 and "already defined" not in result.stderr
changed_when:
- result.rc == 0

0 comments on commit 3b8dcac

Please sign in to comment.