oopen-server/roles/ansible_dependencies/tasks/main.yml
2019-06-28 02:28:50 +02:00

64 lines
1.9 KiB
YAML

---
- name: re-synchronize the package index files from their sources
raw: apt-get update
- name: Ensure aptitude is present
raw: test -e /usr/bin/aptitude || apt-get install aptitude -y
- name: dpkg --configure -a
command: >
dpkg --configure -a
args:
warn: false
changed_when: _dpkg_configure.stdout_lines | length
register: _dpkg_configure
when: apt_dpkg_configure|bool
tags:
- ansible-dependencies
- name: apt upgrade
apt:
upgrade: "{{ apt_upgrade_type }}"
update_cache: true
dpkg_options: "{{ apt_upgrade_dpkg_options | join(',') }}"
when: apt_upgrade|bool
tags:
- ansible-dependencies
- name: apt install ansible dependencies
apt:
name: "{{ apt_ansible_dependencies }}"
state: "{{ apt_install_state }}"
tags:
- ansible-dependencies
#- name: Ensure python2 is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/python2 || (apt -y update && apt install -y python)
#
#
#- name: Ensure python-apt is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/python2 && (apt -y update && apt install -y python-apt)
#
#
#- name: Ensure python3 is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3)
#
#
#- name: Ensure python-apt is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-apt)
#
#
#- name: Ensure sudo is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/sudo || (apt -y update && apt install -y sudo)
#
#
#- name: Ensure lsb-releaseis present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/lsb_release || (apt -y update && apt install -y lsb-release)
#
#
#- name: Ensure vim is present (This is necessary for ansible to work properly)
# raw: test -e /usr/bin/vim || (apt -y update && apt install -y vim)
#