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: vars_files:
- host_vars/dockerbox.yml - host_vars/dockerbox.yml
roles: roles:
- ansible
- base - base
- docker - docker
- jenkins - jenkins

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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