We need to differentiate local_working_dir from working_dir as well as decouple the stack user from `ansible_user` var. Both of these are causing issues as we begin to automate deployments in more environments. - Cleanup duplicate variables that are consumed via extras-common - Note: extras-common depends on the common role in OOOQ - Cleanup redundant var and superfluous quotes from overcloud-scale role - Cleanup redundant comments in <role>/defaults/main.yml Closes-bug: 1654574 Change-Id: I9c7a3166ed1fc5042c11e420223134ea912b45c5
28 lines
646 B
YAML
28 lines
646 B
YAML
---
|
|
- name: Copy create non-root user script
|
|
template:
|
|
src: non_root_user_setup.sh.j2
|
|
dest: "/tmp/non_root_user_setup.sh"
|
|
mode: 0755
|
|
|
|
- name: Run the non_root_user script
|
|
command: "/tmp/non_root_user_setup.sh"
|
|
|
|
- name: Create undercloud access key
|
|
delegate_to: localhost
|
|
command: >
|
|
ssh-keygen -f {{ undercloud_key }} -N ''
|
|
-C 'ansible_generated_virt_host'
|
|
-t rsa -b 4096
|
|
args:
|
|
creates: "{{ undercloud_key }}"
|
|
|
|
- name: Configure non-root user authorized_keys on undercloud
|
|
authorized_key:
|
|
user: "{{ undercloud_user }}"
|
|
key: "{{ item }}"
|
|
with_file:
|
|
- "{{ undercloud_key }}.pub"
|
|
become: true
|
|
|