Commit 09dea239 authored by Valentin Lechner's avatar Valentin Lechner
Browse files

adding password generation

parent bd79d77a
......@@ -78,6 +78,7 @@
user:
name: "{{ deployment_user }}"
comment: Deployment User
password: "{{ lookup('password', 'credentials' + deployment_user + 'password.txt encrypt=md5_crypt') }}"
uid: 1999
shell: /bin/bash
append: yes
......
......@@ -45,10 +45,9 @@
service:
name: "{{ ntp_service_name }}"
state: restarted
#- name: Set Hostname
# hostname:
# name: "{{ hostname }}"
#
- name: Set Hostname
hostname:
name: "{{ hostname }}"
## Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
## Will include all hosts the playbook is run on.
## Credits to rothgar: https://gist.github.com/rothgar/8793800
......
---
- hosts: 127.0.0.1
tasks:
- name: Add host to inv
shell: "yq w -i /home/vlr/test.yml all.children.Cloud.hosts.{{ ansible_hostname }}.ansible_host {{ansible_default_ipv4.address}}"
delegate_to: 127.0.0.1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment