Skip to content

Commit

Permalink
M #-: Various oneprovison/ansible updates (#3202)
Browse files Browse the repository at this point in the history
- allow newer ansible in provision
 - remove unsused files, roles
 - simplify opennebula-node-kvm
 - remove unsued ceonts files,
 - rename yaml -> yml
 - replace `include:` with `include_tasks:`
 - don't restart frr
 - bump Ceph version in HCI to Reef, adopt ceph-opennebula-mon
  • Loading branch information
xorel authored Aug 16, 2024
1 parent a7da395 commit 92541b6
Show file tree
Hide file tree
Showing 46 changed files with 69 additions and 553 deletions.
12 changes: 6 additions & 6 deletions share/oneprovision/ansible/ansible.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ deprecation_warnings = False
display_skipped_hosts = False
stdout_callback = yaml
host_key_checking = False
roles_path = <%= ans_loc %>/roles:/var/lib/one/.ansible/roles:/var/lib/one/.ansible/ceph-7.0/roles
action_plugins = /var/lib/one/.ansible/ceph-7.0/plugins/actions
callback_plugins = /var/lib/one/.ansible/ceph-7.0/plugins/callback
filter_plugins = /var/lib/one/.ansible/ceph-7.0/plugins/filter
library = /var/lib/one/.ansible/ceph-7.0/library
module_utils = /var/lib/one/.ansible/ceph-7.0/module_utils
roles_path = <%= ans_loc %>/roles:/var/lib/one/.ansible/roles:/var/lib/one/.ansible/ceph-8.0/roles
action_plugins = /var/lib/one/.ansible/ceph-8.0/plugins/actions
callback_plugins = /var/lib/one/.ansible/ceph-8.0/plugins/callback
filter_plugins = /var/lib/one/.ansible/ceph-8.0/plugins/filter
library = /var/lib/one/.ansible/ceph-8.0/library
module_utils = /var/lib/one/.ansible/ceph-8.0/module_utils

[privilege_escalation]
become = yes
Expand Down
10 changes: 3 additions & 7 deletions share/oneprovision/ansible/ceph_hci/group_vars.yml.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
---
# Ceph basics
ceph_origin: repository
ceph_repository: uca
ceph_repository: community
ceph_rhcs_version: 7
ceph_stable_release: quincy
ceph_stable_release_num: 17
ceph_stable_release: reef
ceph_stable_release_num: 18
dashboard_enabled: false
configure_firewall: false
ceph_stable_mapping:
'20': yoga
'22': bobcat
ceph_stable_openstack_release_uca: "{{ ceph_stable_mapping[ansible_distribution_major_version] }}"

# ceph overrides (applying in ceph.conf)
ceph_conf_overrides:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
- name: Set Ceph auth command init
set_fact: ceph_opennebula_mon_pools_auth=[]
- name: Create oneadmin keys
vars:
_profiles_with_pools: >-
{{ ceph_opennebula_mon_pools | map(attribute='name')
| map('regex_replace', '^', 'profile rbd pool=')
| join(',') }}
- name: Set Ceph auth command pools
set_fact: ceph_opennebula_mon_pools_auth="{{ ceph_opennebula_mon_pools_auth }} + [ 'profile rbd pool={{ item.name }}' ]"
with_items: "{{ ceph_opennebula_mon_pools }}"

- name: Create oneadmin keys for Ceph Luminous+
command: ceph auth get-or-create client.oneadmin mon 'profile rbd' osd '{{ ceph_opennebula_mon_pools_auth | join(",") }}'
command: ceph auth get-or-create client.oneadmin mon 'profile rbd' osd '{{ _profiles_with_pools }}'
changed_when: false

- name: get oneadmin key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
- name: open /etc/ceph
file: path=/etc/ceph mode=0755

- include: pool.yml
- include_tasks: pool.yml

- include: auth.yml
- include_tasks: auth.yml

- include: tunables.yml
- include_tasks: tunables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# configure libvirt secretes
- name: Include libvirt configuration tasks
include: libvirt.yml
include_tasks: libvirt.yml
when: ceph_opennebula_osd_libvirt_enabled

# stop and disable docker on hypervisors
Expand Down
39 changes: 0 additions & 39 deletions share/oneprovision/ansible/roles/ddc/tasks/clean_netconfigs.yml

This file was deleted.

2 changes: 0 additions & 2 deletions share/oneprovision/ansible/roles/ddc/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@
masked: yes
state: stopped
ignore_errors: yes

- include: clean_netconfigs.yml
4 changes: 4 additions & 0 deletions share/oneprovision/ansible/roles/frr/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: restart frr
service:
name: frr
state: restarted
8 changes: 7 additions & 1 deletion share/oneprovision/ansible/roles/frr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
template:
src: bgpd_rr.conf.j2
dest: /etc/frr/bgpd.conf
notify: restart frr
when:
- vars['ansible_' + frr_iface].ipv4.address is defined
- vars['ansible_' + frr_iface].ipv4.address in rr_servers
Expand All @@ -64,6 +65,7 @@
template:
src: bgpd.conf.j2
dest: /etc/frr/bgpd.conf
notify: restart frr
when:
- vars['ansible_' + frr_iface].ipv4.address is defined
- not vars['ansible_' + frr_iface].ipv4.address in rr_servers
Expand All @@ -72,27 +74,31 @@
template:
src: zebra.conf.j2
dest: /etc/frr/zebra.conf
notify: restart frr
when: frr_zebra == true

- name: Configure Staticd
template:
src: staticd.conf.j2
dest: /etc/frr/staticd.conf
notify: restart frr
when: frr_zebra == true

- name: Remove frr.conf
file:
path: /etc/frr/frr.conf
state: absent
notify: restart frr

- name: Enable BGP daemon
replace:
path: /etc/frr/daemons
regexp: '^bgpd=no'
replace: 'bgpd=yes'
notify: restart frr

- name: Start FRR service
service:
name: frr
state: restarted
state: started
enabled: yes
6 changes: 2 additions & 4 deletions share/oneprovision/ansible/roles/iptables/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
reload: yes

- block:
- include: redhat.yml
when: ansible_os_family == "RedHat"
- include: debian.yml
- include_tasks: debian.yml
when: ansible_os_family == "Debian"
when: iptables_manage_persistent

- include: rules.yml
- include_tasks: rules.yml
27 changes: 0 additions & 27 deletions share/oneprovision/ansible/roles/iptables/tasks/redhat.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
###############################################################################
# Valid defaults
###############################################################################

# Whether to use the ev package for kvm
opennebula_node_kvm_use_ev: False

# Enable nested KVM virtualization
opennebula_node_kvm_param_nested: False

# Enable KVM configuration
opennebula_node_kvm_manage_kvm: True

# SELinux booleans to configure
opennebula_node_selinux_booleans:
- { name: 'virt_use_nfs', state: 'yes' }

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 92541b6

Please sign in to comment.