This commit is contained in:
parent
baae7a8d7e
commit
d74cdfa143
@ -14,18 +14,5 @@
|
|||||||
reload: yes
|
reload: yes
|
||||||
when: ansible_all_ipv6_addresses
|
when: ansible_all_ipv6_addresses
|
||||||
|
|
||||||
# Setup user
|
|
||||||
- name: Add the user 'kjuulh' and add it to 'sudo'
|
|
||||||
user:
|
|
||||||
name: kjuulh
|
|
||||||
group: sudo
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: "add authorized keys"
|
|
||||||
authorized_key:
|
|
||||||
user: kjuulh
|
|
||||||
state: present
|
|
||||||
key: "{{ lookup('file', pub_key) }}"
|
|
||||||
|
|
||||||
- name: Wait for apt to unlock
|
- name: Wait for apt to unlock
|
||||||
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null >2&1; do sleep 5; done;
|
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null >2&1; do sleep 5; done;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
variable "serverctl_master_count" {
|
variable "serverctl_master_count" {
|
||||||
default = 1
|
default = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "serverctl_node_count" {
|
variable "serverctl_node_count" {
|
||||||
default = 1
|
default = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ resource "local_file" "hosts_cfg" {
|
|||||||
content = templatefile("${path.module}/templates/hosts.tpl",
|
content = templatefile("${path.module}/templates/hosts.tpl",
|
||||||
{
|
{
|
||||||
serverctl_masters = hcloud_server.serverctl_master.*.ipv4_address
|
serverctl_masters = hcloud_server.serverctl_master.*.ipv4_address
|
||||||
serverctl_nodes = hcloud_server.serverctl_node.*.ipv4_address
|
serverctl_nodes = hcloud_server.serverctl_node.*.ipv4_address
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
filename = "ansible/inventory/hosts.cfg"
|
filename = "ansible/inventory/hosts.cfg"
|
||||||
|
Loading…
Reference in New Issue
Block a user