Ensure cloud-init config dir exists
In some cases, it may happen cloud-init isn't installed (on the UC, for instance). In such cases, the directory doesn't exist, and ansible fails to push the file to this location, leading to a deploy error. Change-Id: I02b8aef9bf8ae73556ade37a20bd0afda2786321 Related-Bug: #1958332
This commit is contained in:
parent
e23554218c
commit
7d16b0f33f
@ -54,6 +54,11 @@
|
||||
when: os_net_config_returncode_stat.stat.exists
|
||||
register: os_net_config_returncode_slurp
|
||||
|
||||
- name: Ensure we get cloud-init
|
||||
stat:
|
||||
path: /etc/cloud/cloud.cfg.d
|
||||
register: cloud_init_exists
|
||||
|
||||
- name: NetworkConfig
|
||||
become: true
|
||||
block:
|
||||
@ -104,6 +109,8 @@
|
||||
when:
|
||||
- NetworkConfig_result.rc is defined
|
||||
- NetworkConfig_result.rc == 0
|
||||
- cloud_init_exists.stat.exists
|
||||
- cloud_init_exists.stat.isdir
|
||||
|
||||
# os-net-config currently relies on the legacy network
|
||||
# so we need to ensure it's enabled on boot. This should
|
||||
|
Loading…
Reference in New Issue
Block a user