aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/ppa/tasks/main.yml
blob: 083acdd81e89e3506179d320d6c026f5e3ed974b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                       
                        








                                                       
                                               

                                                                                                 
                                 
 





                                                                                             
                                       
- name: Get host distro
  ansible.builtin.setup:
    gather_subset:
      - distribution
      - distribution_major_version
      - distribution_release
      - os_family

- name: Set platform-specific variables
  ansible.builtin.include_vars: "{{ __ppa_vars_file }}"
  loop:
    - "{{ ansible_facts['os_family'] }}.yml"
    - "{{ ansible_facts['distribution'] }}.yml"
    - "{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}.yml"
  vars:
    __ppa_vars_file: "{{ role_path }}/vars/{{ item }}"
  when: __ppa_vars_file is exists

- name: Set up PPA repository
  ansible.builtin.include_role:
    name: apt_repo
  vars:
    apt_repo_name: '{{ ppa_name }}'
    apt_repo_key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{ ppa_key }}'
    apt_repo_url: 'https://ppa.launchpadcontent.net/{{ ppa_owner }}/{{ ppa_name }}/ubuntu'
    apt_repo_distro: '{{ ppa_distro }}'