Add files via upload
This commit is contained in:
parent
640c118411
commit
a8166ab907
4 changed files with 76 additions and 22 deletions
|
@ -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
|
||||||
|
|
|
@ -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
31
install_docker_web.yaml
Normal 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
42
install_semaphore.yaml
Normal 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue