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

Fix acceptance tests & run on vagrant_libvirt #392

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bastelfreak
Copy link
Member

this is a resubmission of #390 but with voxpupuli/gha-puppet#60

@bastelfreak bastelfreak closed this Aug 3, 2024
@bastelfreak bastelfreak reopened this Aug 3, 2024
@bastelfreak bastelfreak force-pushed the fix/acceptance-tests branch 14 times, most recently from 2512cb8 to 3e86777 Compare August 3, 2024 17:55
@bastelfreak bastelfreak force-pushed the fix/acceptance-tests branch 2 times, most recently from 1ad49a5 to 2e1be74 Compare August 9, 2024 09:53
bastelfreak added a commit to bastelfreak/modulesync_config that referenced this pull request Aug 9, 2024
@bastelfreak bastelfreak changed the title Fix/acceptance tests Fix acceptance tests & run on vagrant_libvirt Aug 9, 2024
@bastelfreak bastelfreak added the enhancement New feature or request label Aug 9, 2024
<<-EOS
class { 'selinux': mode => 'disabled' }
EOS
end

context 'before reboot' do
before(:all) do
# Tag vagrant user to an administrative group
shell('semanage login -a -s staff_u vagrant')
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this okay for running elsewhere and the vagrant user might not exist ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know enough about it. I think the vagrant user is default for vagrant boxes?

Copy link
Member

Choose a reason for hiding this comment

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

There's host['user'] so I think this would ensure the correct user is used:

Suggested change
shell('semanage login -a -s staff_u vagrant')
block_on hosts do |host|
on host, "semanage login -a -s staff_u #{host['user']}"
end

I get the impression the rest is all single node, so this is probably the equivalent

Suggested change
shell('semanage login -a -s staff_u vagrant')
shell("semanage login -a -s staff_u #{default['user']}")

Choose a reason for hiding this comment

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

The vagrant user should be in every vagrant box published, vagrant docs. I am happy either way, if a more general fix works we can do that, or any box published should have that user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants