Skip to content
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

Ensure ip_forward when deploying with th role. Closes #159 #4

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions tasks/configure.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tasks/system/forwarding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
sysctl_set: true
state: present
reload: true
when: not lookup('env', 'IN_MOLECULE') | d(true, true) | bool
when: not ( lookup('env', 'IN_MOLECULE') ) | d(true, true) ) | bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you get to try this? It gives me an error:

FAILED! => {"msg": "The conditional check 'not ( lookup('env', 'IN_MOLECULE') ) | d(true, true) ) | bool' failed. The error was: template error while templating string: unexpected ')'.

There is a parenthesis to spare

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it was a typing error, and the intention was to leave it as below (line 20)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reaching the same conclusion, I see that you had already solved it and commented here

The correct way for it to work in both scenarios (normal and molecule test) is:

when: not lookup('env', 'IN_MOLECULE') | d(false, true) | bool

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, It was a failed commit. Fix hereafter. Maybe we can stash commits for merge.


- name: Set IPv6 forwarding in the sysctl file and reload if necessary
sysctl:
Expand All @@ -17,5 +17,5 @@
state: present
reload: true
when:
not lookup('env', 'IN_MOLECULE') | d(true, true) | bool
not ( lookup('env', 'IN_MOLECULE') | d(true, true) ) | bool
and openvpn_ipv6_server is defined