Merge pull request #122 from diranetafen/cloud-init-disable
Cloud init disable
This commit is contained in:
commit
0429d616ff
12
ansible/disable-cloud-init.yml
Normal file
12
ansible/disable-cloud-init.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
# Cloud-init ‘s searches for network configuration in order of
|
||||
# increasing precedence; each item overriding the previous.
|
||||
# In some cases cloud-init reconfigure automatically network interface
|
||||
# and cause some issues in network configuration
|
||||
- name: Disable Cloud-init service
|
||||
hosts: overcloud
|
||||
tags:
|
||||
- disable-cloud-init
|
||||
roles:
|
||||
- role: disable-cloud-init
|
||||
when: disable_cloud_init | bool
|
@ -16,6 +16,9 @@ overcloud_groups: >
|
||||
# should not be added to the inventory.
|
||||
overcloud_group_hosts_map: {}
|
||||
|
||||
# To prevent some network issues you can choose to disable cloud-init
|
||||
disable_cloud_init: False
|
||||
|
||||
###############################################################################
|
||||
# Overcloud host image configuration.
|
||||
|
||||
|
7
ansible/roles/disable-cloud-init/handlers/main.yml
Normal file
7
ansible/roles/disable-cloud-init/handlers/main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: restart cloud-init daemon
|
||||
systemd:
|
||||
name: cloud-init
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
become: True
|
9
ansible/roles/disable-cloud-init/tasks/main.yml
Normal file
9
ansible/roles/disable-cloud-init/tasks/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Disable cloud init service
|
||||
file:
|
||||
path: /etc/cloud/cloud-init.disabled
|
||||
state: touch
|
||||
mode: "u=rw,g=r,o=r"
|
||||
notify:
|
||||
- restart cloud-init daemon
|
||||
become: True
|
@ -13,6 +13,9 @@
|
||||
# should not be added to the inventory.
|
||||
#overcloud_group_hosts_map:
|
||||
|
||||
# To prevent some network issues you can choose to disable cloud-init
|
||||
#disable_cloud_init:
|
||||
|
||||
###############################################################################
|
||||
# Overcloud host image configuration.
|
||||
|
||||
|
@ -691,7 +691,7 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
|
||||
playbooks += _build_playbook_list("wipe-disks")
|
||||
playbooks += _build_playbook_list(
|
||||
"users", "yum", "dev-tools", "disable-selinux", "network",
|
||||
"sysctl", "disable-glean", "ntp", "lvm")
|
||||
"sysctl", "disable-glean", "disable-cloud-init", "ntp", "lvm")
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks, limit="overcloud")
|
||||
playbooks = _build_playbook_list("kolla-ansible")
|
||||
self.run_kayobe_playbooks(parsed_args, playbooks, tags="config")
|
||||
|
@ -466,6 +466,7 @@ class TestCase(unittest.TestCase):
|
||||
"ansible/network.yml",
|
||||
"ansible/sysctl.yml",
|
||||
"ansible/disable-glean.yml",
|
||||
"ansible/disable-cloud-init.yml",
|
||||
"ansible/ntp.yml",
|
||||
"ansible/lvm.yml",
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user