fix osp-13 issues
1.switch to get-pip.py script to install pip on undercloud 2.pip the python-openstackclient at 3.11.0 for python2 3.make the tripleo based hostfile script as default choice Change-Id: Idc90832ee9372954e4e05ce36a0a00886a427bce
This commit is contained in:
parent
bdf3de9010
commit
fda773c682
@ -52,3 +52,11 @@ fi
|
|||||||
|
|
||||||
sed -i '1iBrowbeat:\n hosts:\n undercloud: {}' ${out_file}
|
sed -i '1iBrowbeat:\n hosts:\n undercloud: {}' ${out_file}
|
||||||
sed -i '$aStockpile:\n hosts:\n undercloud: {}' ${out_file}
|
sed -i '$aStockpile:\n hosts:\n undercloud: {}' ${out_file}
|
||||||
|
|
||||||
|
# Copy heat-admin key so we can use jumpbox
|
||||||
|
echo ""
|
||||||
|
echo "---------------------------"
|
||||||
|
echo "Copying heat-admin key to local machine for use with ssh config file"
|
||||||
|
echo "---------------------------"
|
||||||
|
echo ""
|
||||||
|
scp -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" "${user}@${tripleo_ip_address}":/home/${user}/.ssh/id_rsa heat-admin-id_rsa
|
||||||
|
@ -42,9 +42,17 @@
|
|||||||
when: ansible_distribution_major_version == '8'
|
when: ansible_distribution_major_version == '8'
|
||||||
|
|
||||||
- name: Install pip
|
- name: Install pip
|
||||||
easy_install:
|
block:
|
||||||
name: pip
|
- name: get the pip installer
|
||||||
become: true
|
get_url:
|
||||||
|
validate_certs: no
|
||||||
|
url: "https://bootstrap.pypa.io/pip/2.7/get-pip.py"
|
||||||
|
dest: "/tmp/get-pip.py"
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: run pip installer
|
||||||
|
shell: python /tmp/get-pip.py
|
||||||
|
|
||||||
when: ansible_distribution_major_version < '8'
|
when: ansible_distribution_major_version < '8'
|
||||||
|
|
||||||
- name: Update virtualenv and setuptools
|
- name: Update virtualenv and setuptools
|
||||||
@ -95,23 +103,32 @@
|
|||||||
path: "{{ browbeat_path }}/ansible/hosts"
|
path: "{{ browbeat_path }}/ansible/hosts"
|
||||||
register: hosts_file_exists
|
register: hosts_file_exists
|
||||||
|
|
||||||
- debug: msg="Hosts file is already generated."
|
- name: Determine if generate_tripleo_inventory has been run
|
||||||
when: hosts_file_exists.stat.exists and hosts_file_exists.stat.isreg
|
stat:
|
||||||
|
path: "{{ browbeat_path }}/ansible/hosts.yml"
|
||||||
|
register: hosts_yml_file_exists
|
||||||
|
|
||||||
|
- name: set either of inventory file exists
|
||||||
|
set_fact:
|
||||||
|
inventry_file: "{{ (hosts_file_exists.stat.exists and hosts_file_exists.stat.isreg) or (hosts_yml_file_exists.stat.exists and hosts_yml_file_exists.stat.isreg) }}"
|
||||||
|
|
||||||
|
- debug: msg="Hosts file is already generated. {{ inventry_file }}"
|
||||||
|
when: inventry_file
|
||||||
|
|
||||||
- name: Generate hosts and ssh-config on Browbeat Machine - Default(stack)
|
- name: Generate hosts and ssh-config on Browbeat Machine - Default(stack)
|
||||||
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_hostfile.sh -t localhost --user stack
|
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_inventory.sh -l --user stack
|
||||||
when: tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg) and ansible_user!= "zuul"
|
when: tripleo and (not inventry_file) and ansible_user!= "zuul"
|
||||||
|
|
||||||
- name: Generate hosts and ssh-config on Browbeat Machine - Zuul
|
- name: Generate hosts and ssh-config on Browbeat Machine - Zuul
|
||||||
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_hostfile.sh -t localhost --user zuul
|
shell: . {{ home_dir }}/stackrc; {{ browbeat_path }}/ansible/generate_tripleo_inventory.sh -l --user zuul
|
||||||
when: tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg) and ansible_user== "zuul"
|
when: tripleo and (not inventry_file) and ansible_user== "zuul"
|
||||||
|
|
||||||
- name: Move files to correct location
|
- name: Move files to correct location
|
||||||
command: mv {{ home_dir }}/{{item}} {{ browbeat_path }}/ansible/{{item}}
|
command: mv {{item}} {{ browbeat_path }}/ansible/{{item}}
|
||||||
with_items:
|
with_items:
|
||||||
- hosts
|
- hosts.yml
|
||||||
- heat-admin-id_rsa
|
- heat-admin-id_rsa
|
||||||
when: "(tripleo and (not hosts_file_exists.stat.exists or not hosts_file_exists.stat.isreg))"
|
when: "(tripleo and (not inventry_file))"
|
||||||
|
|
||||||
- name: Install requirements.txt into browbeat-venv
|
- name: Install requirements.txt into browbeat-venv
|
||||||
pip:
|
pip:
|
||||||
|
@ -8,7 +8,7 @@ browbeat:
|
|||||||
# rerun_type: complete
|
# rerun_type: complete
|
||||||
rerun_type: iteration
|
rerun_type: iteration
|
||||||
ansible:
|
ansible:
|
||||||
hosts: ansible/hosts
|
hosts: ansible/hosts.yml
|
||||||
metadata_playbook: ansible/gather/stockpile.yml
|
metadata_playbook: ansible/gather/stockpile.yml
|
||||||
logging_playbook: ansible/common_logging/browbeat_logging.yml
|
logging_playbook: ansible/common_logging/browbeat_logging.yml
|
||||||
ssh_config: ansible/ssh-config
|
ssh_config: ansible/ssh-config
|
||||||
|
@ -7,7 +7,8 @@ pyrsistent>=0.17.0;python_version>='3'
|
|||||||
grafyaml>=0.0.7
|
grafyaml>=0.0.7
|
||||||
openstacksdk
|
openstacksdk
|
||||||
python-dateutil>=2.4.2
|
python-dateutil>=2.4.2
|
||||||
python-openstackclient>=3.11.0
|
python-openstackclient==3.11.0;python_version<'3'
|
||||||
|
python-openstackclient>=3.11.0;python_version>='3'
|
||||||
pykwalify==1.7.0;python_version<'3'
|
pykwalify==1.7.0;python_version<'3'
|
||||||
pykwalify>=1.8.0;python_version>='3'
|
pykwalify>=1.8.0;python_version>='3'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user