
A recent bug [0] and fix upstream no longer ensures that we use the tripleo-admin user as the ansible_ssh_user when invoking ansible playbooks against the undercloud. This means we need to update the keytab group to something else. Using root makes sense because the user invoking the overcloud installation should already have root access. In addition to changing the group, this patch updates the appropriate tasks so there run with `become: true`, allowing them to access the keytab. [0] https://bugs.launchpad.net/tripleo/+bug/1884123 Partial-Bug: 1886870 Change-Id: I523d17f48b8e49e28a1b3becfd5e0cdf044ff742
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
---
|
|
# Copyright 2020 Red Hat, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# The tasks in this file perform the registration process for a service.
|
|
#
|
|
# The following variable are required:
|
|
# - {item} : which is an ordered tuple of the form:
|
|
# -- { sub_host, service }
|
|
#
|
|
# An example of this is:
|
|
# { "controller-5.storagemgmt.example.com", "haproxy" }
|
|
#
|
|
# At this time, the final value in the tuple is unused.
|
|
|
|
- name: set variables
|
|
set_fact:
|
|
sub_host: "{{ item.0 }}"
|
|
service: "{{ item.1 }}"
|
|
|
|
- name: add sub_host
|
|
ipa_host:
|
|
fqdn: "{{ sub_host }}"
|
|
force: true
|
|
state: present
|
|
validate_certs: false
|
|
become: true
|
|
|
|
- name: add service
|
|
ipa_service:
|
|
name: "{{ service }}/{{ sub_host }}"
|
|
force: true
|
|
state: present
|
|
validate_certs: false
|
|
become: true
|
|
register: my_service
|
|
|
|
- name: add host to managed_hosts if needed
|
|
when: base_server_fqdn not in my_service['host']['managedby_host']
|
|
ipa_service:
|
|
name: "{{ service }}/{{ sub_host }}"
|
|
force: true
|
|
state: present
|
|
hosts: "{{ my_service['host']['managedby_host'] + [ base_server_fqdn ] }}"
|
|
validate_certs: false
|
|
become: true
|