Commit 17d03554 authored by nimrod's avatar nimrod
Browse files

Update ansible-lint.

Address a great bunch of warnings.
parent ca7c7587
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ repos:
      - id: shellcheck

  - repo: https://github.com/ansible/ansible-lint.git
    rev: v5.2.1
    rev: v6.0.2
    hooks:
      - id: ansible-lint

+5 −4
Original line number Diff line number Diff line
---
- name: Update APT sources
  raw: apt-get update
  ansible.builtin.raw: apt-get update
  changed_when: false

- name: APT install Python
  raw: DEBIAN_FRONTEND=noninteractive apt-get install -qy python3
  ansible.builtin.raw: |-
    DEBIAN_FRONTEND=noninteractive apt-get install -qy python3
  register: debian_bootstrap_install_python3
  changed_when: "'Unpacking' in debian_bootstrap_install_python3.stdout"

- name: Install requirements for more complete facts
  apt:
  ansible.builtin.apt:
    name:
      - iproute2
      - lsb-release
@@ -18,4 +19,4 @@
    cache_valid_time: 3600

- name: Gather facts
  setup:
  ansible.builtin.setup:
+4 −4
Original line number Diff line number Diff line
@@ -4,19 +4,19 @@
    daemon_reload: true

- name: Rebuild initramfs
  command:
  ansible.builtin.command:
    cmd: update-initramfs -u

- name: Update GRUB
  command:
  ansible.builtin.command:
    cmd: update-grub

- name: Restart the SSH daemon
  service:
  ansible.builtin.service:
    name: ssh
    state: restarted

- name: Restart Docker
  service:
  ansible.builtin.service:
    name: docker
    state: restarted
+2 −2
Original line number Diff line number Diff line
---
- name: Install btrfs packages
  apt:
  ansible.builtin.apt:
    cache_valid_time: 3600
    name:
      - btrfs-progs
@@ -8,7 +8,7 @@
    state: present

- name: Copy btrfs backup script
  copy:
  ansible.builtin.copy:
    dest: /usr/local/sbin/btrfs-backup
    group: root
    mode: preserve
+5 −5
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
- name: Disable cgroup2 for Docker
  # yamllint disable-line rule:line-length
  when: ansible_facts.packages['docker.io'][0]["version"] is version('20.10', operator='<=')
  lineinfile:
  ansible.builtin.lineinfile:
    backup: true
    line: |-
      GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.unified_cgroup_hierarchy=0"
@@ -14,7 +14,7 @@
    - Update GRUB

- name: Copy the script to start stopped container after a restart
  copy:
  ansible.builtin.copy:
    dest: /usr/share/docker.io/restart-containers
    mode: preserve
    src: docker-restart
@@ -23,13 +23,13 @@
  loop:
    - service
    - socket
  file:
  ansible.builtin.file:
    path: /etc/systemd/system/docker.{{ item }}.d
    mode: 0o0755
    state: directory

- name: Restart stopped containers after a restart
  copy:
  ansible.builtin.copy:
    content: |
      [Service]
      ExecStartPost=/usr/share/docker.io/restart-containers
@@ -39,7 +39,7 @@
    - Systemd daemon reload

- name: Allow access from the toolbox container
  copy:
  ansible.builtin.copy:
    content: |
      [Socket]
      SocketGroup=nimrod
Loading