이 섹션에서는 마이그레이션 후 모든 자동화 컨트롤러 노드에서 자동화 컨트롤러 UI에 액세스할 수 없는 경우 실행해야 하는 Ansible 플레이북을 제공합니다. 이렇게 하면 SELinux 컨텍스트 및 4장. 인프라 마이그레이션 섹션에 설명된 인증서 불일치 문제가 해결됩니다.
아래 Ansible Playbook 콘텐츠를 복사하여 분류되지 않은 설치 프로그램 디렉터리 내의 post_upgrade_playbook.yml 이라는 파일에 배치합니다.
참고
이 디렉터리는 설치 프로그램 인벤토리 파일로 구성되며 이 플레이북은 설치 프로그램 인벤토리를 사용하여 자동화 컨트롤러 노드를 약간 변경합니다.
post_upgrade_playbook.yml
---
- name: Play to apply workaround to known issues in upgrade
hosts: automationcontroller
become: true
tasks:
- block:
- name: Remove certs from all the controllers
file:
name: "{{ item }}"
state: absent
loop:
- /etc/tower/tower.cert
- /etc/tower/tower.key
- name: Role to create new certs and copy to all controllers
include_role:
name: ansible.automation_platform_installer.nginx
when:
- automation_platform_version is version('2.1.1', '<=')
- name: Add to targeted policy and apply selinux policy to controller dirs
ansible.builtin.command: "{{ item }}"
loop:
- semodule -s targeted -i /usr/share/selinux/targeted/automation-controller.pp
- /sbin/restorecon -R /var/lib/awx/venv /var/lib/awx/job_status /var/run/tower
- name: Restart the controller service
service:
name: automation-controller
state: restarted
---
- name: Play to apply workaround to known issues in upgrade
hosts: automationcontroller
become: true
tasks:
- block:
- name: Remove certs from all the controllers
file:
name: "{{ item }}"
state: absent
loop:
- /etc/tower/tower.cert
- /etc/tower/tower.key
- name: Role to create new certs and copy to all controllers
include_role:
name: ansible.automation_platform_installer.nginx
when:
- automation_platform_version is version('2.1.1', '<=')
- name: Add to targeted policy and apply selinux policy to controller dirs
ansible.builtin.command: "{{ item }}"
loop:
- semodule -s targeted -i /usr/share/selinux/targeted/automation-controller.pp
- /sbin/restorecon -R /var/lib/awx/venv /var/lib/awx/job_status /var/run/tower
- name: Restart the controller service
service:
name: automation-controller
state: restarted
Copy to ClipboardCopied!Toggle word wrapToggle overflow