client-pull-installation/roles/prereq/tasks/prereq.yml

49 lines
1.1 KiB
YAML

---
- name: Domain settings download
get_url:
url: "http://{{ ansible_default_ipv4.gateway }}:3000/domain"
dest: /etc/domain.yml
owner: root
mode: 0644
- name: Creating ansible facts directory
file:
path: /etc/ansible/facts.d
state: directory
owner: root
group: root
mode: 0755
- name: Assuring python-yaml is installed
apt:
name: python-yaml
state: present
- name: Creating facts.d script for the domain settings
copy:
src: domain.fact
dest: /etc/ansible/facts.d/domain.fact
owner: root
group: root
mode: 0755
- name: Loading domain variables
setup: filter=ansible_local
- name: Creating facts.d script for repo/pkg versions
template:
src: checksum.fact
dest: /etc/ansible/facts.d/checksum.fact
mode: 0755
owner: root
group: root
- name: Loading repo/pkg versions
setup: filter=ansible_local
- name: Configuring executive mirrorpath
set_fact:
execmirrorpath: "{{ ansible_local.domain.mirrorpath}}"
when: ansible_local.domain.mirror_mode == 'local' or ansible_local.domain.mirror_mode == 'nfs'