sec
This commit is contained in:
parent
16c8ca7411
commit
2f22172088
@ -28,7 +28,7 @@
|
||||
echo "${WEBPASSWDCRYPT}"
|
||||
else
|
||||
webpassword=$(pwgen -s 32 1)
|
||||
webpasswordcrypted=$(htpasswd -nbB foo $webpassword | cut -d: -f2)
|
||||
webpasswordcrypted=$(htpasswd -nbB foo $webpassword | cut -d: -f2 | sed -e s/\\$/\\$\\$/g)
|
||||
|
||||
echo "WEBUSER=admin
|
||||
WEBPASSWD=${webpassword}
|
||||
@ -54,9 +54,9 @@
|
||||
register: cryptpw
|
||||
changed_when: false
|
||||
|
||||
- name: /home/docker/portainer/docker-compose.yml Portainer Container Configuration
|
||||
- name: /home/docker/portainer.{{inventory_hostname}}/docker-compose.yml Portainer Container Configuration
|
||||
blockinfile:
|
||||
path: /home/docker/portainer/docker-compose.yml
|
||||
path: /home/docker/portainer.{{inventory_hostname}}/docker-compose.yml
|
||||
create: yes
|
||||
mode: 0440
|
||||
owner: root
|
||||
@ -67,7 +67,6 @@
|
||||
services:
|
||||
portainer:
|
||||
image: portainer/portainer-ce:latest
|
||||
# htpasswd -nb -B admin "PASSWORD" | cut -d ":" -f 2 | sed -e s/\\$/\\$\\$/g
|
||||
command: --admin-password {{ cryptpw.stdout }}
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@ -97,4 +96,4 @@
|
||||
- name: Restart portainer
|
||||
ansible.builtin.shell: docker-compose up -d --force-recreate
|
||||
args:
|
||||
chdir: /home/docker/portainer
|
||||
chdir: /home/docker/portainer.{{inventory_hostname}}
|
||||
|
Loading…
Reference in New Issue
Block a user