From fee4726e734714688626df042a57fc374e6dc0c1 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Thu, 19 Jun 2025 10:41:16 +0200 Subject: [PATCH] Fix users passlib --- .../practica-3-roles/users/tasks/main.yml | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/training/practica-3-roles/users/tasks/main.yml b/training/practica-3-roles/users/tasks/main.yml index 07882bd..cefd390 100644 --- a/training/practica-3-roles/users/tasks/main.yml +++ b/training/practica-3-roles/users/tasks/main.yml @@ -1,6 +1,21 @@ -#SPDX-License-Identifier: MIT-0 ---- -# tasks file for users +- name: Install Python3 + apt: + pkg: + - python3 + - python3-pip + - python3-passlib + become: true + +- name: Create a symbolic link from python3 to python + file: + src: /usr/bin/python3 + dest: /usr/bin/python + state: link + +- name: Set ansible_python_interpreter to use the installed Python + set_fact: + ansible_python_interpreter: /usr/bin/python3 + - name: Generar hash de la contraseƱa en el controlador (local) ansible.builtin.set_fact: hashed_password: "{{ user_password | password_hash('sha512') }}"