]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: fix set_radosgw_address.yml stable-4.0
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 5 Jul 2022 08:27:39 +0000 (10:27 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 6 Jul 2022 17:49:27 +0000 (19:49 +0200)
use `include_tasks` instead of `import_tasks`.
Given that with `import_tasks` statements are preprocessed
and the tasks that defines it hasn't been run yet, it will fail
and complain like following:

```
The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute '_interface'
```

Using `include_tasks` instead fixes this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 434793e2feec64fdbbb8a7bdb959b08dacbb2006)

roles/ceph-facts/tasks/facts.yml

index 4b35971528cf272b8f1cede307dac91676ab10c0..0c2d4041c1e40e5092cbaa1ff68b302fc76c70f4 100644 (file)
   when: groups.get(mon_group_name, []) | length > 0
 
 - name: import_tasks set_radosgw_address.yml
-  import_tasks: set_radosgw_address.yml
+  include_tasks: set_radosgw_address.yml
   when: inventory_hostname in groups.get(rgw_group_name, [])
 
 - name: set ntp service name depending on OS family