Move ansible role into base role

This commit is contained in:
Kris Lamoureux 2020-07-09 21:54:15 -04:00
parent e66a4b96ff
commit c630af67cd
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
11 changed files with 35 additions and 38 deletions

View File

@ -4,7 +4,6 @@
vars_files:
- host_vars/dockerbox.yml
roles:
- ansible
- base
- docker
- jenkins

View File

@ -4,6 +4,5 @@
vars_files:
- host_vars/hypervisor.yml
roles:
- ansible
- base
- libvirt

View File

@ -4,6 +4,5 @@
vars_files:
- host_vars/moxie.yml
roles:
- ansible
- docker
- bitwarden

View File

@ -4,7 +4,6 @@
vars_files:
- host_vars/nextcloud.yml
roles:
- ansible
- base
- docker
- nextcloud

View File

@ -16,7 +16,6 @@
hosts: dockerhosts
become: true
roles:
- ansible
- base
- docker
- jenkins

View File

@ -16,6 +16,5 @@
hosts: hypervisors
become: true
roles:
- ansible
- base
- libvirt

View File

@ -16,7 +16,6 @@
hosts: moxiehosts
become: true
roles:
- ansible
- docker
- traefik
- wordpress

View File

@ -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

View File

@ -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

View 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"

View File

@ -0,0 +1,4 @@
- name: Install useful software
apt:
name: ["vim", "wget"]
state: present