Skip to content

Instantly share code, notes, and snippets.

@sshnaidm
Last active May 25, 2019 13:38
Show Gist options
  • Save sshnaidm/092ead17ea4b5204586ad3e16a2f3bc3 to your computer and use it in GitHub Desktop.
Save sshnaidm/092ead17ea4b5204586ad3e16a2f3bc3 to your computer and use it in GitHub Desktop.
for medium
- hosts: all
gather_facts: false
tasks:
- name: Install packages
become: true
package:
name:
- samba
- httpd
- nano
- ruby
state: present
- name: Install pip modules
become: true
pip:
name:
- pytest-split-tests
- bottle
- pep8
- flask
state: present
[defaults]
strategy = mitogen_linear
strategy_plugins = /usr/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy
export ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy
export ANSIBLE_STRATEGY=mitogen_linear
Display the source blob
Display the rendered blob
Raw
<?xml version='1.0' encoding='utf-8'?>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" class="pygal-chart" id="chart-261af807-bf05-4979-8161-ed3c48cda9fa" viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg"><!--Generated with pygal 2.4.0 (etree) ©Kozea 2012-2016 on 2019-05-24--><!--http://pygal.org--><!--http://github.com/Kozea/pygal--><defs><style type="text/css">#chart-261af807-bf05-4979-8161-ed3c48cda9fa{-webkit-user-select:none;-webkit-font-smoothing:antialiased;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .title{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:16px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .legends .legend text{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:14px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis text{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:10px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis text.major{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:10px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .text-overlay text.value{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:16px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .text-overlay text.label{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:10px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:14px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa text.no_data{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:64px}
#chart-261af807-bf05-4979-8161-ed3c48cda9fa{background-color:rgba(249,249,249,1)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa path,#chart-261af807-bf05-4979-8161-ed3c48cda9fa line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa rect,#chart-261af807-bf05-4979-8161-ed3c48cda9fa circle{-webkit-transition:400ms ease-in;-moz-transition:400ms ease-in;transition:400ms ease-in}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .graph &gt; .background{fill:rgba(249,249,249,1)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .plot &gt; .background{fill:rgba(255,255,255,1)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .graph{fill:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa text.no_data{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .title{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .legends .legend text{fill:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .legends .legend:hover text{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .line{stroke:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .guide.line{stroke:#630C0D}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .major.line{stroke:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis text.major{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y .guides:hover .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .line-graph .axis.x .guides:hover .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .stackedline-graph .axis.x .guides:hover .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .xy-graph .axis.x .guides:hover .guide.line{stroke:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .guides:hover text{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .reactive{fill-opacity:.6;stroke-opacity:.8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .ci{stroke:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .reactive.active,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .active .reactive{fill-opacity:.9;stroke-opacity:.9;stroke-width:4}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .ci .reactive.active{stroke-width:1.5}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .series text{fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip rect{fill:rgba(255,255,255,1);stroke:#53A0E8;-webkit-transition:opacity 400ms ease-in;-moz-transition:opacity 400ms ease-in;transition:opacity 400ms ease-in}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .label{fill:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .label{fill:rgba(0,0,0,.87)}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .legend{font-size:.8em;fill:#630C0D}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .x_label{font-size:.6em;fill:#53A0E8}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .xlink{font-size:.5em;text-decoration:underline}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip .value{font-size:1.5em}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .bound{font-size:.5em}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .max-value{font-size:.75em;fill:#630C0D}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .map-element{fill:rgba(255,255,255,1);stroke:#630C0D !important}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .map-element .reactive{fill-opacity:inherit;stroke-opacity:inherit}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .color-0,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .color-0 a:visited{stroke:#f6983a;fill:#f6983a}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .color-1,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .color-1 a:visited{stroke:#5160f9;fill:#5160f9}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .text-overlay .color-0 text{fill:black}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .text-overlay .color-1 text{fill:black}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .series{stroke-width:3;stroke-linejoin:round;stroke-linecap:round}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .series.serie-0{stroke-width:3;stroke-linejoin:round;stroke-linecap:round}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .series.serie-1{stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
#chart-261af807-bf05-4979-8161-ed3c48cda9fa text.no_data{text-anchor:middle}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .guide.line{fill:none}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .centered{text-anchor:middle}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .title{text-anchor:middle}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .legends .legend text{fill-opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.x text{text-anchor:middle}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.x:not(.web) text[transform]{text-anchor:start}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.x:not(.web) text[transform].backwards{text-anchor:end}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y text{text-anchor:end}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y text[transform].backwards{text-anchor:start}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y2 text{text-anchor:start}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y2 text[transform].backwards{text-anchor:end}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .guide.line{stroke-dasharray:4,4}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .major.guide.line{stroke-dasharray:6,6}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .horizontal .axis.y .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .horizontal .axis.y2 .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .vertical .axis.x .guide.line{opacity:0}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .horizontal .axis.always_show .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .vertical .axis.always_show .guide.line{opacity:1 !important}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y .guides:hover .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.y2 .guides:hover .guide.line,#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis.x .guides:hover .guide.line{opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .axis .guides:hover text{opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .nofill{fill:none}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .subtle-fill{fill-opacity:.2}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .dot{stroke-width:1px;fill-opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .dot.active{stroke-width:5px}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .dot.negative{fill:transparent}#chart-261af807-bf05-4979-8161-ed3c48cda9fa text,#chart-261af807-bf05-4979-8161-ed3c48cda9fa tspan{stroke:none !important}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .series text.active{opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip rect{fill-opacity:.95;stroke-width:.5}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .tooltip text{fill-opacity:1}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .showable{visibility:hidden}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .showable.shown{visibility:visible}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .gauge-background{fill:rgba(229,229,229,1);stroke:none}#chart-261af807-bf05-4979-8161-ed3c48cda9fa .bg-lines{stroke:rgba(249,249,249,1);stroke-width:2px}</style><script type="text/javascript">window.pygal = window.pygal || {};window.pygal.config = window.pygal.config || {};window.pygal.config['261af807-bf05-4979-8161-ed3c48cda9fa'] = {"allow_interruptions": false, "box_mode": "extremes", "classes": ["pygal-chart"], "css": ["file://style.css", "file://graph.css"], "defs": [], "disable_xml_declaration": false, "dots_size": 2.5, "dynamic_print_values": false, "explicit_size": false, "fill": false, "force_uri_protocol": "https", "formatter": null, "half_pie": false, "height": 600, "include_x_axis": false, "inner_radius": 0, "interpolate": null, "interpolation_parameters": {}, "interpolation_precision": 250, "inverse_y_axis": false, "js": ["//kozea.github.io/pygal.js/2.0.x/pygal-tooltips.min.js"], "legend_at_bottom": false, "legend_at_bottom_columns": null, "legend_box_size": 12, "logarithmic": false, "margin": 20, "margin_bottom": null, "margin_left": null, "margin_right": null, "margin_top": null, "max_scale": 16, "min_scale": 4, "missing_value_fill_truncation": "x", "no_data_text": "No data", "no_prefix": false, "order_min": null, "pretty_print": false, "print_labels": false, "print_values": false, "print_values_position": "center", "print_zeroes": true, "range": null, "rounded_bars": null, "secondary_range": null, "show_dots": false, "show_legend": true, "show_minor_x_labels": true, "show_minor_y_labels": true, "show_only_major_dots": false, "show_x_guides": false, "show_x_labels": true, "show_y_guides": true, "show_y_labels": true, "spacing": 10, "stack_from_top": false, "strict": false, "stroke": true, "stroke_style": {"width": 3, "linecap": "round", "linejoin": "round"}, "style": {"background": "rgba(249, 249, 249, 1)", "ci_colors": [], "colors": ["#f6983a", "#5160f9"], "font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "foreground": "rgba(0, 0, 0, .87)", "foreground_strong": "#53A0E8", "foreground_subtle": "#630C0D", "guide_stroke_dasharray": "4,4", "label_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "label_font_size": 10, "legend_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "legend_font_size": 14, "major_guide_stroke_dasharray": "6,6", "major_label_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "major_label_font_size": 10, "no_data_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "no_data_font_size": 64, "opacity": ".6", "opacity_hover": ".9", "plot_background": "rgba(255, 255, 255, 1)", "stroke_opacity": ".8", "stroke_opacity_hover": ".9", "title_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "title_font_size": 16, "tooltip_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "tooltip_font_size": 14, "transition": "400ms ease-in", "value_background": "rgba(229, 229, 229, 1)", "value_colors": [], "value_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "value_font_size": 16, "value_label_font_family": "Consolas, \"Liberation Mono\", Menlo, Courier, monospace", "value_label_font_size": 10}, "title": "Ansible-Mitogen test", "tooltip_border_radius": 0, "tooltip_fancy_mode": true, "truncate_label": null, "truncate_legend": null, "width": 800, "x_label_rotation": 0, "x_labels": ["1", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"], "x_labels_major": null, "x_labels_major_count": null, "x_labels_major_every": null, "x_title": "Files", "xrange": null, "y_label_rotation": 0, "y_labels": null, "y_labels_major": null, "y_labels_major_count": null, "y_labels_major_every": null, "y_title": "Seconds", "zero": 0, "legends": ["Mitogen", "Pure Ansible"]}</script><script type="text/javascript" xlink:href="https://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.min.js" /></defs><title>Ansible-Mitogen test</title><g class="graph line-graph vertical"><rect class="background" height="600" width="800" x="0" y="0" /><g class="plot" transform="translate(190, 46)"><rect class="background" height="488" width="589.2" x="0" y="0" /><g class="axis y always_show"><path class="line" d="M0.000000 488.000000 h589.200000" /><g class="guides"><path class="guide line" d="M0.000000 407.305185 h589.200000" /><text class="" x="-5" y="410.80518538065706">10</text><title>10</title></g><g class="guides"><path class="guide line" d="M0.000000 326.819633 h589.200000" /><text class="" x="-5" y="330.3196331969917">20</text><title>20</title></g><g class="guides"><path class="guide line" d="M0.000000 246.334081 h589.200000" /><text class="" x="-5" y="249.83408101332628">30</text><title>30</title></g><g class="guides"><path class="guide line" d="M0.000000 165.848529 h589.200000" /><text class="" x="-5" y="169.34852882966084">40</text><title>40</title></g><g class="guides"><path class="major guide line" d="M0.000000 85.362977 h589.200000" /><text class="major" x="-5" y="88.86297664599545">50</text><title>50</title></g></g><g class="axis x"><g class="guides"><path class="line" d="M11.330769 0.000000 v488.000000" /><text class="" x="11.330769230769231" y="503.0">1</text></g><g class="guides"><path class="guide line" d="M67.984615 0.000000 v488.000000" /><text class="" x="67.9846153846154" y="503.0">10</text></g><g class="guides"><path class="guide line" d="M124.638462 0.000000 v488.000000" /><text class="" x="124.63846153846156" y="503.0">20</text></g><g class="guides"><path class="guide line" d="M181.292308 0.000000 v488.000000" /><text class="" x="181.2923076923077" y="503.0">30</text></g><g class="guides"><path class="guide line" d="M237.946154 0.000000 v488.000000" /><text class="" x="237.9461538461539" y="503.0">40</text></g><g class="guides"><path class="guide line" d="M294.600000 0.000000 v488.000000" /><text class="" x="294.6" y="503.0">50</text></g><g class="guides"><path class="guide line" d="M351.253846 0.000000 v488.000000" /><text class="" x="351.25384615384615" y="503.0">60</text></g><g class="guides"><path class="guide line" d="M407.907692 0.000000 v488.000000" /><text class="" x="407.9076923076923" y="503.0">70</text></g><g class="guides"><path class="guide line" d="M464.561538 0.000000 v488.000000" /><text class="" x="464.56153846153853" y="503.0">80</text></g><g class="guides"><path class="guide line" d="M521.215385 0.000000 v488.000000" /><text class="" x="521.2153846153847" y="503.0">90</text></g><g class="guides"><path class="guide line" d="M577.869231 0.000000 v488.000000" /><text class="" x="577.8692307692307" y="503.0">100</text></g></g><g class="series serie-0 color-0"><path class="line reactive nofill" d="M11.330769 474.993535 L67.984615 473.866737 124.638462 472.176540 181.292308 471.049743 237.946154 467.025465 294.600000 467.427893 351.253846 466.864494 407.907692 461.954875 464.561538 455.677002 521.215385 453.825835 577.869231 450.364956" /></g><g class="series serie-1 color-1"><path class="line reactive nofill" d="M11.330769 478.615385 L67.984615 431.611822 124.638462 376.237762 181.292308 314.183402 237.946154 260.338567 294.600000 170.838633 351.253846 130.837314 407.907692 142.024805 464.561538 99.286977 521.215385 63.551392 577.869231 9.384615" /></g></g><g class="titles"><text class="title plot_title" x="400.0" y="26">Ansible-Mitogen test</text><text class="title" x="485.4" y="580">Files</text><text class="title" transform="rotate(-90 122.800000 290.000000)" x="122.79999999999998" y="316.0">Seconds</text></g><g class="plot overlay" transform="translate(190, 46)"><g class="series serie-0 color-0" /><g class="series serie-1 color-1" /></g><g class="plot text-overlay" transform="translate(190, 46)"><g class="series serie-0 color-0" /><g class="series serie-1 color-1" /></g><g class="plot tooltip-overlay" transform="translate(190, 46)"><g class="tooltip" style="opacity: 0" transform="translate(0 0)"><rect class="tooltip-box" height="0" rx="0" ry="0" width="0" /><g class="text" /></g></g><g class="legends" transform="translate(10, 56)"><g class="legend reactive activate-serie" id="activate-serie-0"><rect class="color-0 reactive" height="12" width="12" x="0.0" y="1.0" /><text x="17.0" y="11.2">Mitogen</text></g><g class="legend reactive activate-serie" id="activate-serie-1"><rect class="color-1 reactive" height="12" width="12" x="0.0" y="22.0" /><text x="17.0" y="32.2">Pure Ansible</text></g></g><g class="legends" transform="translate(790, 56)" /></g></svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
alias pure-ansible-playbook='$(pwd)/pure_ansible/bin/ansible-playbook'
alias mitogen-ansible-playbook='ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy:$(pwd)/mitogen_ansible/lib/python3.7/site-packages/ansible_mitogen/plugins/strategy ANSIBLE_STRATEGY=mitogen_linear $(pwd)/mitogen_ansible/bin/ansible-playbook'
pip install mitogen
- hosts: all
gather_facts: false
tasks:
- name: Create files with copy content module
copy:
content: |
test file {{ item }}
dest: ~/file_{{item}}
with_sequence: start=1 end={{ n }}
time mitogen-ansible-playbook file_creation.yml -i hosts -e n=10 &>/dev/null
real 0m2.603s
user 0m1.152s
sys 0m0.096s
time pure-ansible-playbook file_creation.yml -i hosts -e n=10 &>/dev/null
real 0m5.908s
user 0m1.745s
sys 0m0.643s
time pure-ansible-playbook file_creation.yml -i hosts -e n=100 &>/dev/null
real 0m51.775s
user 0m8.039s
sys 0m6.305s
time mitogen-ansible-playbook file_creation.yml -i hosts -e n=100 &>/dev/null
real 0m4.331s
user 0m1.903s
sys 0m0.197s
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment