New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support comment directive on ufw module #24981

Closed
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
4 participants
@Lujeni
Contributor

Lujeni commented May 24, 2017

SUMMARY

Support the new comment directive in the ufw module.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ufw

ANSIBLE VERSION
ansible 2.4.0 (module_ufw_support_comment 89e146e5bb) last updated 2017/05/24 15:48:05 (GMT +200)
  config file = 
  configured module search path = [u'/home/julien/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/julien/works/repos/perso/ansible/ansible-lujeni/lib/ansible
  executable location = /home/julien/works/repos/perso/ansible/ansible-lujeni/bin/ansible
  python version = 2.7.12 (default, Jan  4 2017, 22:30:16) [GCC 5.3.0]
ADDITIONAL INFORMATION
Add a comment rule without ufw > 0.35
- hosts: all
  become: True
  become_user: root

  tasks:
    - name: rule with comment
      ufw:
        rule: allow
        port: 80
        proto: tcp
        comment: allow http trafic
      register: rule
expected result
fatal: [xxx]: FAILED! => {"changed": false, "failed": true, "msg": "Note: you must use ufw >=0.35 for comment directive."}
Add a comment rule
- hosts: all
  become: True
  become_user: root

  tasks:
    - name: rule with comment
      ufw:
        rule: allow
        port: 80
        proto: tcp
        comment: allow http trafic
      register: rule

    - debug: msg="{{ rule }}"
expected result
~ # ufw status
Status: active

To                         Action      From
--                         ------      ----              
80/tcp                     ALLOW       Anywhere                   # allow http trafic
@ansibot

This comment has been minimized.

Show comment
Hide comment
@ansibot

ansibot May 24, 2017

Contributor

The test ansible-test sanity --test validate-modules failed with the following error:

lib/ansible/modules/system/ufw.py:0:0: E309 version_added for new option (comment) should be 2.4. Currently 0.0

click here for bot help

Contributor

ansibot commented May 24, 2017

The test ansible-test sanity --test validate-modules failed with the following error:

lib/ansible/modules/system/ufw.py:0:0: E309 version_added for new option (comment) should be 2.4. Currently 0.0

click here for bot help

@ansibot

This comment has been minimized.

Show comment
Hide comment
@ansibot
Contributor

ansibot commented May 24, 2017

@ovcharenko

This comment has been minimized.

Show comment
Hide comment
@ovcharenko

ovcharenko May 24, 2017

Contributor

duplicate_of #21297
resolved_by_pr #21604

Contributor

ovcharenko commented May 24, 2017

duplicate_of #21297
resolved_by_pr #21604

@ansibot ansibot closed this May 24, 2017

@bcoca bcoca removed the needs_triage label May 31, 2017

@ansibot ansibot added feature and removed feature_pull_request labels Mar 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment