@@ -8,16 +8,25 @@ timezone: "America/Chicago"
88hostname : ubuntu
99
1010package_update : true # default: true
11- package_upgrade : false # default: false # TODO: set to true
11+ package_upgrade : true # default: false
1212# https://github.com/number5/cloud-init/blob/main/doc/examples/cloud-config-apt.txt#L21
13- apt_get_command : ["apt-get", "--option=Dpkg::Options::=--force-confold", "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "--quiet", "--no-install-recommends"]
13+ apt_get_command : [
14+ " env" ,
15+ " DEBIAN_FRONTEND=noninteractive" ,
16+ " apt-get" ,
17+ " --option=Dpkg::Options::=--force-confold" ,
18+ " --option=Dpkg::options::=--force-unsafe-io" ,
19+ " --assume-yes" ,
20+ " --quiet" ,
21+ " --no-install-recommends"
22+ ]
1423
1524apt :
1625 sources :
17- deadsnakes.list :
18- source : deb http ://ppa.launchpad .net/deadsnakes/ppa/ubuntu $RELEASE main
26+ deadsnakes :
27+ source : deb https ://ppa.launchpadcontent .net/deadsnakes/ppa/ubuntu $RELEASE main
1928 keyid : F23C5A6CF475977595C89F51BA6932366A755776
20- docker.list :
29+ docker :
2130 source : deb https://download.docker.com/linux/ubuntu $RELEASE stable
2231 keyid : 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
2332
@@ -64,14 +73,14 @@ runcmd:
6473 - systemctl enable --now qemu-guest-agent.service
6574 - systemctl enable --now docker
6675 - systemctl enable --now redis-server
67- - runuser -l ubuntu -c " wget -O - https://github.com/pythoninthegrass.keys | sudo tee -a ~/ .ssh/authorized_keys"
68- - runuser -l ubuntu -c " ssh-keyscan github.com >> ~/ .ssh/known_hosts"
69- - runuser -l ubuntu -c " mkdir -p /home/ubuntu/git"
70- - runuser -l ubuntu -c "sudo chmod -R 0777 /home/ubuntu/git"
71- - runuser -l ubuntu -c "sudo chown -R ubuntu:ubuntu /home/ubuntu/git"
72- - runuser -l ansible -c "sudo touch /var/log/ansible.log"
73- - runuser -l ansible -c "sudo chown ansible:ansible /var/log/ansible.log"
74- - runuser -l ansible -c "sudo chmod 0777 /var/log/ansible.log"
76+ - wget -O - https://github.com/pythoninthegrass.keys | sudo tee -a /home/ubuntu/ .ssh/authorized_keys
77+ - ssh-keyscan github.com >> /home/ubuntu/ .ssh/known_hosts
78+ - mkdir -p /home/ubuntu/git
79+ - chmod -R 0777 /home/ubuntu/git
80+ - chown -R ubuntu:ubuntu /home/ubuntu/git
81+ - touch /var/log/ansible.log
82+ - chown ansible:ansible /var/log/ansible.log
83+ - chmod 0777 /var/log/ansible.log
7584 # * smoke test
7685 # - ansible all -m ping -i /etc/ansible/hosts
7786
@@ -86,6 +95,7 @@ write_files:
8695 owner : ubuntu:ubuntu
8796 permissions : ' 0644'
8897 append : false
98+ defer : true
8999 content : |
90100 # Verify that shell is interactive
91101 if [[ $- != *i* ]]; then return; fi
@@ -133,11 +143,13 @@ write_files:
133143
134144 - path : /home/ubuntu/.bash_profile
135145 owner : ubuntu:ubuntu
146+ defer : true
136147 content : |
137148 [[ -s ~/.bashrc ]] && source ~/.bashrc
138149
139150 - path : /home/ubuntu/.gitignore
140151 owner : ubuntu:ubuntu
152+ defer : true
141153 content : |
142154 .env
143155 .gitattributes
@@ -150,6 +162,7 @@ write_files:
150162
151163 - path : /home/ubuntu/.gitconfig
152164 owner : ubuntu:ubuntu
165+ defer : true
153166 content : |
154167 [core]
155168 excludesfile = /home/ubuntu/.gitignore
@@ -163,6 +176,7 @@ write_files:
163176
164177 - path : /etc/ansible/hosts
165178 owner : ansible:ansible
179+ defer : true
166180 content : |
167181 [all]
168182 localhost ansible_connection=local
@@ -225,16 +239,16 @@ write_files:
225239 }
226240
227241# TODO: QA
228- ansible :
229- ansible_config : |
230- [defaults]
231- log_path = /var/log/ansible.log
232- fact_caching = memory
233- install_method : distro
234- package_name : ansible
235- pull :
236- url : " https://github.com/pythoninthegrass/multipass_poc.git"
237- playbook_name : " tasks/git.yml"
242+ # ansible:
243+ # ansible_config: |
244+ # [defaults]
245+ # log_path = /var/log/ansible.log
246+ # fact_caching = memory
247+ # install_method: distro
248+ # package_name: ansible
249+ # pull:
250+ # url: "https://github.com/pythoninthegrass/multipass_poc.git"
251+ # playbook_name: "tasks/git.yml"
238252
239253bootcmd :
240254 - printf "[Resolve]\nDNS=1.1.1.1" > /etc/systemd/resolved.conf
0 commit comments