Add files via upload

This commit is contained in:
David Rotermund 2024-03-29 20:39:15 +01:00 committed by GitHub
parent 640c118411
commit a8166ab907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 76 additions and 22 deletions

View file

@ -9,7 +9,7 @@ dnf -y install ansible mc net-tools openssh-server openssh-clients passwdqc crac
systemctl enable sshd systemctl enable sshd
systemctl start sshd systemctl start sshd
useradd -b /specialusers/ ansibleuser useradd -b /specialusers ansibleuser
passwd_value="PUT_A_PASSWORD_HERE" passwd_value="PUT_A_PASSWORD_HERE"
echo ansibleuser:$passwd_value | chpasswd echo ansibleuser:$passwd_value | chpasswd
echo "ansibleuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible echo "ansibleuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible

View file

@ -1,29 +1,10 @@
--- ---
- name: install docker as servie - name: install docker as systemd plus add a portainer agent
hosts: all hosts: all
become: true become: true
tasks: tasks:
- name: remove other files - name: remove other files
include_tasks: yaml_sub/myrepo_clean.yaml include_tasks: yaml_sub/install_docker.yaml
- name: update file myrepo.repo
import_tasks: yaml_sub/myrepo_data.yaml
- name: install docker rpm
dnf:
name: "docker-ce,docker-ce-cli,docker-ce-rootless-extras,docker-buildx-plugin,docker-compose-plugin,python3,python3-pip,python3-requests"
state: latest
update_cache: true
skip_broken: true
nobest: false
allowerasing: true
enablerepo: "docker-ce-stable"
- name: make sure docker service unit is started
systemd_service:
state: started
name: docker
enabled: true

31
install_docker_web.yaml Normal file
View file

@ -0,0 +1,31 @@
---
- name: install docker as systemd plus add a protainer web
hosts: all
become: true
tasks:
- name: remove other files
include_tasks: yaml_sub/install_docker.yaml
- name: Create a volume
community.docker.docker_volume:
name: portainer_data
state: present
- name: Create portainer container
community.docker.docker_container:
name: portainerweb
image: portainer/portainer-ce
state: started
recreate: yes
restart_policy: always
published_ports:
- "8000:8000/tcp"
- "9443:9443/tcp"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data

42
install_semaphore.yaml Normal file
View file

@ -0,0 +1,42 @@
---
- name: install ansible semaphore
hosts: all
become: true
tasks:
- name: remove other files
include_tasks: yaml_sub/install_docker.yaml
- name: Create volume semaphore_etc
community.docker.docker_volume:
name: semaphore_etc
state: present
- name: Create volume semaphore_lib
community.docker.docker_volume:
name: semaphore_lib
state: present
- name: Create portainer container
community.docker.docker_container:
name: semaphore
image: semaphoreui/semaphore
state: started
recreate: yes
restart_policy: always
published_ports:
- "3000:3000/tcp"
volumes:
# - /var/run/docker.sock:/var/run/docker.sock
- semaphore_etc:/etc/semaphore
- semaphore_lib:/var/lib/semaphore
env:
SEMAPHORE_DB_DIALECT: bolt
SEMAPHORE_ADMIN_PASSWORD: changeme
SEMAPHORE_ADMIN_NAME: admin
SEMAPHORE_ADMIN_EMAIL: davrot@uni-bremen.de
SEMAPHORE_ADMIN: admin
TZ: Europe/Berlin