Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Lechner
ansible-role-basic
Commits
09dea239
Commit
09dea239
authored
Jun 28, 2020
by
Valentin Lechner
Browse files
adding password generation
parent
bd79d77a
Changes
3
Hide whitespace changes
Inline
Side-by-side
tasks/base-setup.yml
View file @
09dea239
...
...
@@ -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
...
...
tasks/main.yml
View file @
09dea239
...
...
@@ -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
...
...
test.yml
deleted
100644 → 0
View file @
bd79d77a
---
-
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment