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

Added ansible modules, task level parameters and commands #82

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

Conversation

IPvSean
Copy link

@IPvSean IPvSean commented Jun 14, 2019

Summary of PR
finally got this working and not crashing on my own laptop, suggest testing on my fork before merging. In the future I will try to auto-generate all the directives rather than have a static file containing them all.

Development Environment
works on my macOS 10.14.5 in Chrome Version 74.0.3729.169 (Official Build) (64-bit)

Issues

  • static commands for now, need to autogenerate this
  • no bonus commands (there is not enough room on the screen with the current mechanism, we would have to replace another category like HTML or something, suggestion is to wait until someone adds a sixth category?

@mwcz
Copy link
Member

mwcz commented Jun 14, 2019

Cool, thanks for the PR! I'll try to give it a spin soon.

Screen real estate is definitely a problem. One solution we've talked about is asking players to pick a language category before they play. We opted out of that in the current version because we wanted to minimize the number of steps before play begins (there are already a lot of text instructions to digest). But I think we need to bite that bullet so that more language categories can be added. Like this one!

@cidrblock
Copy link

Can't wait to play this.

@mwcz
Copy link
Member

mwcz commented Jun 17, 2019

Hm, had another idea for how to handle having too many languages. We could un-feature one of the current languages and put Ansible in its place. My vote would be for Python since in my experience it's the least used (FTR I love python). We would leave it in the codebase, but simply deactivate it until the "choose your language" feature is implemented.

How does that sound?

@IPvSean
Copy link
Author

IPvSean commented Jun 17, 2019

Hm, had another idea for how to handle having too many languages. We could un-feature one of the current languages and put Ansible in its place. My vote would be for Python since in my experience it's the least used (FTR I love python). We would leave it in the codebase, but simply deactivate it until the "choose your language" feature is implemented.

How does that sound?

I am not opposed to featuring Ansible, but I do marketing for Ansible :)

I am fine with that as a temporary fix. Do you want me to fix the PR, or just merge this and add that separately?

I am also thinking about what you said earlier->

One solution we've talked about is asking players to pick a language category before they play.
Maybe a "persona" instead of a category? But I would be fine either way. Like if someone is a "web developer" they probably know JS, html and Python. If someone is a System Administrator, they might know bash, ansible and some python or something. If someone is a network engineer they would know ansible, but I could add like cli commands for something like open source FRR (which is similar to Arista and Cisco). This would maybe work really well at conferences where we have mixed personas (developers, operators, etc). Just thinking out loud though... it might make more sense to allow someone to choose their "top 4" out of the X amount of languages/commands we provide.

@mwcz
Copy link
Member

mwcz commented Jun 17, 2019

Oooh, that's what I'm talking about. I like the persona idea very much.

For this PR, I think de-featuring Python in favor of Ansible is the best move. Then, later, we can revive Python to its current and soon-to-be-former glory.

@mwcz
Copy link
Member

mwcz commented Aug 15, 2019

@IPvSean I finally gave this a try. Sorry for the delay. Could you add some ansible commands to the commonCmds array? Without that, no bonus commands can be assigned to ansible.

@IPvSean
Copy link
Author

IPvSean commented Aug 15, 2019 via email

@mwcz
Copy link
Member

mwcz commented Aug 16, 2019

Nah, commonCmds are used when selecting random bonus commands. In bash, for instance, there are a lot of really obscure, esoteric commands like foomatic-printermap-to-gutenprint-xml and we didn't want to present a selection of bonus commands made entirely of obscure commands. So, commonCmds was created to hold a list of each lang's commands which are common and familiar. The bonus command algorithm selects two commands from commonCmds, and one from cmds. bash.js for example has ls, cd, mv, etc as common commands.

It's entirely up to you what goes into commonCmds for Ansible. I would rely on your expertise to select some common, familiar ones. Number doesn't matter, but 10-20 is a good amount.

By the way, although I haven't merged this branch yet, I did include it in the clh-bash build that's currently on its way to VMworld and Open Source Summit! Players are both confs will get to play with ansible commands. 🥂 To make it work I took my best guess at commonCmds for Ansbile:

    commonCmds: [
        "ansible",
        "acl",
        "apk",
        "apt",
        "at",
        "assert",
        "copy",
        "cron",
        "debug",
        "dnf",
        "loop",
        "name",
        "when",
        "yum",
        "user",
        "setup"
    ],

@IPvSean
Copy link
Author

IPvSean commented Aug 20, 2019

hey @mwcz sorry for delay, getting carpel tunnel surgery, so much fun :) does this look good now?

@IPvSean
Copy link
Author

IPvSean commented Sep 3, 2019

is this good @mwcz

@davidjonas
Copy link

Hi guys,

just checking the repo after having it sit on my bookmarks for a while since I heard the podcast.
What a fun project, the game is great! harder then it seems!!

I have a suggestion on this issue:

  • Instead of having to exclude some languages or have an extra selection (more steps). You could also randomize the categories/languages that get bonus commands, so every time you play you will get 4 different categories that give you bonus. you might be lucky they are the languages you are comfortable with :)

  • I also really like the idea of the persona but I would do it reversed. When you finish the game, instead of just the high score, you will get a "Persona Badge". example: If you get a lot of HTML and Javascript, commands you get "Web Guru". If you get plenty of bash, python, Ansible you could get "SysAdmin God" etc...

Hope this helps! :)

@mwcz
Copy link
Member

mwcz commented Sep 16, 2020

Thanks @davidjonas! You seem to have made your comment in response to a pull request adding Ansible commands to the game. Can you open a new issue with your comments instead? I'd love to discuss them, just not on this PR. :)

@davidjonas
Copy link

@mwcz I've opened #86 for this. Sorry to originally post it here, it was because it concerned the discussion you guys were having here and offered possible solutions to improve and merge this PR. But indeed it is better to open a new issue and mention the PR.

Cheers!!

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.

4 participants