From 6d6910c969ecafbcdfe690f1ce3cd27ba4d51eb7 Mon Sep 17 00:00:00 2001 From: sighmon Date: Tue, 19 Nov 2024 19:49:31 +1030 Subject: [PATCH] #150 Update include to include_tasks for Ansible v2 --- ansible/roles/hkcam/tasks/main.yml | 4 ++-- ansible/roles/runit/tasks/install.yml | 4 ++-- ansible/roles/runit/tasks/main.yml | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ansible/roles/hkcam/tasks/main.yml b/ansible/roles/hkcam/tasks/main.yml index 31ac1e9..3a96f29 100644 --- a/ansible/roles/hkcam/tasks/main.yml +++ b/ansible/roles/hkcam/tasks/main.yml @@ -1,8 +1,8 @@ --- -- include: install.yml +- include_tasks: install.yml tags: [install] -- include: configure.yml +- include_tasks: configure.yml tags: [configure] - import_role: diff --git a/ansible/roles/runit/tasks/install.yml b/ansible/roles/runit/tasks/install.yml index a98f6d4..728f615 100644 --- a/ansible/roles/runit/tasks/install.yml +++ b/ansible/roles/runit/tasks/install.yml @@ -11,7 +11,7 @@ file: path={{ runit_runsvdir_dir }} mode=0755 state=directory - name: Check if {{ runit_startup_file }} exists - stat: path={{ runit_startup_file }} get_md5=no get_checksum=no + stat: path={{ runit_startup_file }} get_checksum=no register: file - name: Create startup script at {{ runit_startup_file }} @@ -33,4 +33,4 @@ shell: sed -i -e '$i {{ runit_startup_file }} &\n' /etc/rc.local args: warn: false - when: check.rc != 0 \ No newline at end of file + when: check is defined and check.rc is defined and check.rc != 0 \ No newline at end of file diff --git a/ansible/roles/runit/tasks/main.yml b/ansible/roles/runit/tasks/main.yml index e6771ff..aaba7c5 100644 --- a/ansible/roles/runit/tasks/main.yml +++ b/ansible/roles/runit/tasks/main.yml @@ -1,14 +1,14 @@ --- -- include: install.yml +- include_tasks: install.yml -- include: add.yml +- include_tasks: add.yml when: service_name is defined -- include: enabled.yml +- include_tasks: enabled.yml when: enabled is defined and service_name is defined -- include: envs.yml +- include_tasks: envs.yml when: envs is defined and service_name is defined -- include: state.yml +- include_tasks: state.yml when: state is defined and service_name is defined \ No newline at end of file