Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cybette/97effa3dd0b59af546845072d3c3a671 to your computer and use it in GitHub Desktop.
Save cybette/97effa3dd0b59af546845072d3c3a671 to your computer and use it in GitHub Desktop.
Q&A log from Ansible Contributor Summit Day 1, October 12, 2020
EVENT NAME: Ansible Contributor Summit - New Contributor Workshops
EVENT DATE: MONDAY, 12 OCTOBER, 2020 - 10:00 AM to 05:00 PM
Posted Questions
[10:18 AM]
Himadri Ganguly asked : How can we start contributing to this awesome project? This is the first time I am joining the conference and very excited to learn from others.
17 upvotes | 1 answer | 1 reply
Sandra McCann answered -
Check out https://docs.ansible.com/ansible/latest/community/index.html for some ideas on contributing and getting involved.
Himadri Ganguly replied -
Thank you @Sandra McCann
[10:20 AM]
Abhijeet Kasurde asked : Himadri, You can start contributing by documentation, tests and actual code
you can join this dashboard -
https://github.com/ansible/community/issues/437
8 upvotes | 1 answer | 0 reply
Gundalow answered -
answered
[10:17 AM]
Stefan Kwiatkowski asked : Can Ansible manage things on an Arduino device ? wish to install exact Libraries on it.
7 upvotes | 3 answers | 1 reply
Gundalow answered -
You can use Ansible to manage the image that the Arduino runs
James Cammarata answered -
I also answered this in chat:
I always tell people, if you can talk to something remotely you can manage it with ansible. It doesn't have to be SSH, you can write a custom connection plugin to talk via any available API
Stefan Kwiatkowski replied -
Is there a Repository of things people have tried - think it's called Galaxy or something ?
James Cammarata answered -
Yes galaxy.ansible.com
[10:29 AM]
Manuel Martins asked : Is there any platform to train ansible skills?
6 upvotes | 3 answers | 0 reply
Sorin Sbarnea answered -
I call it ::1 or localhost
Tadej Borovsak answered -
I think Red Hat is offering a certification for Ansible. I do not have a link handy right now, but your favourite search engine should return something.
Sandra McCann answered -
There's also a few things up on katecoda - https://katacoda.com/rhel-labs/
[10:23 AM]
Joel Samaroo asked : Is this community only for ansible engine, or also for awx project?
5 upvotes | 1 answer | 0 reply
Carol Chen answered -
It's for engine, collections, awx, galaxy, molecule, ansible-lint, etc.
[10:27 AM]
Joel Samaroo asked : I would suggest new developers to look into using the Visual Studio Code IDE with YAML plugin when developing playbooks. There is helpful keyword and syntax highlighting capabilities as the plugin was developed by Red Hat ~I think
5 upvotes | 1 answer | 0 reply
Gundalow answered -
https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html has some details
[10:23 AM]
Srinivasa Nagaraja asked : Can Ansible Manage the Infrastructure in an idemopotent way, so that the infrastructure meets the way described through code. The main reason asking for this question is if it's agent less , how it knows the state of the end system.
Thanks
Srini
4 upvotes | 2 answers | 0 reply
Tadej Borovsak answered -
Ansible can enforce the desired state. Id does this by first query the current state of the system and then apply any required fixes.
Sorin Sbarnea answered -
YES, especially if you use it right way.
[10:25 AM]
Yasir Elsharif asked : With the huge number of playbooks on either GitHub or ansible galaxy:
1- is there a tool to inspect the playbooks by best practices and so on.
2- is there a visualization tool like the ones in OpenStack heat visualization.
4 upvotes | 2 answers | 2 replies
Gundalow answered -
Best practice is very subjective. There is ansible-lint.
Yasir Elsharif replied -
what about Redhat's approved collection?
Tadej Borovsak answered -
If you are talking about certified collections, they need to pass sanity tests (ansible-tests sanity).
Yasir Elsharif replied -
Thanks for answering
[10:29 AM]
Dawid Krzyszton asked : What is your experience combining together Terraform with Ansible or vice-versa?
4 upvotes | 1 answer | 1 reply
James Cammarata answered -
A lot of people use both tools in many combinations, just depends on which tool you prefer.
Dawid Krzyszton replied -
TFE per dedicated workspaces to be evoke by Tower
[10:21 AM]
Abhijeet Kasurde asked : For everyone those who are looking for easyfixes - https://github.com/ansible/ansible/issues?q=is%3Aopen+is%3Aissue+label%3Aeasyfix
3 upvotes | 1 answer | 0 reply
Gundalow answered -
answered
[10:27 AM]
Rajagopal Pasupuleti asked : http://ansible.github.io/lightbulb/decks/contributing-to-ansible.html#/
3 upvotes | 1 answer | 0 reply
Gundalow answered -
Press `s` to get the speakers notes, which has mention of details of some of the demos
[10:28 AM]
Srinivasa Nagaraja asked : How much of Python proficiency required to write playbook to maintain system admin tasks?
Thanks
Srini
3 upvotes | 2 answers | 1 reply
Tadej Borovsak answered -
If you only want to write playbooks, you do not need much python knowledge. Module documentation is all you need when starting. Python knowledge is only required if you want to extend Ansible.
Sorin Sbarnea answered -
You can become quite good with Ansible without knowing any python. In fact you can even pass certification w/o python.
Srinivasa Nagaraja replied -
thanks!!!
[10:35 AM]
Naresh Kumar Rengasamy asked : What is the best approach to debug ansible play?
3 upvotes | 5 answers | 2 replies
Abhijeet Kasurde answered -
You can use debug strategy plugin - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_strategy.html
Tadej Borovsak answered -
I usually start debugging stuff by adding a few v flags to ansible-playbook. This will print some information to console that should help pinpoint the issue.
Abhijeet Kasurde answered -
Use plenty of debug task
Naresh Kumar Rengasamy replied -
I was curious if there's something like pdb for python, debug on the go without spam of debug messages.
Naresh Kumar Rengasamy replied -
I will start using debug strategy thanks :)
Alicia Cozine answered -
Detailed docs on the debugger: https://docs.ansible.com/ansible/latest/user_guide/playbooks_debugger.html#playbook-debugger
Alicia Cozine answered -
Start-at-task and step mode might also be useful: https://docs.ansible.com/ansible/latest/user_guide/playbooks_startnstep.html
[10:53 AM]
Craig Brandt asked : Will you please run through a demo example on creating a PR for Ansible project?
3 upvotes | 1 answer | 1 reply
Carol Chen answered -
Thanks for asking! We'll see gundalow demo this live :)
Craig Brandt replied -
Thank you! Live demos are always tough. Appreciate it
[11:57 AM]
Naresh Kumar Rengasamy asked : How do we mock any third party apis that ansible modules may be integrating with.
3 upvotes | 3 answers | 1 reply
Abhijeet Kasurde answered -
Thats good question. You can check existing unit test. Ansible uses mock for mocking API data and testing against the module code.
Tadej Borovsak answered -
We use pytest + mock library. Example: https://github.com/sensu/sensu-go-ansible/blob/master/tests/unit/module_utils/test_client.py#L18
Abhijeet Kasurde answered -
For example, we test Galaxy API like https://github.com/ansible/ansible/blob/devel/test/units/galaxy/test_api.py
Naresh Kumar Rengasamy replied -
Thanks
[10:22 AM]
Miguel Tillis asked : Since Ansible is opensource how long after it's creation did it take for you all to start making money from your open source product? Also how did you first initially make money?
2 upvotes | 1 answer | 0 reply
Gundalow answered -
answered
[10:24 AM]
David Pullman asked : Would you please describe the relationship between the Ansible Community, Red Hat, AWX, and other major stakeholders?
2 upvotes | 1 answer | 1 reply
Gundalow answered -
Answered, though if you have follow up questions please ask
David Pullman replied -
Thanks John!
[10:24 AM]
Abdullah Ghani asked : i am little bit confuse between ansible inventory and ansible-playbook. When inventory use, i think in inventory we add hosts and in ansible-playbook we describe over work like roles,path,variables
2 upvotes | 2 answers | 0 reply
Tadej Borovsak answered -
Inventory is basically a list of hosts that you manage, and Ansible playbook is a description of the desired state that you would like to enforce on a subset of hosts in your inventory.
Alicia Cozine answered -
Here are some documentation links that may help:
Inventory documentation:
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
Playbooks intro: https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html
Basic concepts: https://docs.ansible.com/ansible/latest/user_guide/basic_concepts.html
[10:30 AM]
Yasmik Patel asked : What is best practice to use Ansible module for Cloud platform automation i.e to use ARM template & CloudFormation?
2 upvotes | 1 answer | 0 reply
Timothy Appnel answered -
The one best practice I highly recommend is that that you keep your provisioning tasks independent from your app deployment and orchestration tasks. This maximizes your portability to move from local to bare metal to other clouds more easily.
[10:31 AM]
James Glynn asked : Since it was touched upon in the chat, I have to ask, are there plans to standardize and make the Ansible installation easier? It honestly was probably the most painful piece of using Ansible :-)
2 upvotes | 5 answers | 1 reply
James Cammarata answered -
Which part of the installation did you have difficulty with?
James Glynn replied -
The whole of it. When I installed, it was version 2.8.2. I work with AWS, so Python 3 is required, but you can't have Python 3 as primary Linux python because of yum. There were no clear steps on ansible.com at that point of how to install it, yum install didn't work, etc. Ideally there would be yum installs for any different "flavor" that might be needed
Alicia Cozine answered -
What Linux distro are you using?
James Cammarata answered -
A lot of those difficulties should go away as py 2.7 is retired. Mostly OSes have py3 only and you don't have to juggle python like this anymore.
Timothy Appnel answered -
In the meanwhile you do have the python_interpreter variable to work with for systems where python3 isn't the default. https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html
Timothy Appnel answered -
Also https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html
[11:12 AM]
Sanjay Parmar asked : any playground where i can start ansible ? also group to get latest update ?
2 upvotes | 2 answers | 1 reply
Carol Chen answered -
Subscribe to The BullHorn: https://bit.ly/thebullhorn
Sandra McCann answered -
There's also a few things up on katecoda for ansible - https://katacoda.com/rhel-labs/
Sanjay Parmar replied -
Thanks
[11:15 AM]
Vitalii Hirenko asked : When ansible will start supporting templating multiple files withoup a loop. It takes huge amount of time when we are templating hundreds of files in a loop.
2 upvotes | 1 answer | 0 reply
Toshio Kuratomi answered -
templating uses variables which are potentially host specific. So templating a file needs to be run once for each host in the play. If you know that you are only using variables which are the same for every host, you might want to look at templating to localhost using run_once and then using the copy module to copy the generated file to the remote hosts. https://docs.ansible.com/ansible/latest/user_guide/playbooks_strategies.html#running-on-a-single-machine-with-run-once
[11:17 AM]
Naresh Kumar Rengasamy asked : Is there a good way to run a block of tasks in a loop.. current way I do is separate them out in a tasks.
yml and include it in the main play
2 upvotes | 1 answer | 1 reply
Jeff Geerling answered -
I typically do the same thing—include a tasks yaml file and use with_* or loop on it. Blocks can't be looped, so including a separate tasks file (or including a role in a loop) is the best way IMO.
Naresh Kumar Rengasamy replied -
Got it thanks.
[11:43 AM]
Rob Huelga asked : I'd like to submit unit tests for an existing module, however my unit test count numbers in the dozens and are isolated to test a single function. Can I submit the PR as a separate test_...py file or should I append them to the existing unit test file (making one very long test file)?
2 upvotes | 1 answer | 1 reply
Tadej Borovsak answered -
We usually keep out unit tests in a single file that is named after the module name. If this file would become too large, I would split the tests into one-file-per-function and place them in a subfolder named after the module.
Rob Huelga replied -
Thank you kindly, sir
[11:59 AM]
Peter Bishop asked : how can we have Ansible pull secret from another source? like Vault etc
2 upvotes | 3 answers | 1 reply
Timothy Appnel answered -
There are lookup plugins for that.
Timothy Appnel answered -
https://docs.ansible.com/ansible/latest/collections/community/general/hashi_vault_lookup.html
Peter Bishop replied -
Thanks Tim!
Timothy Appnel answered -
Also worth mentioning, there are built-in integrations in Tower that do not require lookup plugins to pull secrets from systems like HashiCorp Vault and CyberArk.
[12:00 PM]
Cynthia Rempel asked : Where would we look for projects wanting/needing tests written?
2 upvotes | 4 answers | 3 replies
Andrius Benokraitis answered -
I believe the AWS/Cloud folks could use some tests written: https://www.ansible.com/blog/getting-started-with-aws-ansible-module-development
Cynthia Rempel replied -
Thanks!
Andrius Benokraitis answered -
I would assume there are always projects that could use a hand in testing. Maybe try to find the right working group for your interests as well?
Andrius Benokraitis answered -
Do you want to do Cloud? Windows? Network? Security? Kubernetes? There's a subcommunity for all of those for example.
Cynthia Rempel replied -
Currently working on Ovirt, I'm also interested in security and kubernetes.
Gundalow answered -
Have a look in https://github.com/ansible-collections/kubernetes.core feel free to raise an issue saying you'd like to help
Cynthia Rempel replied -
Thanks! Will do :)
[12:49 PM]
R Gary Cutbill asked : It would be nice if the agenda for the rest of day could be displayed during the break.
2 upvotes | 2 answers | 0 reply
Carol Chen answered -
thanks for the suggestion, wil do!
Jeff Geerling answered -
Agenda is here, as well: https://etherpad.opendev.org/p/virtual-ansible-contributor-summit-october-2020
[10:23 AM]
Joe Ferguson asked : Is it possible to add people to this event? Can someone still register?
1 upvote | 1 answer | 1 reply
Carol Chen answered -
Yes, they can still register at https://primetime.bluejeans.com/a2m/register/qqzhsuug
Joe Ferguson replied -
Thank you!
[10:25 AM]
Abhijeet Kasurde asked : Joel, Community is for all. AWX and Ansible are all part of community
1 upvote | 1 answer | 0 reply
Gundalow answered -
answered
[10:26 AM]
Yasmik Patel asked : Can Ansible support Interactive user input?
Example:
Enter username
abc(iinput)
with some condition like default value if no value entered, password in hidden, conditional prompt ?
1 upvote | 3 answers | 1 reply
Sorin Sbarnea answered -
yes but never used in practice as works against CI/CD integration.
Yasmik Patel replied -
Can you suggest some reference?
Alicia Cozine answered -
On prompts: https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html
Alicia Cozine answered -
On providing default values: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#providing-default-values
[10:30 AM]
Lalitkumar Patil asked : Can we more enchantment with respect of API integration with Cisco DNA center Automation perceptive ?
1 upvote | 1 answer | 0 reply
Andrius Benokraitis answered -
Cisco is currently in process of building a DNA Center Collection. Feel free to reach out to them!
[10:33 AM]
Carlin Biyoo asked : What are Anisble best practice when it comes to patching Linux? And combination of tools can help achieve that goal?
1 upvote | 1 answer | 0 reply
Abhijeet Kasurde answered -
If I understand patching related to security then you can use various pre-written roles. For example https://github.com/ansible-lockdown
[10:42 AM]
Dawid Krzyszton asked : can you please post url for tomorrow's conference ?
1 upvote | 2 answers | 0 reply
Carol Chen answered -
For AnsibleFest tomorrow - https://www.ansible.com/ansiblefest
Timothy Appnel answered -
https://ansible.com/ansiblefest
[10:46 AM]
Sachin Joshi asked : Which label in Issues tab a beginner contributor can search and try to contribute?
1 upvote | 4 answers | 2 replies
Sandra McCann answered -
easyfix
Sachin Joshi replied -
Do we get any help if we are stuck while we trying to fix? Can we have a discussion with some expert?
Abhijeet Kasurde answered -
yes sachin. You can join irc channel called "#ansible-devel" on irc.freenode.net
and talk to a large number of developer
Tadej Borovsak answered -
You will get a feedback in the PR. If you need more "interactive" help, you will need to join #ansible-community IRC channel.
Sachin Joshi replied -
Thank you. I will join the IRC
Abhijeet Kasurde answered -
https://github.com/ansible/ansible/issues?q=is%3Aopen+is%3Aissue+label%3Aeasyfix
[11:02 AM]
Satish chennu asked : any ansible openshift documentation or modules
1 upvote | 2 answers | 0 reply
Timothy Appnel answered -
https://github.com/ansible-collections/community.okd
Alicia Cozine answered -
Connection plugin for running tasks in pods running on OpenShift: https://docs.ansible.com/ansible/latest/collections/community/general/oc_connection.html#ansible-collections-community-general-oc-connection
[11:08 AM]
Wawrzyniec Niewodniczanski asked : What's the right IRC channel to join? I just tried #ansible and #ansible-community no luck, but #ansible-molecule seems to be fine.
1 upvote | 2 answers | 0 reply
Tadej Borovsak answered -
Both channels should be OK. But I think you need to authenticate if you want to join.
Carol Chen answered -
to register/authenticate: https://freenode.net/kb/answer/registration
[11:09 AM]
James Glynn asked : I was knocked off and now can't reply to my previous question RE: Ansible Installation. But to be clear, I installed it, and have been using Ansible for just over a year, and love it. It's just the installation is painful. I use Amazon Linux 2 across the boards for an OS.
1 upvote | 2 answers | 0 reply
Gundalow answered -
Maybe a good one for the Email list https://docs.ansible.com/ansible/latest/community/communication.html
Alicia Cozine answered -
Sorry to hear i was such a challenge! If you have ideas for improving the documentation of how it works now, please let me know (acozine on IRC, I"m usually in the #ansible-docs channel).
[11:14 AM]
Boonchu Ngampairoijpibul asked : What is status on dynamic inventory for cloud provider? Do we have any target to achieve this task in the future, especially dealing with pulling asset tags?
1 upvote | 1 answer | 0 reply
Tadej Borovsak answered -
Most of the cloud providers should have an inventory plugin available. I know there is one for AWS and OpenStack because I used them, but other cloud providers should also have at least something.
[11:20 AM]
Boonchu Ngampairoijpibul asked : When I look into OCP deployment in 3 and 4, OCP3 uses heavily in Ansible playbooks to install components. However, OCP 4 I no longer see ansible for installation from user visibility. Instead, Ansible seem blend into the part of Kubernetes Operator. Is that the way we want to move forward for OCP?
1 upvote | 1 answer | 1 reply
Jeff Geerling answered -
For OCP 4, the installation is being handled differently, but deployment and management of clusters can be done a number of different ways. In addition to Operators that can be built with Ansible, you can look at our new OKD collection for OpenShift resource management: https://github.com/ansible-collections/community.okd (we'll talk more about it later, too; it's currently in a bit of a 'community preview' state)
Boonchu Ngampairoijpibul replied -
Good to know. Thanks Jeff!
[11:29 AM]
scott boss asked : what is a best way to utilize a dynamic inventory (like satellite server) but not make it the default source. some people on the hosts need to be able to use inventory files, some dynamic sources like satellite or a different dynamic source.
1 upvote | 0 answer | 0 reply
[11:36 AM]
Ashraf Hassan asked : When creating a new module, I have to follow to the FQCN for the modules correct?
1 upvote | 2 answers | 1 reply
Tadej Borovsak answered -
If you add a new module to an existing collection, you get FQCN by prefixing your module's name with namespace and collection's name. You cannot create a module that lives in some global namespace anymore.
Abhijeet Kasurde answered -
While creating collection you want to consider about FQCN. For individual module, you may want to use existing namespaces like community.general
Ashraf Hassan replied -
Thank you so much
[11:42 AM]
Priyansh Neema asked : Hey!! Can we get the recoding of theis session..
1 upvote | 2 answers | 1 reply
Abhijeet Kasurde answered -
Yes, definitely. After session we will be releasing recordings and slides used.
Tadej Borovsak answered -
I believe this session will be published on Youtube later.
Priyansh Neema replied -
Ok cool.. Thanks
[11:49 AM]
Adam Morris asked : Why do you test on Python 2 (2.6/2.7) when it is no longer supported?
1 upvote | 6 answers | 2 replies
Tadej Borovsak answered -
Python 2.7 is still supported on CentOS 7 and we support this OS version.
Abhijeet Kasurde answered -
There are systems in the wild which uses Python 2.7.
Backward compatability is important is such cases.
Abhijeet Kasurde answered -
Basically, enterprises move slow than community. They do not want to move cutting edge things as early as community does.
Adam Morris replied -
Thanks. That makes sense (even if I don't like it as I would rather people moved onto supported versions).
Abhijeet Kasurde answered -
I have seen people using RHEL3 while RHEL 8 is the latest. So you can assume.
Adam Morris replied -
@Abhijeet Kasurde... Yes, but the enterprise I work for does try to remain on supported versions... If it is no longer supported they are more likely to actually upgrade.
Sam Doran answered -
The reality is there are a lot of systems out there that only have Python 2 available. Supporting Python 2 allows Ansible to manage a whole lot more systems than if Python 3 were required on the managed node.
Abhijeet Kasurde answered -
@Adam Agree.
[11:52 AM]
Herve Quatremain asked : Modules should be written to run with both Python 2 and Python 3? Is there a plan to drop Python 2 (at least for stuff running on the controller)?
1 upvote | 3 answers | 0 reply
Tadej Borovsak answered -
In the world of Ansible collections, you are free to decide what you want to support. We support python 2.7 because our partner (Sensu) supports CentOS 7.
Abhijeet Kasurde answered -
Ansible Controller is all Python3. Module code runs on variety of environment. Python 2 is required since some older system like Centos 6 or Ubuntu uses them.
Sam Doran answered -
We are planning to increase the minimum required version on the controller to Python 3.8 in upcoming releases. This will be discussed more on Thursday.
[12:18 PM]
Kasra Amirsarvari asked : Is podman also supported?
reference to command: ansible-test sanity --docker
1 upvote | 4 answers | 0 reply
Timothy Appnel answered -
There is a podman driver you can use with molecule. https://www.ansible.com/blog/developing-and-testing-ansible-roles-with-molecule-and-podman-part-1
Tadej Borovsak answered -
I am not sure if ansible-test supports podman at the moment. Maybe some from the dev team can help here?
Sam Doran answered -
We have some folks on the Core team that use ansible-test with podman. I believe it mostly works so long as create a docker symlink that points to podman.
Sam Doran answered -
ansible-test is using shell commands and /proc/self/cgroup/docker to interface with docker. Since podman is mostly a drop-in replacement for the docker CLI, it should work. PRs are welcome to fix any related issues.
[12:41 PM]
Srinivasa Nagaraja asked : Ansible Introduction: katacoda.com has information stating that owner has reached maximum try after sometime. Please advise.
1 upvote | 1 answer | 0 reply
Carol Chen answered -
Please bookmark the links and try again later! We will leave the scenarios up for a while even after the event.
[02:05 PM]
Pramod Manjunatha asked : Any scenarios where we cannot use Molecule? I was testing for one use case on Oracle Database but Molecule was using docker image. There was no such files or filesystem it was always failing... is there anything to make it work?
1 upvote | 3 answers | 2 replies
Jeff Geerling answered -
You would possibly need to use a different Molecule driver if you need to work in a different kind of environment than Docker to run your tests. Otherwise you'd just need to make sure Molecule can install all requirements and dependencies inside the test environment that are required.
Pramod Manjunatha replied -
Thanks Jeff, I will try with different river.
Sorin Sbarnea answered -
First we need to realise who is starting that oracle database. Once this is sorted, you can make a decision. Sometimes is ok to use already running services, like a hosted database.
Sorin Sbarnea answered -
If you cannot use a hosted service, you can use molecule to start a sideload container or vm that can be used for testing.
Pramod Manjunatha replied -
Got it.. I test the scenarios
[10:25 AM]
Adrian Teri asked : With ansible 2.10 breaking out the core modules to multiple collections is this a rally call for communities to be formed like a Database Group for Mysql, PostgreSql, MariaDB etc ...
0 upvote | 1 answer | 0 reply
Gundalow answered -
Yes, the move to collections make Working Groups a true first class citizen. We have a "Cloud" and "Network" working groups, the rest are all for specific collections.
[10:25 AM]
Prantik Basak asked : Is there a way to get pywinrm as part of the ansible engine or one of the standard redhat repos?
0 upvote | 1 answer | 1 reply
Gundalow answered -
You'd need to download the RPM (and any dependencies) and store them on your network for install.
Prantik Basak replied -
Thanks. So far I was able to get it working on a system that is connected to the internet where I can use pip3 to download the pywinrm module which also downloaded related pre-req modules but when I tried to download them separately, I could not get it to work... I could not find a repo where I can download the module from a supported redhat repo. It would be really helpful if you have any guidance on this or know of any repo that I can try for downloading an rpm.
[10:26 AM]
Abhijeet Kasurde asked : Abdillah You are correct. Inventory is list of hosts and playbooks are instructions for automation.
0 upvote | 1 answer | 0 reply
Gundalow answered -
answered
[10:29 AM]
Max Bender asked : Probably going to get discussed later, but is testing Ansible using Docker a good solution?
0 upvote | 4 answers | 2 replies
James Cammarata answered -
We do most of our testing via Shippable with docker, so yes :)
Tadej Borovsak answered -
We use docker for all of our tests, but not directly most of the time. Molecule is really nice for these kind of things.
Timothy Appnel answered -
Molecule uses Docker as its default mechanism.
Max Bender replied -
Nice! For most use-cases this seems to work nicely. There are some edge cases that can't be supported via a Docker (dealing with real HW devices ect.)
Molecule!? Cool will check it out
Timothy Appnel answered -
There's a session on Molecule today.
Max Bender replied -
Nice!
[10:30 AM]
Chris Smith asked : What is the best way to run PowerShell commands/scripts with Ansible?
0 upvote | 3 answers | 1 reply
James Cammarata answered -
A combination of wiin_copy and win_command.
https://docs.ansible.com/ansible/latest/collections/ansible/windows/index.html#plugins-in-ansible-windows
Timothy Appnel answered -
You'd want to use the windows modules which handle the PS3 scripts for you: https://docs.ansible.com/ansible/2.4/list_of_windows_modules.html.
Chris Smith replied -
Thanks! I'm currently running a POC on Ansible Tower and am having a blast with it!
James Cammarata answered -
Just realized, the script module supports both windows and posix systems (despite not having the normal win_ prefix):
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/script_module.html#ansible-collections-ansible-builtin-script-module
[10:30 AM]
Björn Sundberg asked : is it possible to run molecule in docker/openshift
0 upvote | 1 answer | 1 reply
Sorin Sbarnea answered -
Yes for first. Bit of DIY for the second.
Björn Sundberg replied -
thanks! Yes i have managed to installed it in openshift. But then there is the config in running and doing the test on another host or docker in docker, but that's bad i guess.
[10:31 AM]
Konrad Rzentarzewski asked : whoever is in charge in new lightbulb - any plans to get best practices in there?
0 upvote | 3 answers | 2 replies
Andrius Benokraitis answered -
the Linklight workshops are their own community, have you checked in there with them?
Konrad Rzentarzewski replied -
nope, any link on how can i get an ideas about communities and their comm channels?
Andrius Benokraitis answered -
https://github.com/ansible/workshops/
Andrius Benokraitis answered -
There is a "How to Contribute" section on that page
Konrad Rzentarzewski replied -
aah, cool ansible/lightbulb github page should have a link to that too!
[10:33 AM]
Yasmik Patel asked : Is there any Ansible module to manage Cloud (AWS or AZURE) Authentication?
0 upvote | 3 answers | 1 reply
Tadej Borovsak answered -
There are dedicated Ansible collections for AWS and Azure that should contain things you need.
Yasmik Patel replied -
Can you please provide some reference link?
Sandra McCann answered -
https://docs.ansible.com/ansible/latest/collections/index.html and search for aws or azure.
Sandra McCann answered -
(should have said - those are the collections within Ansible 2.10. You can also go to https://galaxy.ansible.com/ and search for others.
[10:35 AM]
Prantik Basak asked : is it possible to get the slides or the recording for this session?
0 upvote | 1 answer | 1 reply
Carol Chen answered -
Yes, we will share slides and recording after the event!
Prantik Basak replied -
Thanks Carol.
[10:41 AM]
Jesper L Lauridsen asked : is there a way or module to manage collections as/in a task instead on installing collection via ansible-galaxy
0 upvote | 3 answers | 0 reply
Abhijeet Kasurde answered -
Yes, you can set ansible collection path and clone the git repo or copy your collection inside it.
Andrius Benokraitis answered -
Please note this is for development purposes only and not a supported method (if you're an Ansible customer)
Abhijeet Kasurde answered -
https://docs.ansible.com/ansible/2.9/dev_guide/developing_collections.html#developing-collections
[10:41 AM]
Pramod Manjunatha asked : Is there any way we can suppress the output other than no_log option? There are few cases where it goes multiple iteration but we wouldn't need to display all those iteration output
0 upvote | 2 answers | 1 reply
James Cammarata answered -
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/minimal_callback.html#ansible-collections-ansible-builtin-minimal-callback
James Cammarata answered -
If that is still too verbose, you can find other callback plugins to control output on Galaxy.
Pramod Manjunatha replied -
Thanks James, I just used and it is bit helpful though.
[10:45 AM]
swetha Masala asked : Do we this material/PPT later?
0 upvote | 2 answers | 0 reply
Tadej Borovsak answered -
https://ansible.github.io/community/decks/contributing-to-ansible.html# are slides. I belive video will be available on Youtube later.
Carol Chen answered -
Yes, as Tadej mentioned, we will share the slides and recording after the event.
[10:46 AM]
Chris Smith asked : When will Ansible Tower support Ansible 2.10 to enable use of collections? The docs always land visitors on "latest" and there is some disparity that can lead new users down a rabbit hole.
0 upvote | 6 answers | 3 replies
Tadej Borovsak answered -
Ansible Tower already supports collections. But the next iteration of Tower will move towards something called environments (dockerized Ansible + any required collections and libraries).
Richard Henshall answered -
slight correction, containerised Ansible, not dockerised
Richard Henshall answered -
However, 2.9 allows collections and short of one or perhaps 2 features as feature parity with 2.10, intentionally, so for Tower use of 2.9 and collections is expected.
Chris Smith replied -
Okay, thanks. I have not had any luck with my POC deployment of Tower and collections so far...
Richard Henshall answered -
Day 2 of AnsibleFest will include more details, however, if using Tower because you're a current customer, would appreciate (if you're willing) to raise a support ticket
Timothy Appnel answered -
https://www.ansible.com/blog/installing-and-using-collections-on-ansible-tower
Chris Smith replied -
We are using a trial license right now so I can convince management of its usefulness. If I can raise a support ticket or go through our RH SE, I will be more than happy to accomodate. :)
Richard Henshall answered -
I would certainly pass on the observations to your account team
Chris Smith replied -
👍
[10:48 AM]
Ashraf Hassan asked : In the ansible doc it explains how to get a token for Red Hat Automation Hub, but how can I get the token for the community ansible galaxy? and how determine the priority for the repos (Which repos to search first for a collection (for instance RH Automation hub before the ansible galaxy))
0 upvote | 4 answers | 2 replies
Timothy Appnel answered -
It depends what you are looking for. Automation Hub only contains stable supported distros of content. So if you are an Red Hat Ansible subscriber I'd recommend using what's there. Galaxy is community content.
Ashraf Hassan replied -
I have both defined, but how to get a token for the community part and how to define priority, not everything is yet in the automation hub
Sandra McCann answered -
Go here for details on the server list - https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-client. If you scroll down a bit, there's a section on "Galaxy server list configuration options' that says the list is in prioritized order.
Sandra McCann answered -
as for a token for galaxy, I'm asking in #ansible-galaxy on IRC as I'm not sure if it's needed.
Ashraf Hassan replied -
Thank you so much
Sandra McCann answered -
Ok got the answer for the token - you can get it for galaxy from - https://galaxy.ansible.com/me/preferences
We'll get that added to the docs.
[10:50 AM]
Herve Quatremain asked : Should all the collections be hosted in GitHub ansible-collections? Who/how you decide which collections should made it to that ansible-collections repository?
0 upvote | 3 answers | 0 reply
Tadej Borovsak answered -
You can host your collection just about anywhere. ansible-collections organization mostly contains collections that were created from content in Ansible 2.9.
Jeff Geerling answered -
Additionally, there is still discussion around what kind of criteria we'd have for incorporating a new collection into the 'Ansible' distribution you get when you 'pip install ansible'.
Andrius Benokraitis answered -
Typically vendors/corporate sponsors put collections in their own namespaces, to foster their own communities.
[11:10 AM]
Priyansh Neema asked : Can I get free subcription and learning for Ansible and can i get free certification..
0 upvote | 1 answer | 1 reply
Tadej Borovsak answered -
Ansible is free and you can use it without any subscription. For certifications, I am not sure if there are any free ones.
Priyansh Neema replied -
ThaNK yOU
[11:12 AM]
Prantik Basak asked : is there any option to get pywinrm on an ansible control server which is not connected to the internet?
0 upvote | 1 answer | 0 reply
Gundalow answered -
Download the RPM (and any dependencies) in advance
[11:14 AM]
Ritesh Singh asked : Is is good to use Ansible Roles from Ansible Galaxy or to made our own roles by using modules , which one is better approach
0 upvote | 1 answer | 1 reply
James Cammarata answered -
It is completely up to you. At the very least Galaxy can provide inspiration/ideas for you to create roles in the case where you can't find something that fits your exact needs.
Ritesh Singh replied -
Thanks for answering my question
[11:14 AM]
David Dickson asked : What is the preferred editor used by the core team? We are just getting started with using Ansible and it would be very helpful to use an editor that would supply type ahead coding suggestions like Visual Studio and other tools do. Thanks for all you do! :)
0 upvote | 2 answers | 2 replies
Jeff Geerling answered -
Ha, everyone seems to use whatever they prefer. I know for me, I use Sublime Text 3 and Vim, depending on what device I'm on.
Gundalow answered -
I use vim. Though I've heard a lot of positive things about VS code and pycharm. We've documented some of this in https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html
David Dickson replied -
thanks!
David Dickson replied -
with Pycharm or VS Code will it do typeahead matches for Ansible code usage?
[11:14 AM]
Priyansh Neema asked : Can you share the document ansible book Link so that we can pratice it.
0 upvote | 1 answer | 0 reply
Gundalow answered -
https://www.ansible.com/resources/ebooks
[11:15 AM]
Satish chennu asked : Hi
Is there any modules build on openshift using ansible
0 upvote | 1 answer | 0 reply
Jeff Geerling answered -
We're currently working on a new collection, community.okd, with OpenShift and OKD support (it's also dependent on the Kubernetes collection) https://github.com/ansible-collections/community.okd
[11:28 AM]
shyam kumar asked : Anyone knows how to get / register ansible tower running instance IP address dynamically?
0 upvote | 3 answers | 0 reply
Abhijeet Kasurde answered -
Ansible Tower/AWX uses Dynamic inventory plugins which can help you to gather information about the hosts from various service providers.
Abhijeet Kasurde answered -
https://docs.ansible.com/ansible-tower/latest/html/userguide/inventories.html
Abhijeet Kasurde answered -
Geerlinguy has excellant video - https://www.youtube.com/watch?v=_rDzMYp-fBs
[11:30 AM]
shyam kumar asked : i mean HOSTNAME / IP Address of ansible tower
0 upvote | 0 answer | 0 reply
[11:36 AM]
Sachin Joshi asked : Is check_mode is similar to dry-run?
0 upvote | 4 answers | 1 reply
Abhijeet Kasurde answered -
yes
Toshio Kuratomi answered -
Correct. One thing to be aware of is if you commonly write playbooks where tasks require the output of a previous task, then check-mode may fail while the real run will succeed.
Abhijeet Kasurde answered -
Toshio++
Sachin Joshi replied -
Got it :)
Alicia Cozine answered -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html
[11:46 AM]
David Andrejšín asked : Asking as an undergrad student, how impactful do you think that Ansible contributions would be when applying for an internship in Red Hat? Would it help us to at least land an interview?
0 upvote | 1 answer | 0 reply
Timothy Appnel answered -
It wouldn't hurt. It depends. I think what's most important is not the PRs but the relationships and reputation you build through the process. Those are more likely to help you. Hope that helps.
[11:47 AM]
Samarjeet Sethi asked : PowerShell 3 is required on target server in order for Ansible to connect to Windows server.Is there any other package other than pywinrm to communicate with Windows servers ?
0 upvote | 3 answers | 4 replies
Timothy Appnel answered -
I don't believe so. You do need to enable WinRM on each server. My understanding is it is off by default.
Andrius Benokraitis answered -
Did you know there are weekly meetings on Tuesdays at 20:00 UTC on IRC channel #ansible-windows
https://github.com/ansible/community/wiki/Windows
Samarjeet Sethi replied -
ok. winrm is already enabled on all servers however for few servers there is application dependency on powershell version and can't be updated to 3.0 or later ,was trying to see if we have any other solution to connect to those windows servers
Samarjeet Sethi replied -
Thanks Andrius ,wasn't aware of it will try to join them.
Timothy Appnel answered -
You may want to explore win_command and win_shell. I *think* those may not use PS3, but those modules are rather limited in the functionality and not idempotent.
Samarjeet Sethi replied -
Tim ,we are basically not able to connect to windows server which have lower powershell versions eg. Powershell 2.0.
Samarjeet Sethi replied -
Also I'm using win_shell for executing powershell scripts on servers
[11:56 AM]
Boonchu Ngampairoijpibul asked : Can anyone give us the demo github to understand better about ansible test process like the present shows us?
0 upvote | 1 answer | 0 reply
Tadej Borovsak answered -
Testing is not strictly related to the GitHub. Usually, test are executed in the CI/CD, but you usually start testing on your local machine.
See molecule's documentation for some quick-start examples.
[11:59 AM]
Kim Covil asked : Any recommendations for testing of module changes that depend on a bunch of infrastructure existing? For example I submitted a change for paramiko ssh using kerberos auth via GSSAPI... that would require a whole kerberos setup to test properly
0 upvote | 1 answer | 0 reply
Jeff Geerling answered -
This is a tough question to answer. I also help with the DigitalOcean, Kubernetes, and OpenShift (OKD) collections, and in each case we have to try to figure out ways to test things independently, but also integrated with a live cluster/resources. This requires a bit more setup work, but many CI systems make it at least *possible* to do it.
[12:00 PM]
David Pullman asked : Is there an overview and best practices on testing of contributed collections/roles?
0 upvote | 3 answers | 1 reply
Andrius Benokraitis answered -
Developer Guide?
Timothy Appnel answered -
https://docs.ansible.com/ansible/latest/dev_guide/testing.html#
Andrius Benokraitis answered -
https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#developing-collections
David Pullman replied -
Awesome, Thanks!
[12:02 PM]
Mihai Idu asked : Hello/ Salut,
How can we use jinja2 variables to return only integers? I faced a dificutly in some cases when i wanted to use a jinga2 variable into an rest-api that only accepted int and no string format.
Thank you/Multumesc
0 upvote | 4 answers | 2 replies
Timothy Appnel answered -
Pass the variable through the int filter
Mihai Idu replied -
would you be able to give me an example?
Timothy Appnel answered -
Example: when: ansible_facts['os_family'] == "RedHat" and ansible_facts['lsb']['major_release'] | int >= 6
Mihai Idu replied -
Thanks,.
Timothy Appnel answered -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#forcing-the-data-type
Bradley Thornton answered -
Depending on the scenario, this may also help https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-jinja2-native
[12:17 PM]
Youssef Chahwan asked : Hello,
I need to develop an GUI application where user can submit requests i.e. deploying setups, loading database, or just running a java command … on specific machine (remotely).
Do you think writing a REST API that calls Ansible to execute these operations is a good idea?
Thank you
0 upvote | 1 answer | 1 reply
Timothy Appnel answered -
Not really. That is a big part of what Tower/AWX is for.
Youssef Chahwan replied -
I need it to be part of my application that I need to sell it to my clients, any other alternative?
[12:18 PM]
Arvin Sevilla asked : What do "sanity" tests cover, or, how does sanity test differ from unit tests?
0 upvote | 3 answers | 2 replies
Bradley Thornton answered -
Sanity tests are not specific to _what_ the module or plugin does. They ensure Ansible's style, coding patterns, and best practices are followed. Unit test focus more on the specifics of the plugin's code. Ensure it behaves as it should, and fails gracefully when it needs to. https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/index.html#all-sanity-tests
Arvin Sevilla replied -
Got it, thanks!
Tadej Borovsak answered -
Sanity tests are static check that ensure your code meets some criteria (like PEP8-compliance for example).
Arvin Sevilla replied -
I see, so it's like a lint test
Alicia Cozine answered -
Documentation of our sanity tests: https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/index.html
[12:27 PM]
Herve Quatremain asked : Is the container image ansible/default-test-container is publicly available or should we create our own for those tests? I cannot find it on the docker hub (maybe I'm not looking correctly)
0 upvote | 4 answers | 1 reply
Tadej Borovsak answered -
That image is hosted on quay.io, so you need to search there.
Sam Doran answered -
The Anible testing images are publically available. They are on quay.io/ansible.
Sam Doran answered -
The containerfiles are also publically available. https://github.com/ansible/distro-test-containers
Tadej Borovsak answered -
And no, for sanity tests, you do not need custom image.
Herve Quatremain replied -
Awesome!
[12:36 PM]
Herve Quatremain asked : So for the tests we are doing in the exercise, apart from writing the module itself, what else do we have to do? I see a tests directory.
0 upvote | 0 answer | 0 reply
[12:43 PM]
Nabeelah Azam asked : Carol, could you please share the registration link to Irc? Thank you!
0 upvote | 1 answer | 1 reply
Jeff Geerling answered -
Please see: https://docs.ansible.com/ansible/latest/community/communication.html#irc-channels for help joining the #ansible IRC channels
Nabeelah Azam replied -
Thank you.
[01:00 PM]
Todd Lewis asked : Rather than entering param defs in the docstring, then again as sanity testing code, then again in plugin python code... seems like the latter ones would be better generated from a single source with Ansible templates?
0 upvote | 1 answer | 0 reply
Tadej Borovsak answered -
For one of our newer collections, we actually use a tool that generates argument specification from the module documentation: https://github.com/xlab-steampunk/ansible-argspec-gen
But unit tests should not be generated because then we are just testing the generator. Forcing developers to update tests is a great way of making sue they think twice before breaking compatibility ;)
[02:03 PM]
Wawrzyniec Niewodniczanski asked : Question to the docs team (which BTW are very good). Why not all of Jinja2 filters is listed at https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html? I especially miss string related filters (e.g. capitalize, or upper).¶
0 upvote | 4 answers | 1 reply
Jeff Geerling answered -
Any of the Jinja built-in filters are documented in Jinja's docs (https://jinja.palletsprojects.com/en/2.11.x/templates/) — but it would be nice to have a way to combine the two sets of docs to see a list of all available filters :)
Wawrzyniec Niewodniczanski replied -
Or at least to have a link from Ansible list to the Jinja2.
Sandra McCann answered -
Oddly I thought we did have a link from Ansible's jinja2 page to jinja docs... but I can't find it so we'll add that. In general, we don't pull in extra docs (like a list of everything available from jinja2 itself).
Alicia Cozine answered -
Thanks for the compliment Wawrzyniec! We have enough of a challenge maintaining the documentation of the code in our repositories, we could never keep general jinja2 documentation up to date. We rely on the jinja2 folks to maintain that.
We do link to the official jimja2 docs: "see the list of built-in filters in the official Jinja2 template documentation"
Alicia Cozine answered -
Hm, the link didn't copy over, but the text "built-in filters" links to https://jinja.palletsprojects.com/en/2.11.x/templates/#builtin-filters.
[02:10 PM]
Vitalii Hirenko asked : What driver do you suggest to test Windows roles?
0 upvote | 1 answer | 0 reply
Sorin Sbarnea answered -
Vagrant? I have to say that I mostly focused on Linux and MacOS, but vagrant has Windows support or any cloud would also do, you would not run stuff locally.
[02:12 PM]
Wawrzyniec Niewodniczanski asked : Is there a way to comment on questions?
0 upvote | 1 answer | 0 reply
Timothy Appnel answered -
Sorry no. BlueJeans only allows presenters and moderators to comment on questions.
[02:26 PM]
Wawrzyniec Niewodniczanski asked : Molecule/Lint question: Is there a chance not to drastically change lint rules? Enforcing lack of "-" in the role name broke my CI pipeline after minor (AFAIK) update of molecule docker image.
0 upvote | 4 answers | 2 replies
Sorin Sbarnea answered -
I am not sure I understand that question but post in on discussions forum, maybe with link to example.
Jeff Geerling answered -
Specifically, please consider posting a discussion about breaking changes and rules in the ansible-lint project Discussions: https://github.com/ansible/ansible-lint
Wawrzyniec Niewodniczanski replied -
thanks Jeff.
The problem was rule 106: https://ansible-lint.readthedocs.io/en/latest/default_rules.html#role-name-does-not-match-a-z-a-z0-9-pattern
Sorin Sbarnea answered -
Linter recently got its own discussions forum enabled too https://github.com/ansible/ansible-lint/discussions -- post there
Sorin Sbarnea answered -
106 is part of galaxy class of rules, you can ignore all these rule by adding "galaxy" to skip list.
Wawrzyniec Niewodniczanski replied -
Oh, good to know. It would be good to add documentation on how to skip the group of tests.
[02:30 PM]
Lambodar Ray asked : We have inventory with in a role and sometime above role directory. How are they being used?
0 upvote | 1 answer | 0 reply
Sorin Sbarnea answered -
My impression is that is diverging from standard usage recomandations greatly, so I would be surprised to see it working. Look at https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html -- that layout applies well to any ansible repository, not only collections
[02:45 PM]
Prantik Basak asked : is there a recent role available in ansible galaxy for awx installation? I know of one written by Jeff G. but I am not sure if it installs the latest awx version currently.
0 upvote | 1 answer | 0 reply
Carol Chen answered -
awx ships with it's own installers
[03:20 PM]
Adam Morris asked : How do Collections mesh with "Batteries Included"? It seems to me like this is a start of a switch to "Batteries Not Included"
0 upvote | 7 answers | 2 replies
Jeff Geerling answered -
One thing to keep in mind is you still get 'batteries included' Ansible with 'pip install ansible' (which currently gives 2.10 with all the content that was in 2.9, plus some new content)
Timothy Appnel answered -
how the code is organized in repos != how it is bundled and distributed
James Cammarata answered -
It's more like, we're including the AA, AAA, C, and D, but if you want the CR25 you're going to have to grab it yourself.
Carol Chen answered -
I find this helpful: https://github.com/ansible-collections/overview/#terminology
Adam Morris replied -
Some Batteries included?
I will admit that my contributions so far (very limited) have been adding AIX support for my personal use cases.
Andrius Benokraitis answered -
Check out Massimo Ferrari's or my talks tomorrow for more info as well as it relates to Collections Strategy
Adam Morris replied -
Thanks Andrius I've added those two to "my agenda"
Sorin Sbarnea answered -
I would say that now is more like you can change the battery yourself as is no longer an iphone.
Andrius Benokraitis answered -
that's a good analogy - the battery is now serviceable
Deleted Questions
[11:14 AM]
Prantik Basak asked : I was hoping it would be part of the ansible engine or one of the standard redhat repo
0 upvote | 0 answer | 0 reply
[11:14 AM]
Prantik Basak asked : but the only option so far was a pip3 install or pypi
0 upvote | 0 answer | 0 reply
[11:31 AM]
shyam kumar asked : host / inventory is different with ansible tower IP
0 upvote | 1 answer | 0 reply
Abhijeet Kasurde answered -
Yes, Tower IP identifies Tower. where as host / inventory is the identity about host being managed by Ansible controller.
[12:02 PM]
Priyansh Neema asked : Ok ThaNK YOU
0 upvote | 0 answer | 0 reply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment