diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-21 19:01:59 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-21 19:01:59 +0200 |
commit | f20e3bf3557451047a3ab035de503cd2ce35a550 (patch) | |
tree | aee99bb289cf4ca1a85ac983e8148f2eb1b8d82c /roles/common | |
parent | my_server: update docker-compose flags (diff) | |
download | maintenance-f20e3bf3557451047a3ab035de503cd2ce35a550.tar.gz maintenance-f20e3bf3557451047a3ab035de503cd2ce35a550.zip |
fix some ansible-lint warnings
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/common/tasks/main.yml | 5 | ||||
-rw-r--r-- | roles/common/tasks/tool.yml | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index f569bd6..4942957 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -1,5 +1,5 @@ - name: Reboot - reboot: + ansible.builtin.reboot: args: # On my trusty old Raspberry Pi 1 Model B+, /proc/sys/kernel/random/boot_id # can sometimes stay the same between reboots. Apparently, not enough @@ -17,7 +17,7 @@ - name: Wait for connectivity # One of the nodes is the VPN server connecting all the other nodes, wait # until all of them are back up: - wait_for_connection: + ansible.builtin.wait_for_connection: args: # 5 minutes is plenty. timeout: 300 diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 558f268..fb0eaed 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,4 +1,5 @@ -- include_tasks: tool.yml +- name: Check available tools + ansible.builtin.include_tasks: tool.yml loop: - apt - docker @@ -11,6 +12,6 @@ - name: Check if /etc is versioned become: true - stat: + ansible.builtin.stat: path: /etc/.git/config register: etc_versioned diff --git a/roles/common/tasks/tool.yml b/roles/common/tasks/tool.yml index f8fda64..48d0acc 100644 --- a/roles/common/tasks/tool.yml +++ b/roles/common/tasks/tool.yml @@ -1,8 +1,8 @@ - name: "Check for {{ item }}" - command: "{{ item }} --version" + ansible.builtin.command: "{{ item }} --version" register: cmd_result changed_when: false failed_when: false - name: "Set fact about {{ item }}" - set_fact: "has_{{ item | replace('-', '_') }}={{ cmd_result.rc == 0 }}" + ansible.builtin.set_fact: "has_{{ item | replace('-', '_') }}={{ cmd_result.rc == 0 }}" |