Move ansible role into base role
This commit is contained in:
parent
e66a4b96ff
commit
c630af67cd
@ -4,7 +4,6 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- host_vars/dockerbox.yml
|
- host_vars/dockerbox.yml
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- base
|
- base
|
||||||
- docker
|
- docker
|
||||||
- jenkins
|
- jenkins
|
||||||
|
@ -4,6 +4,5 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- host_vars/hypervisor.yml
|
- host_vars/hypervisor.yml
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- base
|
- base
|
||||||
- libvirt
|
- libvirt
|
||||||
|
@ -4,6 +4,5 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- host_vars/moxie.yml
|
- host_vars/moxie.yml
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- docker
|
- docker
|
||||||
- bitwarden
|
- bitwarden
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- host_vars/nextcloud.yml
|
- host_vars/nextcloud.yml
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- base
|
- base
|
||||||
- docker
|
- docker
|
||||||
- nextcloud
|
- nextcloud
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
hosts: dockerhosts
|
hosts: dockerhosts
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- base
|
- base
|
||||||
- docker
|
- docker
|
||||||
- jenkins
|
- jenkins
|
||||||
|
@ -16,6 +16,5 @@
|
|||||||
hosts: hypervisors
|
hosts: hypervisors
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- base
|
- base
|
||||||
- libvirt
|
- libvirt
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
hosts: moxiehosts
|
hosts: moxiehosts
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- ansible
|
|
||||||
- docker
|
- docker
|
||||||
- traefik
|
- traefik
|
||||||
- wordpress
|
- wordpress
|
||||||
|
@ -4,13 +4,11 @@
|
|||||||
creates: /usr/lib/python3/dist-packages/apt
|
creates: /usr/lib/python3/dist-packages/apt
|
||||||
warn: false
|
warn: false
|
||||||
|
|
||||||
- name: 'Install Ansible dependency: aptitude'
|
- name: Install additional Ansible dependencies
|
||||||
apt:
|
apt:
|
||||||
name: 'aptitude'
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
force_apt_get: true
|
force_apt_get: true
|
||||||
|
loop:
|
||||||
- name: 'Install Ansible dependency: python3-docker'
|
- aptitude
|
||||||
apt:
|
- python3-docker
|
||||||
name: python3-docker
|
|
||||||
state: present
|
|
@ -1,26 +1,9 @@
|
|||||||
- name: Install useful software
|
- import_tasks: ansible.yml
|
||||||
apt:
|
tags: ansible
|
||||||
name: ["vim", "wget"]
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Install network interfaces file
|
- import_tasks: system.yml
|
||||||
copy:
|
tags: system
|
||||||
src: network-interfaces.cfg
|
|
||||||
dest: /etc/network/interfaces
|
- import_tasks: network.yml
|
||||||
owner: root
|
tags: network
|
||||||
group: root
|
|
||||||
mode: '0644'
|
|
||||||
when: manage_network
|
when: manage_network
|
||||||
|
|
||||||
- name: Install network interfaces
|
|
||||||
template:
|
|
||||||
src: "{{ network_type }}-interface.cfg"
|
|
||||||
dest: "/etc/network/interfaces.d/{{ ip_inter }}"
|
|
||||||
notify: reboot_host
|
|
||||||
when: manage_network
|
|
||||||
|
|
||||||
- name: Install bridge utilities
|
|
||||||
apt:
|
|
||||||
name: bridge-utils
|
|
||||||
state: present
|
|
||||||
when: network_type == "bridged" and manage_network
|
|
||||||
|
19
roles/base/tasks/network.yml
Normal file
19
roles/base/tasks/network.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
- name: Install network interfaces file
|
||||||
|
copy:
|
||||||
|
src: network-interfaces.cfg
|
||||||
|
dest: /etc/network/interfaces
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Install network interfaces
|
||||||
|
template:
|
||||||
|
src: "{{ network_type }}-interface.cfg"
|
||||||
|
dest: "/etc/network/interfaces.d/{{ ip_inter }}"
|
||||||
|
notify: reboot_host
|
||||||
|
|
||||||
|
- name: Install bridge utilities
|
||||||
|
apt:
|
||||||
|
name: bridge-utils
|
||||||
|
state: present
|
||||||
|
when: network_type == "bridged"
|
4
roles/base/tasks/system.yml
Normal file
4
roles/base/tasks/system.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Install useful software
|
||||||
|
apt:
|
||||||
|
name: ["vim", "wget"]
|
||||||
|
state: present
|
Loading…
Reference in New Issue
Block a user