tripleo-ci/roles/prepare-node/tasks/main.yaml

59 lines
1.4 KiB
YAML

---
- name: Swap is essential as we are not meeting memory requirements
vars:
configure_swap_size: 8192
include_role:
name: configure-swap
- name: Set legacy log path
include_role:
name: set-zuul-log-path-fact
- name: Ensure legacy workspace directory
file:
path: '{{ workspace }}'
state: directory
- name: Ensure legacy logs directory
file:
path: '{{ workspace }}/logs'
state: directory
- name: Assure src folder has safe permissions
# Workaround for https://bugs.launchpad.net/tripleo/+bug/1807703
file:
path: "{{ ansible_user_dir }}/src/"
state: directory
mode: u=rwX,g=rX,o=rX
recurse: true
- name: "set zuul_dump"
set_fact:
zuul_dump: "{{ {'zuul': zuul} }}"
- name: Dump zuul variables on the host to pass it to inner ansible
copy:
content: "{{ zuul_dump|to_nice_yaml }}"
dest: "{{ workspace }}/logs/zuul-variables.yaml"
- name: Dump hostvars with job variables
set_fact:
local_hostvars: "{{ {'job': hostvars[inventory_hostname]} }}"
- name: Dump hostvars on the host to pass it to inner ansible
copy:
content: "{{ local_hostvars|to_nice_yaml }}"
dest: "{{ workspace }}/logs/hostvars-variables.yaml"
- name: Remove package exclusions from package manager
become: true
ini_file:
path: "{{ item }}"
section: main
option: exclude
state: absent
failed_when: false
with_items:
- /etc/yum.conf
- /etc/dnf/dnf.conf