-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnms.ci
48 lines (48 loc) · 4.43 KB
/
nms.ci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#cloud-config
hostname: ${hostname}
fqdn: ${hostname}.lab.com
package_update: true
package_upgrade: true
packages:
- python3-pip
users:
- name: ansible
groups: sudo
shell: /bin/bash
lock_passwd: true
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/fRnf6Ze+4WwuLDu9UlHVU2W0WxU3tnM0TDVAJNymm0J99qAe8pKdkAI6TTsHHEVfMmJcuxzhIPGUihade/Xozq2nRk7fSIn4haG6a86xuJCx/x8Q9zJ+ZT6hBxTTog8HGpajROfk41lkb/DJf2u+9giUQJJtsWYr767eB34jo+SLkTp+crU/T0AgY5Cd/GlHETum3IyiEx8fbtBjwVNiitDoy6YCbEYO41MBaLis+ojhq4N18O/TRVaIyfONBpuUWMNXQ1Mm973m/NC+UXCLrIyShQRU7Rex5z7yFcBCf+91/Bx6cHS314j8tdMy1XGv74wKnbU5GOxlUlV+mduSfFZsLwkZ3OthyEykay7HjBhPOsiYQy2t1+bF89dBo8hAD8GJ1xmyP//xju8xF/wt1QJcyuqcXpa39+fI8ZHzWrA9oNnxw0nQwwggeg9rmXd43Zo52hQr+in6xIg7x0NXZS/vNWO770relr1eQ6x78GdIBd8bqsgTCCKYmy8EvZsNrgDAtCuzLpGE2RLVwCSHosuGw4G+2TFAOVrQDFxPnJIi9khL2n36bo0aogSzE0QGPlX5RSNvaJMPq4EdW4oxGYdTRIZqyA22Cmcs5Dn5hG1eC6g5G83A1knCYha8YdTmxVRyTUq6TOMarnbCtj8E3h1bE7Se2yDejObnryQ+3w== herman@bobcat.local
write_files:
- path: /root/ansible/.ssh/id_rsa
permissions: '0600'
encoding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TGRPOHh1MnBYcnZrSHlUKwpaM0tYYitOWE1qK3dXaVUzTTBnNlJNbGt4UUV0TVFEUEU1cnRxMjF2UzYzWjdLT0ZTWEk9Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0t
- path: /root/ansible/.ssh/id_rsa.pub
permissions: '0644'
encoding: b64
content: c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFESFAvc3ZOaG41a3JKVVd5UjdvRjVFbFQ4RC9GMGplSW9PU20xTEVsWnFhclh5d0lzRVpmb2RsQXBycHZyRFFlWHRGR01KbXNvdURNYmpXM1c1ZVNQQkxaRmgrWHIzUnQ2bXh3dStqTnQvOVkrZHBOdUtPQXRzd0IrNHFOYWM2SlFvUnhKeFJ5WUx3MnY0TzVteno1Y2ErQU1rZUpkLzB3SDlCRFpDcERiOFZnMS81N3I5ekxNYitQUW4xZzU1NW1EcGYwVk4vS3YrVzBMUjROUW9VNm5oQU5NNmhOQitwWU90TzZsR1kyZnV4Nmc3ZXUvTklkTktCK1Fac2JpMm1ZSThRUkM4dERoU2NQaGlZR0xJQ3FaMGhtdERMOC9NaXVGTHV2YXBDSHdYOGZWZlpSZE5sYjNiK1ZqYU8zTitlWVhrR3hqQjE3ejhIMkVyVWxLR3dWY2ogYW5zaWJsZUBsYWJubXM=
- path: /root/ansible/ansible.cfg
permissions: '0644'
content: |
[defaults]
inventory=./hosts
remote_user=ansible
private_key_file=~/.ssh/id_rsa
host_key_checking = False
- path: /root/ansible/hosts
permissions: '0644'
content: |
[web]
web[1:3]
[app]
app[1:3]
[db]
db[1:3]
runcmd:
- pip3 install ansible
- cp -r /root/ansible /home && rm -r /root/ansible && chown -R ansible:ansible /home/ansible
power_state:
mode: reboot
timeout: 10
condition: True