Create Symlink /usr/bin/ansible-playbook-3 when not exist

ansible-playbook-3 binary is no longer shipped with
ansible 2.9 package[1], so let's create it if it doesn't
exist. Once all usages of ansible-playbook-3 are removed
these all compatibility tasks can be cleaned up.

Also remove symlink creation of /usr/local/bin/ansible-playbook*,
as those were created temporary for fedora support[2].

[1] https://src.fedoraproject.org/rpms/ansible/blob/master/f/ansible.spec
[2] https://review.opendev.org/#/c/632768/

Partial-Bug: #1873443
Change-Id: I40c860f22993efbe375c741c63513d764ba4eebc
This commit is contained in:
yatinkarel 2020-04-17 17:11:22 +05:30
parent 249aea8bd1
commit 780b5fc46d
1 changed files with 2 additions and 12 deletions

View File

@ -98,22 +98,12 @@
path: /usr/bin/ansible-playbook-3
register: stat_ansible_playbook_3
- name: Symlink /usr/local/bin/ansible-playbook to /usr/bin/ansible-playbook-3
become: true
file:
state: link
src: /usr/bin/ansible-playbook-3
path: /usr/local/bin/ansible-playbook
when:
- not stat_ansible_playbook.stat.exists
- stat_ansible_playbook_3.stat.exists
- name: Symlink /usr/local/bin/ansible-playbook-3 to /usr/bin/ansible-playbook
- name: Symlink /usr/bin/ansible-playbook-3 to /usr/bin/ansible-playbook
become: true
file:
state: link
src: /usr/bin/ansible-playbook
path: /usr/local/bin/ansible-playbook-3
path: /usr/bin/ansible-playbook-3
when:
- stat_ansible_playbook.stat.exists
- not stat_ansible_playbook_3.stat.exists