Move ansible role into base role
This commit is contained in:
parent
e66a4b96ff
commit
c630af67cd
@ -4,7 +4,6 @@
|
||||
vars_files:
|
||||
- host_vars/dockerbox.yml
|
||||
roles:
|
||||
- ansible
|
||||
- base
|
||||
- docker
|
||||
- jenkins
|
||||
|
@ -4,6 +4,5 @@
|
||||
vars_files:
|
||||
- host_vars/hypervisor.yml
|
||||
roles:
|
||||
- ansible
|
||||
- base
|
||||
- libvirt
|
||||
|
@ -4,6 +4,5 @@
|
||||
vars_files:
|
||||
- host_vars/moxie.yml
|
||||
roles:
|
||||
- ansible
|
||||
- docker
|
||||
- bitwarden
|
||||
|
@ -4,7 +4,6 @@
|
||||
vars_files:
|
||||
- host_vars/nextcloud.yml
|
||||
roles:
|
||||
- ansible
|
||||
- base
|
||||
- docker
|
||||
- nextcloud
|
||||
|
@ -16,7 +16,6 @@
|
||||
hosts: dockerhosts
|
||||
become: true
|
||||
roles:
|
||||
- ansible
|
||||
- base
|
||||
- docker
|
||||
- jenkins
|
||||
|
@ -16,6 +16,5 @@
|
||||
hosts: hypervisors
|
||||
become: true
|
||||
roles:
|
||||
- ansible
|
||||
- base
|
||||
- libvirt
|
||||
|
@ -16,7 +16,6 @@
|
||||
hosts: moxiehosts
|
||||
become: true
|
||||
roles:
|
||||
- ansible
|
||||
- docker
|
||||
- traefik
|
||||
- wordpress
|
||||
|
@ -4,13 +4,11 @@
|
||||
creates: /usr/lib/python3/dist-packages/apt
|
||||
warn: false
|
||||
|
||||
- name: 'Install Ansible dependency: aptitude'
|
||||
- name: Install additional Ansible dependencies
|
||||
apt:
|
||||
name: 'aptitude'
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
force_apt_get: true
|
||||
|
||||
- name: 'Install Ansible dependency: python3-docker'
|
||||
apt:
|
||||
name: python3-docker
|
||||
state: present
|
||||
loop:
|
||||
- aptitude
|
||||
- python3-docker
|
@ -1,26 +1,9 @@
|
||||
- name: Install useful software
|
||||
apt:
|
||||
name: ["vim", "wget"]
|
||||
state: present
|
||||
- import_tasks: ansible.yml
|
||||
tags: ansible
|
||||
|
||||
- name: Install network interfaces file
|
||||
copy:
|
||||
src: network-interfaces.cfg
|
||||
dest: /etc/network/interfaces
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
- import_tasks: system.yml
|
||||
tags: system
|
||||
|
||||
- import_tasks: network.yml
|
||||
tags: 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