Add user creation for ddns script
This commit is contained in:
parent
f29cd352bd
commit
fb017565f4
8 changed files with 71 additions and 7 deletions
14
roles/cloudflare-ddns/tasks/main.yml
Normal file
14
roles/cloudflare-ddns/tasks/main.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- include_vars: defaults.yml
|
||||
# TODO: Configure ZSH correctly by reasusing the zsh role by running the commands as the new user.
|
||||
# see: https://serverfault.com/questions/662443/running-ansible-task-as-a-specific-user
|
||||
- name: Create a new user
|
||||
ansible.builtin.include_role:
|
||||
name: singleplatform-eng.users
|
||||
apply:
|
||||
become: true
|
||||
vars:
|
||||
users:
|
||||
- username: cloudflare_ddns
|
||||
name: '-'
|
||||
password: "{{ cloudflare_ddns_user_password_hash }}"
|
||||
6
roles/cloudflare-ddns/templates/ddns_config.ini.j2
Normal file
6
roles/cloudflare-ddns/templates/ddns_config.ini.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[credentials]
|
||||
dns_cloudflare_token = {{ dns_cloudflare_token }}
|
||||
|
||||
[log_changes]
|
||||
# TODO: Update this...
|
||||
log_path = /home/thomas/repositories/raspberry-pi-iac/ddns_update.log
|
||||
13
roles/cloudflare-ddns/vars/defaults.yml
Normal file
13
roles/cloudflare-ddns/vars/defaults.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
38343230616338653130383466333361323362326431303133616166373864333766366263613134
|
||||
6533376165613166646366396366646663383937303835650a343134336239613266643931393766
|
||||
62613963313431626564616239333531643361653739396363343362313035646561656239656366
|
||||
6462636435353931350a626132313565636666653839653839666465363262663365643264383331
|
||||
31316338313262636263346339653030363831643133643837333666383363616331653432326164
|
||||
36383561393561643439363931343532626335363937303432653938633439663435666234646533
|
||||
63653730633333626430656663636130663962643765303236343763383965643535653566633766
|
||||
39323166633933646162633032336335386265386237383133653865343435386530386139613061
|
||||
33343738643736306630326235313730303661333431376238363334313463363734383730343638
|
||||
65303365343433326630323066376132376465333965343930363066363561663530306261303961
|
||||
37626233623762353632653039353231623432316232323831343262343731353533343863326135
|
||||
36313836646130333431
|
||||
Loading…
Add table
Add a link
Reference in a new issue