diff --git a/tasks/networking.yml b/tasks/networking.yml index 12828e1..62c4e03 100644 --- a/tasks/networking.yml +++ b/tasks/networking.yml @@ -1,8 +1,8 @@ --- - name: setup floating ips template: - src: "./etc/networking/interfaces.d/60-floating-ip.cfg.j2" - dest: "/etc/networking/interfaces.d/60-floating-ip.cfg" + src: "./etc/network/interfaces.d/60-floating-ip.cfg.j2" + dest: "/etc/network/interfaces.d/60-floating-ip.cfg" owner: root group: root mode: 0644 diff --git a/tasks/users.yml b/tasks/users.yml index a078261..91e64f0 100755 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -2,7 +2,7 @@ - name: Adjust root password user: name: root - password: "{{ root_user_cred }}" + password: "{{ root_user_cred | string | password_hash('sha512') }}" - name: list active users shell: grep -v "nologin" /etc/passwd | cut -f 1 -d ":" diff --git a/templates/etc/networking/interfaces.d/60-floating-ip.cfg.j2 b/templates/etc/network/interfaces.d/60-floating-ip.cfg.j2 similarity index 81% rename from templates/etc/networking/interfaces.d/60-floating-ip.cfg.j2 rename to templates/etc/network/interfaces.d/60-floating-ip.cfg.j2 index fdd5ba6..8636451 100644 --- a/templates/etc/networking/interfaces.d/60-floating-ip.cfg.j2 +++ b/templates/etc/network/interfaces.d/60-floating-ip.cfg.j2 @@ -1,11 +1,11 @@ {% for config in floating_ips %} -{%if 'ipv4' in config % } +{%if 'ipv4' in config %} auto eth0:{{ loop.index }} iface eth0:{{ loop.index }} inet static address {{ config.ipv4 }} netmask 32 {% endif %} -{%if 'ipv6' in config % } +{%if 'ipv6' in config %} auto eth0:{{ loop.index }} iface eth0:{{ loop.index }} inet6 static address {{ config.ipv6 }}