This repository has been archived on 2021-11-15. You can view files and clone it, but cannot push or open issues or pull requests.
2021-10-25 21:46:19 +02:00
|
|
|
- name: "Add Ansible repository"
|
|
|
|
apt_repository:
|
|
|
|
repo: "ppa:ansible/ansible"
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: "Install Packages"
|
|
|
|
apt:
|
|
|
|
state: present
|
|
|
|
name: "{{ ansible_packages }}"
|
2021-10-25 22:05:35 +02:00
|
|
|
|
|
|
|
- name: "Get the Proxmox Ansible inventory"
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "https://github.com/xezpeleta/Ansible-Proxmox-inventory/raw/master/proxmox.py"
|
2021-10-25 22:49:47 +02:00
|
|
|
dest: "/etc/ansible/{{ ansible_inventory }}.py"
|
2021-10-25 22:05:35 +02:00
|
|
|
mode: "0777"
|
|
|
|
|
|
|
|
- name: "Copy the ansible config"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "ansible.cfg.j2"
|
|
|
|
dest: "/etc/ansible/ansible.cfg"
|
|
|
|
mode: "0644"
|
2021-10-25 22:45:15 +02:00
|
|
|
|
|
|
|
- name: "Copy the inventory config"
|
|
|
|
ansible.builtin.template:
|
2021-10-25 22:49:47 +02:00
|
|
|
src: "{{ ansible_inventory }}.json.j2"
|
|
|
|
dest: "/etc/ansible/{{ ansible_inventory }}.json"
|
2021-10-25 22:45:15 +02:00
|
|
|
mode: "0644"
|