Qualify some more ansible and ansible-puull related stuff

This commit is contained in:
Salt 2020-09-02 22:01:31 -05:00
parent af1d6d7905
commit 4b543de41e
2 changed files with 30 additions and 19 deletions

View File

@ -10,6 +10,8 @@
mode: "0600"
become: yes
become_user: ansible
- name: Configure systemd unit
block:
- name: Template out services
template:
src: "{{ item.src }}"
@ -26,4 +28,5 @@
enabled: yes
state: started
notify: restart ansiblepull timer
when: ansible_service_mgr == "systemd"
become: yes

View File

@ -5,15 +5,23 @@
block:
- name: Install Ansible-required packages via apt
apt:
name: "{{ packages }}"
vars:
packages:
name:
- python3-pip
- python3-boto
- python3-boto3
- python3-botocore
- python3-setuptools
become: true
when: ansible_distribution == "Ubuntu"
- name: Install Ansible-required packages via apk
apk:
name:
- py3-pip
- py3-boto
- py3-boto3
- py3-botocore
- py3-setuptools
when: ansible_distribution == "Alpine"
- name: Install Ansible-required packages via pip
pip:
name: "{{ packages }}"