Commit a47e6aec authored by nimrod's avatar nimrod
Browse files

Use the newer ansible_facts format.

parent d45d9367
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
- name: Create btrfs scrub services
  # yamllint disable rule:line-length
  loop: &btrfs_devices |-
    {{ ansible_mounts|selectattr("fstype", "equalto", "btrfs")|map(attribute="device")|unique }}
    {{ ansible_facts.mounts|selectattr("fstype", "equalto", "btrfs")|map(attribute="device")|unique }}
  # yamllint enable rule:line-length
  ansible.builtin.template:
    dest: /etc/systemd/system/scrub{{ name }}.service
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
    owner: root

- name: Allow unprivileged user namespaces
  when: ansible_facts["distribution_major_version"] < 11
  when: ansible_facts.distribution_major_version|int < 11
  ansible.posix.sysctl:
    name: kernel/unprivileged_userns_clone
    state: present
+4 −4
Original line number Diff line number Diff line
@@ -2,9 +2,9 @@
- name: Verify assertions
  assert:
    that:
      - ansible_distribution == "Debian"
      - ansible_distribution_major_version|int >= 10
      - ansible_service_mgr == "systemd"
      - ansible_facts.distribution == "Debian"
      - ansible_facts.distribution_major_version|int >= 10
      - ansible_facts.service_mgr == "systemd"

- name: Enable the backports repo
  loop:
@@ -12,7 +12,7 @@
    - deb-src
  apt_repository:
    # yamllint disable-line rule:line-length
    repo: '{{ item }} http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib non-free'
    repo: '{{ item }} http://deb.debian.org/debian {{ ansible_facts.distribution_release }}-backports main contrib non-free'
    state: present
    update_cache: true

+2 −2
Original line number Diff line number Diff line
---
- name: Install Podman from the Kubic repository
  # yamllint disable-line rule:line-length
  when: ansible_distribution_release is in ["buster", "bionic", "focal", "hera", "odin"]
  when: ansible_facts.distribution_release is in ["buster", "bionic", "focal", "hera", "odin"]
  block:
    - name: Assertions
      assert:
@@ -30,7 +30,7 @@
        update_cache: true

    - name: Install newer libseccomp2 from the backports repository
      when: ansible_distribution_release == "buster"
      when: ansible_facts.distribution_release == "buster"
      apt:
        cache_valid_time: 3600
        default_release: buster-backports
+1 −1
Original line number Diff line number Diff line
@@ -12,4 +12,4 @@ toolbox_podman_repo_base_url_mapping:
  odin: *focal

toolbox_podman_repo_base_url: |-
  {{ toolbox_podman_repo_base_url_mapping[ansible_distribution_release] }}
  {{ toolbox_podman_repo_base_url_mapping[ansible_facts.distribution_release] }}
Loading