blob: e0c966e45596fdf234543837e760b1dc0a432a40 (
plain)
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
|
#cloud-config
disable_root: true
hostname: {{ item[0] }}
fqdn: {{ item[0] }}.example.com
manage_etc_hosts: true
users:
- default
- name: root
ssh_authorized_keys:
- {{ lookup('file', '~/.ssh/id_rsa.pub') }}
system_info:
default_user:
name: openshift
sudo: ["ALL=(ALL) NOPASSWD: ALL"]
ssh_authorized_keys:
- {{ lookup('file', '~/.ssh/id_rsa.pub') }}
write_files:
- path: /etc/sudoers.d/00-openshift-no-requiretty
permissions: 440
content: |
Defaults:openshift !requiretty
runcmd:
- NETWORK_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth0; if ! grep DHCP_HOSTNAME ${NETWORK_CONFIG}; then echo 'DHCP_HOSTNAME="{{ item[0] }}.example.com"' >> ${NETWORK_CONFIG}; fi; pkill -9 dhclient; service network restart
|