role_ansible/tasks/main.yml

31 lines
855 B
YAML

---
###########################################################################
#
# This playbook will install ansible to the target host.
#
###########################################################################
# tasks file for ansible role
############################################################
# ensure python3-pip package has been installed
- name: Confirm python-pip3 installed (Ubuntu/Debian)
apt:
name:
- python3-pip
state: latest
when: ansible_os_family == "Debian"
############################################################
# using the pip3 command rather than the pip ansible module
# because ansible can get in a weird state depending on the
# python version used on the target host
- debug: msg="Installing ansible via pip"
- name: Installed ansible using pip3
shell:
cmd: pip3 install ansible
# EOF