From 19efe7288a45e2534009fac9fdeec4e1f937ba63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:12:55 -0500 Subject: [PATCH 1/6] bootstrap ansible with python3 --- site.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site.yml b/site.yml index 45c0e9b..8a718fb 100644 --- a/site.yml +++ b/site.yml @@ -11,7 +11,7 @@ - name: Update apt packages raw: apt-get update - name: Install python - raw: apt-get install python-minimal aptitude -y + raw: apt-get install python3 aptitude -y - name: Gather facts action: setup become: yes @@ -28,7 +28,7 @@ - name: Update apt packages raw: apt-get update - name: Install python - raw: apt-get install python-minimal aptitude -y + raw: apt-get install python3 aptitude -y - name: Gather facts action: setup become: yes # become sudo From af322be761d2782ead60e8e66158df80d366825b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:27:03 -0500 Subject: [PATCH 2/6] Use python3 variant for libs --- roles/common/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index cb92acf..771f3b3 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -11,10 +11,10 @@ with_items: - autoconf - build-essential - - python-setuptools - - python-software-properties - - python-dev - - python-pip + - python3-setuptools + - python3-software-properties + - python3-dev + - python3-pip - libncurses-dev # CIS CAT secuirty configurations @@ -397,4 +397,4 @@ apt: name=telnet state=absent update_cache=yes tags: - cis_cat_security - - disable_telnet \ No newline at end of file + - disable_telnet From f8d44e44d59a2ccf55f301a4e30dcb20db502534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:28:19 -0500 Subject: [PATCH 3/6] disable apport "a la 20.04" --- roles/common/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 771f3b3..68604a0 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -299,7 +299,7 @@ - x_window - name: disable apport - lineinfile: dest=/etc/init/apport.conf regexp="^env enabled" line="env enabled=0" + lineinfile: dest=/etc/default/apport regexp="^enabled" line="enabled=0" become: true tags: - cis_cat_security From 432c2691efc1cb1b7df35c2c082279eafafa98a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:35:28 -0500 Subject: [PATCH 4/6] add missing libs to compile xmlsec otherwise we end up with errors like https://www.reddit.com/r/djangolearning/comments/gx9fnx/unable_to_install_xmlsec_on_ubuntu/ --- roles/sentry/defaults/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/sentry/defaults/main.yml b/roles/sentry/defaults/main.yml index 6006ad2..14d0bbb 100644 --- a/roles/sentry/defaults/main.yml +++ b/roles/sentry/defaults/main.yml @@ -4,6 +4,8 @@ other_python_pkgs: - libffi-dev - libjpeg-dev - libxml2-dev + - libxmlsec1-dev + - libxmlsec1-openssl - libxslt-dev - libyaml-dev - libpq-dev @@ -18,4 +20,4 @@ other_python_pkgs: - libblas-dev - liblapack-dev - libatlas-base-dev - - python-passlib + - python3-passlib From ea9e438b8df5fe1a1ff3e617af3bd4e14923e148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:38:14 -0500 Subject: [PATCH 5/6] various fixes --- roles/sentry/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sentry/tasks/main.yml b/roles/sentry/tasks/main.yml index fa0973a..fc4104c 100644 --- a/roles/sentry/tasks/main.yml +++ b/roles/sentry/tasks/main.yml @@ -7,7 +7,7 @@ - python - name: Install all relevant files for server - pip: name={{item}} executable=pip + pip: name={{item}} executable=pip3 with_items: - urllib3 - pyopenssl @@ -18,7 +18,7 @@ - python - name: install python mysql bindings for mysql commands - apt: name=python-mysqldb state=installed + apt: name=python-mysqldb state=present tags: - python From d94b86101b1be3657b8fff66b67e78e583964ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaal?= <46002149+joel-schaal@users.noreply.github.com> Date: Fri, 5 Feb 2021 15:24:44 -0500 Subject: [PATCH 6/6] use proper python for mysql --- roles/sentry/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sentry/tasks/main.yml b/roles/sentry/tasks/main.yml index fc4104c..fcb5f32 100644 --- a/roles/sentry/tasks/main.yml +++ b/roles/sentry/tasks/main.yml @@ -18,7 +18,7 @@ - python - name: install python mysql bindings for mysql commands - apt: name=python-mysqldb state=present + apt: name=python3-mysqldb state=present tags: - python