Add default file for root necessary since using venv instead of docker

This commit is contained in:
Laurent Indermuehle 2022-12-09 14:10:35 +01:00
commit 8c5806848f
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
7 changed files with 48 additions and 12 deletions

View file

@ -6,6 +6,10 @@
# - import_tasks: setvars.yml
# - import_tasks: dir.yml
- import_tasks: install.yml
# - import_tasks: install.yml
# - import_tasks: config.yml
# - import_tasks: verify.yml
- name: Prepare the controller python and MySQL connector
ansible.builtin.import_tasks:
file: prepare_controller.yml

View file

@ -0,0 +1,32 @@
---
- name: "{{ role_name }} | install | install python packages"
pip:
name: "{{ python_packages }}"
register: connector
- name: Extract connector.name.0 content
set_fact:
connector_name: "{{ connector.name.0 }}"
- name: Debug connector_name content
debug:
msg: '{{ connector_name }}'
- name: Extract connector version
set_fact:
connector_ver: "{{ connector_name.split('=')[2].strip() }}"
- name: Debug connector_ver var content
debug:
msg: '{{ connector_ver }}'
- name: Ensure fake root folder
ansible.builtin.file:
path: "{{ playbook_dir }}/root"
state: directory
- name: Ensure fake root default file exists
ansible.builtin.file:
path: "{{ playbook_dir }}/root/.my.cnf"
state: touch