replace hard-coded usernames with remote_user variable
This commit is contained in:
parent
ee4a13c926
commit
ad8e3cc155
5 changed files with 36 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
#cloud-config
|
||||
users:
|
||||
- name: hybris
|
||||
- name: {{ remote_user }}
|
||||
lock-passwd: false
|
||||
passwd: $1$tG6Uv4$BPCIRF6RFuLrJ.lQO1GB8.
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
|
@ -12,9 +12,9 @@ write_files:
|
|||
# inet6_addr=$(ip a s | grep "inet6 2001:470:6d:22c:" | awk '{print substr($2,0)}')
|
||||
sudo hostnamectl set-hostname {{ item.hostname }}
|
||||
sudo ip -6 addr add {{ item.ipv6 }}/64 dev eth0
|
||||
sudo chown -R hybris:hybris /home/hybris
|
||||
path: /home/hybris/cloud-init.sh
|
||||
owner: hybris:hybris
|
||||
sudo chown -R {{ remote_user }}:{{ remote_user }} /home/{{ remote_user }}
|
||||
path: /home/{{ remote_user }}/cloud-init.sh
|
||||
owner: {{ remote_user }}:{{ remote_user }}
|
||||
permissions: '0744'
|
||||
runcmd:
|
||||
- [ '/home/hybris/cloud-init.sh' ]
|
||||
- [ '/home/{{ remote_user }}/cloud-init.sh' ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue