FIX: fix the issue with the misdiscovery of the python interpreter when localhost is the target
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
physical:
|
||||
hosts:
|
||||
localhost:
|
||||
ansible_become_password: "{{ ansible_become_passwd }}"
|
||||
ansible_connection: local
|
||||
ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
||||
@@ -1,11 +1,30 @@
|
||||
---
|
||||
- name: Deploy and set up an LXC container in Proxmox
|
||||
- name: Physical machines maintanance play
|
||||
hosts: all
|
||||
remote_user: ansible
|
||||
roles:
|
||||
- ../roles/deploy_lxc_on_proxmox
|
||||
gather_facts: false
|
||||
|
||||
vars_files:
|
||||
../inventory/group_vars/all/secrets.yaml
|
||||
vars:
|
||||
ansible_user_passwd_hash: "{{ ansible_password | password_hash('sha512', 's3edscrj45e6r') }}"
|
||||
user_passwd_hash: "{{ user_password | password_hash('sha512', 's3ed6123jhgcr') }}"
|
||||
|
||||
vars_prompt:
|
||||
- name: lxc_hostname
|
||||
prompt: "Hostname for the container:"
|
||||
private: false
|
||||
|
||||
- name: lxc_root_password
|
||||
prompt: "Root password:"
|
||||
private: true
|
||||
confirm: true
|
||||
encrypt: sha512_crypt
|
||||
|
||||
- name: lxc_ip_address
|
||||
prompt: "IP address for the container (in x.x.x.x/x formant):"
|
||||
private: false
|
||||
|
||||
|
||||
roles:
|
||||
- ../roles/deploy_lxc_on_proxmox
|
||||
|
||||
+3
-21
@@ -1,29 +1,11 @@
|
||||
---
|
||||
- name: Physical machines maintanance play
|
||||
- name: Deploy and set up an LXC container in Proxmox
|
||||
hosts: all
|
||||
remote_user: ansible
|
||||
|
||||
roles:
|
||||
- ../roles/deploy_lxc_on_proxmox
|
||||
vars_files:
|
||||
../inventory/group_vars/all/secrets.yaml
|
||||
vars:
|
||||
ansible_user_passwd_hash: "{{ ansible_password | password_hash('sha512', 's3edscrj45e6r') }}"
|
||||
user_passwd_hash: "{{ user_password | password_hash('sha512', 's3ed6123jhgcr') }}"
|
||||
|
||||
vars_prompt:
|
||||
- name: lxc_hostname
|
||||
prompt: "Hostname for the container:"
|
||||
private: false
|
||||
|
||||
- name: lxc_root_password
|
||||
prompt: "Root password:"
|
||||
private: true
|
||||
confirm: true
|
||||
encrypt: sha512_crypt
|
||||
|
||||
- name: lxc_ip_address
|
||||
prompt: "IP address for the container (in x.x.x.x/x formant):"
|
||||
private: false
|
||||
|
||||
|
||||
roles:
|
||||
- ../roles/deploy_lxc_on_proxmox
|
||||
|
||||
@@ -17,10 +17,12 @@ mypy_extensions==1.1.0
|
||||
packaging==26.2
|
||||
pathspec==1.1.1
|
||||
platformdirs==4.10.0
|
||||
proxmoxer>=2.3
|
||||
pycparser==3.0
|
||||
pytokens==0.4.1
|
||||
PyYAML==6.0.3
|
||||
referencing==0.37.0
|
||||
requests>=2.34.2
|
||||
resolvelib==1.2.1
|
||||
rpds-py==2026.6.3
|
||||
ruamel.yaml==0.19.1
|
||||
|
||||
@@ -37,12 +37,11 @@
|
||||
api_token_id: ansible
|
||||
api_token_secret: "{{ proxmox_token_secret }}"
|
||||
|
||||
vmid: 1040
|
||||
hostname: "{{ lxc_hostname }}"
|
||||
state: started
|
||||
|
||||
- name: Sleep for a minute to ensure that ssh is ready
|
||||
become: false
|
||||
ansible.builtin.wait_for:
|
||||
timeout: 60
|
||||
delegate_to: localhost
|
||||
changed_when: false
|
||||
|
||||
Reference in New Issue
Block a user