Skip to content

Commit a89b678

Browse files
authored
refactor(ansible): bring our ansible up to modern ansible-lint standards (#1819)
1 parent d584651 commit a89b678

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

ansible/tasks/setup-migrations.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
- name: Run migrate.sh script
2-
shell: ./migrate.sh
3-
register: retval
4-
when: debpkg_mode or stage2_nix
5-
args:
6-
chdir: /tmp/migrations/db
7-
failed_when: retval.rc != 0
1+
- name: run debpkg_mode or stage2_nix tasks
2+
when:
3+
- (debpkg_mode or stage2_nix)
4+
block:
5+
- name: Run migrate.sh script
6+
ansible.builtin.command:
7+
cmd: './migrate.sh'
8+
args:
9+
chdir: '/tmp/migrations/db'
10+
failed_when:
11+
- retval['rc'] != 0
12+
register: 'retval'
813

9-
- name: Create /root/MIGRATION-AMI file
10-
file:
11-
path: "/root/MIGRATION-AMI"
12-
state: touch
13-
when: debpkg_mode or stage2_nix
14+
- name: Create /root/MIGRATION-AMI file
15+
ansible.builtin.file:
16+
path: '/root/MIGRATION-AMI'
17+
state: 'touch'

0 commit comments

Comments
 (0)