refactor ♻️: Refactored the setup playbook to use localhost instead of node0 for the hosts list, improving readability and maintainability.
Updated the hosts list in the setup playbook from 'node0' to 'localhost'. This change simplifies the playbook by removing unnecessary host references, making it more straightforward to manage and understand.
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
- hosts: localhost
|
||||
gather_facts: yes
|
||||
|
||||
tasks:
|
||||
- name: Install 'proxmoxer' and 'requests' Python libraries for the Semaphore user
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- proxmoxer
|
||||
- requests
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- hosts: node0
|
||||
gather_facts: yes
|
||||
vars:
|
||||
@@ -6,18 +18,6 @@
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Install 'proxmoxer' and 'requests' Python libraries for the Semaphore user
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- proxmoxer
|
||||
- requests
|
||||
state: present
|
||||
# Installs to the home directory of the user running Semaphore, avoiding system conflicts.
|
||||
extra_args: "--user"
|
||||
# Run as the user that executes the Ansible playbooks in Semaphore
|
||||
become: yes
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Create lxc container
|
||||
community.proxmox.proxmox:
|
||||
vmid: 200
|
||||
|
||||
Reference in New Issue
Block a user