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

Add travis-support #17

Merged
merged 8 commits into from
Jun 17, 2015
Merged

Add travis-support #17

merged 8 commits into from
Jun 17, 2015

Conversation

rndmh3ro
Copy link
Member

@rndmh3ro rndmh3ro commented Jun 2, 2015

No description provided.

@chris-rock
Copy link
Member

looks like we should not disable ipv6 for travis test

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Jun 3, 2015

We have to merge #16 first, then travis should work.

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Jun 3, 2015

Build is still failing, this time because of insufficent permissions:

error: permission denied on key 'net.ipv4.tcp_timestamps'

My plan is to add to the failing task(s) a tag (e.g. travis_skip) and then skip this tag when travis runs:

- ansible-playbook --sudo -v --diff spec/travis.yml -e os_network_ipv6_enable=true --skip-tags=travis_skip

@chris-rock
Copy link
Member

cant we write all options into travis.yml. then everything would be in one place. otherwise we mix the implementation with specific edge cases

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Jun 8, 2015

To skip single tasks you have to specify tags and then use the skip-tags-option.
Now we could give each of the included task-files a tag and skip the sysctl-tasks:
In tasks/main.yml

- include: suid_sgid.yml
- include: sysctl.yml tags=sysctl

In .travis.yml:

script:
  - ansible-playbook --syntax-check spec/travis.yml
  - ansible-playbook --sudo -v --diff spec/travis.yml -e os_network_ipv6_enable=true --skip-tags=sysctl

Or we could use conditionals on all problematic tasks and evaluate them to false just like here:

  - ansible-playbook --sudo -v --diff spec/travis.yml -e os_network_ipv6_enable=true

But then we could not use #20.

@chris-rock
Copy link
Member

@rndmh3ro Thanks for pointing this out. I definitely like #20. Instead of skipping complete tasks, we could also overwrite the parameter values and switch back to os defaults for travis playbook for required parameters: https://docs.ansible.com/playbooks_variables.html#variables-defined-in-a-playbook

What do you think?

@rndmh3ro
Copy link
Member Author

I cannot get it to work. Even though when a sysctl-variable doesn't get changed, traivis throws errors at me.
How do the puppet and chef implementations pass? They should also be getting a permission denied and fail, if I'm correct.

@chris-rock
Copy link
Member

we do not use travis vms for applying hardening, instead we opt in for a separate jenkins setup

@rndmh3ro
Copy link
Member Author

Then, I'd say we exclude the sysctl-tasks from travis. I can confirm that it works locally. Nonetheless all other tasks should work with travis!

@chris-rock
Copy link
Member

amazing. let's do this

@rndmh3ro
Copy link
Member Author

I think this is ready for merging now, @chris-rock. Would be great if you could do it.

@chris-rock
Copy link
Member

amazing work @rndmh3ro

@chris-rock
Copy link
Member

I rebased the branch on master. If this goes through, I'll merge.

@chris-rock
Copy link
Member

@rndmh3ro Could you have a look, what is going wrong?

chris-rock added a commit that referenced this pull request Jun 17, 2015
@chris-rock chris-rock merged commit e4fcace into master Jun 17, 2015
@chris-rock chris-rock deleted the travis branch June 17, 2015 18:57
@chris-rock
Copy link
Member

Thank you very much. As I said, amazing work!

rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants