tripleo-quickstart-extras/roles/baremetal-prep-virthost
Sandeep Yadav c8b9b7ea2b collect only specific network facts
When running a playbook with become: true, it also runs the facts
module with sudo, so ansible_user_dir will have the value of the
root user, rather than the expected home directory of the
ansible_ssh_user.

This can create issues in further tasks as ansible cache is used,
variables like ansible_user_dir can persist when next tasks run.

~~~
fatal: [undercloud]: FAILED! => {"changed": false, "error":
"[Errno 13] Permission denied:
'/root/tripleo_undercloud_install.sh'", "msg": "Unable to
 output shell script /root/tripleo_undercloud_install.sh:
 [Errno 13] Permission denied: '/root/tripleo_undercloud_install.sh'"}
~~~

With this patch, We are modfying making two changes:-

1) Removing not required become: true as interfaces information can be
captured as normal user.

2) Modifying the setup: module to only collect particular network
fact subsets and not even the min subset.

Change-Id: Ib167b88b03f01bb8945c53cd000b5fcac85dd320
2022-04-26 15:47:28 +05:30
..
defaults Integrate undercloud_user var into oooq-extras 2017-01-18 09:32:16 -05:00
meta Adopt yamllint strict linting 2018-11-26 12:37:21 +00:00
tasks collect only specific network facts 2022-04-26 15:47:28 +05:30
templates Update baremetal-prep-virthost for Rhel8/C8 2020-06-16 21:46:15 +05:30
tests lint: enabled whitespace fixes 2020-01-05 14:07:37 +00:00
README.md Adapt code to newer code style (linters) 2018-11-16 12:42:51 +00:00

README.md

Role Name

An Ansible role to set up a machine to host a virtual undercloud for a TripleO deployment on baremetal nodes.

Requirements

This role assumes that the host machine already has a nic on the provisioning network. The role assigns the nic an IP address.

Role Variables

Note: Make sure to include all environment file and options from your initial Overcloud creation

  • virthost_provisioning_interface: -- NIC for the provisioning interface on the undercloud host
  • virthost_provisioning_ip: <192.168.122.1> -- IP address for the provisioning interface on the undercloud host
  • virthost_provisioning_netmask: <255.255.255.192> -- Netmask for the provisioning interface on the undercloud host
  • virthost_provisioning_hwaddr: <52:54:00:00:76:00> -- MAC address the provisioning interface on the undercloud host
  • working_dir: <'/home/stack'> -- working directory for the role.

Dependencies

The playbook included in this role calls https://github.com/redhat-openstack/ansible-role-tripleo-validate-ipmi and https://github.com/redhat-openstack/ansible-role-tripleo-baremetal-overcloud.

Example Playbook

  1. Sample playbook to call the role
- name: Prepare the host for PXE forwarding
  hosts: virthost
  gather_facts: false
  roles:
    - ansible-role-tripleo-baremetal-prep-virthost

License

Apache-2.0

Author Information

RDO-CI Team