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

Ansible 2.0 support #59

Merged
merged 4 commits into from
Mar 6, 2016
Merged

Ansible 2.0 support #59

merged 4 commits into from
Mar 6, 2016

Conversation

rndmh3ro
Copy link
Member

This role was tested with Ansible 2.0

@rndmh3ro
Copy link
Member Author

The test fails because of this new behaviour:
ansible/ansible#11964

I will take a look on how to fix this.

@rndmh3ro
Copy link
Member Author

This can be merged after #63

@conorsch
Copy link
Contributor

conorsch commented Feb 1, 2016

#63 is merged, so we should be good here. You could also create an additional suite: that changes the Ansible version number, so the local test-kitchen runs test against both hosts—but that would be default double the number of test runs.

Looks like Travis is defaulting to the newest release of Ansible at all times, which should give decent warning about breakage.

@rndmh3ro
Copy link
Member Author

rndmh3ro commented Feb 2, 2016

Sounds like a really good plan! I'll add that, and maybe try it with travis, too.

@chris-rock
Copy link
Member

@rndmh3ro Should we test with Ansible 1.9 and Ansible 2.0? We could easily use multiple kitchen files. Within travis we can then prefix with KITCHEN_YAML=.kitchen.ansible19.yml b kitchen test

@chris-rock
Copy link
Member

I also like the approach from @conorsch where we overwrite the ansible version in yml for the specific suite. +1 for that solution

This role was tested with Ansible 2.0
@conorsch
Copy link
Contributor

@chris-rock Something like this would do the trick:

diff --git a/.kitchen.yml b/.kitchen.yml                                               
index cbb76f5..889be0b 100644                                                          
--- a/.kitchen.yml                                                                     
+++ b/.kitchen.yml                                                                     
@@ -52,7 +52,16 @@ suites:                                                             
 - name: default                                                                       
   hosts: all                                                                          
   ansible_verbose: true                                                               
-  ansible_version: 1.9.2                                                              
+  ansible_version: 2.0.0.2                                                            
+  ansible_diff: true                                                                  
+  roles_path: ../ansible-os-hardening/                                                
+  provisioner:                                                                        
+    playbook: test/integration/playbooks/default.yml                                  
+                                                                                      
+- name: ansible-v1                                                                    
+  hosts: all                                                                          
+  ansible_verbose: true                                                               
+  ansible_version: 1.9.4                                                                      
   ansible_diff: true                                                                          
   roles_path: ../ansible-os-hardening/                                                        
   provisioner: 

@rndmh3ro
Copy link
Member Author

Yes, I'm going to implement this. Also in travis.

@chris-rock
Copy link
Member

@conorsch yes, this is a very good approach!

@chris-rock
Copy link
Member

Thanks @rndmh3ro and @conorsch !

chris-rock added a commit that referenced this pull request Mar 6, 2016
@chris-rock chris-rock merged commit 002ad0c into master Mar 6, 2016
@chris-rock chris-rock deleted the ansible_2.0 branch March 6, 2016 11:28
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants