Commit 00ac45fb authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

initial

parent ad06b44c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
# ansible_role-template
# ansible_role-proxmox_ve_no_subscription

Configure Proxmox VE repositories.
+4 −4
Original line number Diff line number Diff line
collections: []
dependencies: []
galaxy_info:
  author: template
  description: template
  author: Dmitriy Safronov
  description: Configure Proxmox VE repositories.
  license: Apache-2.0
  min_ansible_version: "2.16"
  namespace: template
  role_name: template
  namespace: dmitriysafronov
  role_name: proxmox_ve_no_subscription

tasks/main.yml

0 → 100644
+25 −0
Original line number Diff line number Diff line
- name: Check that the '/etc/pve/.version' exists
  stat:
    path: /etc/pve/.version
  register: stat_result

- name: Perform Proxmox setup
  when:
    - ansible_distribution == 'Debian'
    - stat_result.stat.exists
  block:

    - name: Proxmox VE - delete "enterprise" repo
      ansible.builtin.file:
        path: /etc/apt/sources.list.d/pve-enterprise.list
        state: absent

    - name: Proxmox VE - add "no subscription" repo
      ansible.builtin.copy:
        content: |
          deb [arch=amd64] http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription
        dest: /etc/apt/sources.list.d/pve-no-subscription.list
        owner: root
        group: root
        mode: "0644"
        force: true