Questions tagged [python]

Python is a dynamically and strongly typed programming language that encourages readability.

1743 questions
4
votes
1 answer

Can't use postgresql_db module with ansible

Target server: -bash-4.2$ python -V Python 2.7.5 -bash-4.2$ pip list | grep psycopg2 psycopg2 (2.8.3) But if run ansible playbook with this task will fail: - name: Create repmgr database postgresql_db: name: repmgr become: true …
rawmain
  • 291
  • 1
  • 7
  • 17
4
votes
2 answers

How to determine if my CentOS 8 is vulnerable to CVE-2019-18348

I am a long-time linux sysadmin, but new to CentOS. I just need to determine if this CentOS server is vulnerable to CVE-2019-18348. To do that, I have to either verify the packages installed are patched, or have a way to test for the vulnerability…
user1522091
  • 79
  • 1
  • 5
4
votes
1 answer

Python 3.6.3 virtual environment issue in CentOS7 - "Error: Could not connect to Docker (is it running?)"

I have a virtualenv issue in my CentOS7 VM: Checking for virtualenv... Activating virtual environment /home/crimson/venv/python3 /home/crimson/venv/python3/myvra.json matches /home/crimson/venv/myvra.json /home/crimson/venv/python3/myvrni.json…
KidACrimson
  • 330
  • 1
  • 10
  • 26
4
votes
1 answer

Installing certbot - error - "nothing provides pyparsing"

I'm trying to set up let's encrypt on my Amazon ec2 RHEL nginx server, via the command $ sudo yum install certbot-nginx but it keeps failing: $ sudo yum install certbot-nginx Last metadata expiration check: 2:58:11 ago on Sat 17 Aug 2019 11:29:45 PM…
Mike Willis
  • 203
  • 2
  • 14
4
votes
1 answer

How to prevent Git client hanging during post-receive hook

I have a Git repository that contains a collection of config files and python scripts. On the server repository, I have a post-receive hook that will: checkout the master branch, setup a python virtualenv, install the pip requirements, and run…
user233054
4
votes
2 answers

How To Manage Python In a Restricted Environment?

The Need: Support several hundred Python developers and/or prod servers running Python code in a highly restrictive environment. Be able to provide any compatible module found in PyPi.org that a developer needs. Environment: No external access.…
Ifrit
  • 143
  • 6
4
votes
1 answer

Django VPS Configuration

I'm looking to run some Django sites on my VPS, with nginx acting as a front-end for it. I've been having some issues with mod_python and Apache, the site just starts erroring out whenever the traffic starts to pick up because it just uses so much…
Zack
  • 151
  • 4
4
votes
2 answers

Can't install certbot on ubuntu 16.04.3

I'm trying to install certbot in my ubuntu 16.04.3 server, the same commands that work with 16.04.2 won't do it. The python installed is default Python 2.7.12 This is the installation script: #!/bin/bash sudo apt-get update sudo apt-get install…
Gus
  • 163
  • 1
  • 7
4
votes
1 answer

Installation Python 3.6.x on Windows using command line installer (without GUI)

I need to installed Python 3.6.x on Windows as part of an automated process without user-interaction. Recently Python releases provided MSI files for installation using the "msiexec" utility however there are no more MSI release files available for…
Jens
  • 41
  • 1
  • 2
4
votes
1 answer

How to make conda use the host proxy inside a Docker container

Here's the situation. I'm using Docker with continuumio/anaconda3 image. I have the server (Ubuntu 16.04 LTS) configured to use the corporate proxy with CNTLM package. Internet works just fine in the host through the local proxy. I have also…
Iyán
  • 41
  • 1
  • 2
4
votes
0 answers

MemoryError when using gdb's Python extension on Jessie

In the past, I frequently used the possibility to attach gdb to a running Python process and use the py-* extensions for debugging. However, since Debian Jessie, this does not work anymore and throws a MemoryError instead. Steps to…
sbrandt
  • 51
  • 4
4
votes
1 answer

How can i check software version with Ansible?

I have three linux servers and i created the ansible inventory file: [web] 192.168.0.155 192.168.0.165 192.168.0.175 And i have playbook.yml: --- - hosts: web tasks: - name: Check drinks versions shell: "python3.4 {{ item.sw_path }} -v" …
4
votes
1 answer

Combine groups in ansible template

Has anyone combined groups for a loop in ansible templates. What we want to do is get the common members of two groups and loop them through to create our config. We're trying the same format that works in the host limits but receive 'dict object'…
tweeks200
  • 351
  • 1
  • 3
  • 11
4
votes
4 answers

Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django

I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission error: [error] 6978#0: *6725 connect() to…
user2901792
  • 141
  • 1
  • 1
  • 3
4
votes
2 answers

How do I specify multiple logfiles for a jail in fail2ban?

Heyo, I'm using Ubuntu 15.10 and fail2ban 0.9.3. Apache is set up with a bunch of Apache virtualhosts. I have my Apache2 logfiles located in subdirectories, one per localhost, e.g. '/var/log/apache2/vwww_example_vhost_com/ and logfiles under that as…
R.A.
  • 51
  • 1
  • 5