cloudinit
Merge request reports
Activity
@handreas home directory of ec2-user should be local_home
[ec2-user@m3-login2 ~]$ pwd /local_home/ec2-user
@tngu0050 ...not during cloud init. this is at the creation time of the VM local home comes into play via ansible. this is before ansible
openstack server create --wait --flavor mon.c36r170.numa.mlx --key-name hpc \ --availability-zone monash-03:...l.. \ ..... --security-group default --security-group NFS --user-data=cloudinit.sh \ --property ansible_host_groups='["ComputeNodes"]' --property ansible_user='ec2-user' --property project_name='m3test4' \ fancyVMname
mentioned in commit b3238a7b
I don't think you should make assumptions about what the homedir is at the time cloudinit runs. I use the following #!/bin/bash whoami sed -i 's/^ssh/cert-authority ssh/' /home/ec2-user/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /local_home/ec2-user/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /home/ubuntu/.ssh/authorized_keys sed -i 's/^ssh/cert-authority ssh/' /local_home/ubuntu/.ssh/authorized_keys exit 0 personally, so the same userdata can be applied on m3, non-m3 centos and ubuntu