From 09480169d0b43259201a5adaec6c6fcd268ee704 Mon Sep 17 00:00:00 2001 From: Justin W. Flory Date: Aug 30 2019 00:42:38 +0000 Subject: Add ansible_python_interpreter hack for F30+ host in inventory This is an annoying but sadly necessary addition for the playbook run to work on first pass. It resolves this error during runtime: ```json TASK [jwflory.teleirc : add nodejs third-party repository] ********************************************************************************************************************************************************************************** fatal: [telegram-irc.fedorainfracloud.org]: FAILED! => {"changed": false, "cmd": "dnf install -y python2-dnf", "msg": "Could not import the dnf python module using /usr/bin/python (2.7.16 (default, Mar 5 2019, 09:07:48) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)]). Please install `python2-dnf` package or ensure you have specified the correct ansible_python_interpreter.", "rc": 1, "results": [], "stderr": "Failed to synchronize cache for repo 'updates'\nIgnoring repositories: updates\nError: Unable to find a match\n", "stderr_lines": ["Failed to synchronize cache for repo 'updates'", "Ignoring repositories: updates", "Error: Unable to find a match"], "stdout": "Fedora 30 - x86_64 - Updates 3.2 kB/s | 252 B 00:00 \nLast metadata expiration check: 0:01:32 ago on Fri 30 Aug 2019 12:20:01 AM UTC.\nNo match for argument: python2-dnf\n", "stdout_lines": ["Fedora 30 - x86_64 - Updates 3.2 kB/s | 252 B 00:00 ", "Last metadata expiration check: 0:01:32 ago on Fri 30 Aug 2019 12:20:01 AM UTC.", "No match for argument: python2-dnf"]} ``` For more context, see ansible/ansible#45852. Signed-off-by: Justin W. Flory --- diff --git a/inventory/inventory b/inventory/inventory index bd991f5..9f6cdcb 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -1,4 +1,4 @@ -telegram-irc.fedorainfracloud.org +telegram-irc.fedorainfracloud.org ansible_python_interpreter=/usr/bin/python3 [dev] 127.0.0.1 ansible_connection=local