clean(ansible): remove unused roles and hosts
This commit is contained in:
parent
c6f5f8a185
commit
395b672574
@ -1,2 +0,0 @@
|
||||
rabbitmq_user: satanas
|
||||
rabbitmq_password: satanas
|
@ -1,9 +1,5 @@
|
||||
[car]
|
||||
satanas.local ansible_user=pi become=yes become_user=root
|
||||
diabolo.local ansible_user=pi become=yes become_user=root
|
||||
|
||||
[microservice]
|
||||
diabolo.local
|
||||
|
||||
[donkey]
|
||||
satanas.local
|
||||
|
@ -1,35 +0,0 @@
|
||||
- name: Add apt key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/debian/gpg
|
||||
|
||||
- name: Add docker-ce repository
|
||||
apt_repository:
|
||||
repo: deb [arch={{ arch | default('armhf') }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
|
||||
state: present
|
||||
filename: 'docker'
|
||||
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- name: Install docker-ce
|
||||
apt:
|
||||
name:
|
||||
- python3-pip
|
||||
- docker-ce
|
||||
- xfsprogs
|
||||
state: present
|
||||
|
||||
- name: Set groups to pi user
|
||||
user:
|
||||
name: pi
|
||||
groups: docker
|
||||
|
||||
- meta: flush_handlers
|
||||
- name: Install ansible tool docker and docker-compose
|
||||
pip:
|
||||
name:
|
||||
- docker-compose
|
||||
executable: pip3
|
||||
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
|
||||
- include_tasks: docker.yml
|
||||
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
|
||||
donkey_username: pi
|
||||
donkey_groupname: pi
|
||||
donkey_home_dir: /home/{{ donkey_username }}
|
||||
|
||||
donkey_git_repo: https://github.com/cyrilix/donkey.git
|
||||
donkey_git_branch: master
|
||||
|
||||
donkey_sources: "{{ donkey_home_dir }}/donkeycar"
|
||||
donkey_virtualenv_dir: "{{ donkey_home_dir }}/venv"
|
||||
|
||||
donkey_data_dir: "{{ donkey_home_dir }}/data"
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Make data directory
|
||||
file:
|
||||
path: "{{ donkey_data_dir }}"
|
||||
owner: "{{ donkey_username }}"
|
||||
group: "{{ donkey_groupname }}"
|
||||
state: directory
|
||||
|
||||
- name: Make tmpfs
|
||||
mount:
|
||||
path: "{{ donkey_data_dir }}"
|
||||
src: tmpfs
|
||||
fstype: tmpfs
|
||||
opts: defaults
|
||||
state: mounted
|
@ -1,62 +0,0 @@
|
||||
---
|
||||
|
||||
- include_tasks: data.yml
|
||||
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- python3-setuptools-git
|
||||
- virtualenv
|
||||
- libopenjp2-7
|
||||
- libtiff5
|
||||
- libblas3
|
||||
- liblapack3
|
||||
- libatlas3-base
|
||||
- libjpeg-dev
|
||||
- libilmbase12
|
||||
- libopenexr22
|
||||
- libgstreamer1.0-0
|
||||
- libavcodec57
|
||||
- libavformat57
|
||||
- libswscale4
|
||||
- libgtk-3-0
|
||||
- i2c-tools
|
||||
- read-edid
|
||||
- libsdl1.2debian
|
||||
- libjasper1
|
||||
- libqtgui4
|
||||
- libqt4-test
|
||||
- python-h5py
|
||||
state: present
|
||||
|
||||
- name: Fetch git repository
|
||||
become_user: "{{ donkey_username }}"
|
||||
git:
|
||||
repo: "{{ donkey_git_repo }}"
|
||||
dest: "{{ donkey_sources }}"
|
||||
version: "{{ donkey_git_branch }}"
|
||||
ssh_opts: "-o StrictHostKeyChecking=no"
|
||||
|
||||
- name: Install donkey
|
||||
become_user: "{{ donkey_username }}"
|
||||
pip:
|
||||
name: "{{ donkey_sources }}"
|
||||
virtualenv_python: python3
|
||||
virtualenv: "{{ donkey_virtualenv_dir }}"
|
||||
editable: yes
|
||||
|
||||
|
||||
#- name: Install dependencies
|
||||
# become_user: "{{ donkey_username }}"
|
||||
# pip:
|
||||
# requirements: "{{ donkey_sources }}/requirements-pi.txt"
|
||||
# virtualenv: "{{ donkey_virtualenv_dir }}"
|
||||
# virtualenv_python: python3
|
||||
|
||||
- name: Load virtualenv at connection
|
||||
template:
|
||||
src: bash_custom
|
||||
dest: "{{ donkey_home_dir }}/.bash_custom"
|
||||
owner: "{{ donkey_username }}"
|
||||
group: "{{ donkey_groupname }}"
|
||||
mode: 0644
|
@ -1,2 +0,0 @@
|
||||
# Activate virtualenv
|
||||
source {{ donkey_virtualenv_dir }}/bin/activate
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
|
||||
version: 3.6.6
|
||||
threads: 4
|
@ -1,52 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install python {{version}} runtime & build dependencies"
|
||||
become: yes
|
||||
apt: name={{item}}
|
||||
with_items:
|
||||
- build-essential
|
||||
- tk-dev
|
||||
- libncurses5-dev
|
||||
- libncursesw5-dev
|
||||
- libreadline6-dev
|
||||
- libdb5.3-dev
|
||||
- libgdbm-dev
|
||||
- libsqlite3-dev
|
||||
- libssl-dev
|
||||
- libbz2-dev
|
||||
- libexpat1-dev
|
||||
- liblzma-dev
|
||||
- libffi-dev
|
||||
- uuid-dev
|
||||
- zlib1g-dev
|
||||
|
||||
- name: "Download python{{version}}"
|
||||
get_url:
|
||||
url: "https://www.python.org/ftp/python/{{version}}/Python-{{version}}.tar.xz"
|
||||
dest: "/tmp/Python-{{version}}.tar.xz"
|
||||
|
||||
- name: "Unarchive python{{version}}"
|
||||
unarchive:
|
||||
src: "/tmp/Python-{{version}}.tar.xz"
|
||||
dest: "/tmp/"
|
||||
copy: no
|
||||
creates: "/tmp/Python-{{version}}"
|
||||
|
||||
- name: "configure python{{version}} build"
|
||||
command: ./configure --prefix=/opt/python-{{version}} --enable-optimizations
|
||||
args:
|
||||
chdir: "/tmp/Python-{{version}}"
|
||||
creates: "/tmp/Python-{{version}}/Makefile"
|
||||
|
||||
- name: "build python{{version}}"
|
||||
# not using make module to be able to use -j and creates option to fully skip step
|
||||
command: make -j{{threads}}
|
||||
args:
|
||||
chdir: "/tmp/Python-{{version}}"
|
||||
creates: "/tmp/Python-{{version}}/python"
|
||||
|
||||
- name: "install python{{version}}"
|
||||
become: yes
|
||||
make:
|
||||
chdir: "/tmp/Python-{{version}}"
|
||||
target: altinstall
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: expand filesystem
|
||||
shell: resize2fs /dev/mmcblk0p2
|
||||
notify:
|
||||
- reboot
|
||||
|
||||
- name: restart rabbitmq
|
||||
service:
|
||||
name: rabbitmq-server
|
||||
start: restarted
|
||||
|
@ -1,35 +0,0 @@
|
||||
---
|
||||
- name: Install ansible dependencies
|
||||
apt:
|
||||
name: "python3-requests"
|
||||
state: present
|
||||
|
||||
- name: Install rabbitmq package
|
||||
apt:
|
||||
name: rabbitmq-server
|
||||
state: present
|
||||
with_items:
|
||||
- rabbitmq-server
|
||||
- python3-requests
|
||||
|
||||
- name: Enables rabbitmq plugins
|
||||
rabbitmq_plugin:
|
||||
names: rabbitmq_management,rabbitmq_mqtt
|
||||
state: enabled
|
||||
|
||||
- name: Add rabbitmq user
|
||||
rabbitmq_user:
|
||||
user: "{{ rabbitmq_user }}"
|
||||
password: "{{ rabbitmq_password }}"
|
||||
vhost: /
|
||||
configure_priv: .*
|
||||
read_priv: .*
|
||||
write_priv: .*
|
||||
tags: administrator
|
||||
state: present
|
||||
|
||||
- name: Create exchange
|
||||
rabbitmq_exchange:
|
||||
name: car
|
||||
type: topic
|
||||
vhost: "/"
|
@ -8,13 +8,5 @@
|
||||
- hosts: microservice
|
||||
become: yes
|
||||
roles:
|
||||
- { role: rabbitmq, tags: [rabbitmq] }
|
||||
- { role: k3s, tags: [k3s] }
|
||||
- { role: microservices, tags: [microservices, ms] }
|
||||
|
||||
|
||||
- hosts: donkey
|
||||
become: yes
|
||||
roles:
|
||||
- { role: python, tags: [python]}
|
||||
- { role: donkey, tags: [donkey] }
|
||||
|
Loading…
Reference in New Issue
Block a user