diff options
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbooks/deploy_dependencies.yml | 28 | ||||
-rw-r--r-- | lib/ansible/playbooks/deploy_overcloud.yml | 10 |
2 files changed, 26 insertions, 12 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml index d2749675..545ee33d 100644 --- a/lib/ansible/playbooks/deploy_dependencies.yml +++ b/lib/ansible/playbooks/deploy_dependencies.yml @@ -54,18 +54,24 @@ name: default autostart: yes state: active - - lineinfile: - path: /etc/modprobe.d/kvm_intel.conf - line: 'options kvm-intel nested=1' - create: yes - when: ansible_architecture == "x86_64" - - modprobe: - name: "{{ item }}" - state: present - with_items: - - kvm - - kvm_intel + - shell: cat /sys/module/kvm_intel/parameters/nested || true + register: nested_result when: ansible_architecture == "x86_64" + - name: reload kvm_intel + block: + - lineinfile: + path: /etc/modprobe.d/kvm_intel.conf + line: 'options kvm-intel nested=1' + create: yes + - modprobe: + name: kvm_intel + state: absent + - modprobe: + name: kvm_intel + state: present + when: + - ansible_architecture == "x86_64" + - "'Y' not in nested_result.stdout" - name: Generate SSH key for root if missing shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa - name: Check that /u/l/python3.4/site-packages/virtualbmc/vbmc.py exists diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml index 4d55c8fc..b2d9234a 100644 --- a/lib/ansible/playbooks/deploy_overcloud.yml +++ b/lib/ansible/playbooks/deploy_overcloud.yml @@ -35,10 +35,18 @@ state: restarted enabled: yes become: yes + - name: Remove Ceph OSD from ceph storage role + lineinfile: + path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml + line: ' - OS::TripleO::Services::CephOSD' + owner: root + group: root + state: absent + become: yes - name: Insert Ceph OSDs into Compute role lineinfile: path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml - insertbefore: 'OS::TripleO::Services::NovaCompute' + insertbefore: '^\s*-\sOS::TripleO::Services::NovaCompute$' line: ' - OS::TripleO::Services::CephOSD' owner: root group: root |