[go: nahoru, domu]

Skip to content
View oskaralmlov's full-sized avatar
🚧
🚧
Block or Report

Block or report oskaralmlov

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. ansible-args-keyword ansible-args-keyword
    1
    Most Ansible users have come across the `args` keyword when using the `ansible.builtin.command` module. In this case the `args` keyword is used to pass a named parameter such as `chdir` or `creates` to the module that accepts a "free form" parameter.
    2
    
                  
    3
    Example:
    4
    
                  
    5
        - ansible.builtin.command: touch filename #Run this command
  2. Jinja filtering for Ansible users Jinja filtering for Ansible users
    1
    I frequent the r/ansible sub and try to help out and answer as many questions as I can. One area that I see most people struggling with is using some of the more advanced jinja filters such as `select`, `selectattr` and `map`.
    2
    In this post I will try to give some easy to understand examples of how to use these filters in order to filter lists and dictionaries in your Ansible playbooks.
    3
                                                                                                                            
    4
    ### What are tests?                                                                                                     
    5
    In jinja a test is a template expression that evaluates to either `True` or `False`.                                    
  3. ansible_style_guide.md ansible_style_guide.md
    1
    # Ansible style guide
    2
    A list of best practises and style choices that I think are good for writing clean and consistent Ansible.
    3
    
                  
    4
    #### Prefix global variables with the organisation / company name
    5
    This makes it easy to differentiate between a "global" variable and a playbook/role variable.
  4. python-ansible-inventory-example.py python-ansible-inventory-example.py
    1
    from ansible.cli import CLI
    2
    from ansible.template import Templar
    3
    from ansible.vars.manager import VariableManager
    4
    from ansible.parsing.dataloader import DataLoader
    5
    from ansible.inventory.manager import InventoryManager