Github user dlyle65535 commented on the pull request:
https://github.com/apache/incubator-metron/pull/96#issuecomment-215959703
tl;dr I'm -1 on a small piece of this changeset, see below for why.
Looking over this PR, it seems to be an aggregation of 4 JIRAs, METRON-122,
METRON-91 (expose tags) and 2 new JIRAs, one for Bluecoat and 1 to fix the
enrichment topology.
It's a bummer because I'm +1 on everything but how exposing tags/skip_tags
was handled. So although everything else looks great, I have to be -1 on the
whole changeset.
I'm -1 on that because it operates outside of the Vagrant paradigm and
requires the user to enter the Vagrant password. Here's a more vagrantish
solution:
Add:
```
require 'getoptlong'
opts = GetoptLong.new(
[ '--ansible-tags', GetoptLong::OPTIONAL_ARGUMENT ],
[ '--ansible-skip-tags', GetoptLong::OPTIONAL_ARGUMENT ]
)
ansibleTags=''
ansibleSkipTags=''
opts.each do |opt, arg|
case opt
when '--ansible-tags'
ansibleTags=arg
when '--ansible-skip-tags'
ansibleSkipTags=arg
end
end
puts " Running with ansible-tags: " + ansibleTags.split(",").to_s if
ansibleTags != ''
puts " Running with ansible-skip-tags: " + ansibleSkipTags.split(",").to_s
if ansibleSkipTags != ''
```
To the top of the Vagrantfile (under the license).
Then make the config loop look like this:
```
# provisioning
config.vm.provision :ansible do |ansible|
ansible.playbook = "../../playbooks/metron_full_install.yml"
ansible.sudo = true
ansible.tags = ansibleTags.split(",") if ansibleTags != ''
ansible.skip_tags = ansibleSkipTags.split(",") if ansibleSkipTags != ''
ansible.inventory_path = "../../inventory/singlenode-vagrant"
end
```
That should (we'd have to test it) allow us to remove the new ansible.cfg
unless you wanted to keep the custom control_path. You could also get rid of
run_ansible_role.sh and run_enrichment_role.sh (it would be ``` vagrant
--ansible-tags=enrichment provsion ``` )
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---