playbooks: updated hosts with target variable

the playbooks shall only run on the hosts provided by the variable
target.
NOTE: the default target is set within the job templates

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmüller 2023-08-21 16:34:44 +02:00
parent a3583e2b77
commit d2ce20787d
9 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
- name: Setup Basic Debian Host Machine - name: Setup Basic Debian Host Machine
hosts: linux hosts: "{{ target }}"
become: yes become: yes
tasks: tasks:
- name: Update Apt Cache and Upgrade all Packages - name: Update Apt Cache and Upgrade all Packages

View File

@ -1,5 +1,5 @@
- name: Build Jenkins Docker Image - name: Build Jenkins Docker Image
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
root_path: "~/nwl-ci" root_path: "~/nwl-ci"

View File

@ -1,5 +1,5 @@
- name: Clone a Git Repository - name: Clone a Git Repository
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
git_repo_path: "~/nwl-ci" git_repo_path: "~/nwl-ci"

View File

@ -1,5 +1,5 @@
- name: Configure Docker Network Adapter - name: Configure Docker Network Adapter
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
become: yes become: yes
tasks: tasks:

View File

@ -1,5 +1,5 @@
- name: Create SSH Keypair - name: Create SSH Keypair
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
ssh_passphrase: !vault | ssh_passphrase: !vault |

View File

@ -1,5 +1,5 @@
- name: The First Playbook - name: The First Playbook
hosts: linux hosts: "{{ target }}"
tags: tags:
- rls - rls
gather_facts: False gather_facts: False

View File

@ -1,5 +1,5 @@
- name: Setup NWL Git URL For Jenkins Seed Job - name: Setup NWL Git URL For Jenkins Seed Job
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
root_path: "~/nwl-ci" root_path: "~/nwl-ci"

View File

@ -1,5 +1,5 @@
- name: Setup Jenkins Instance - name: Setup Jenkins Instance
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
root_path: "~/nwl-ci" root_path: "~/nwl-ci"

View File

@ -1,5 +1,5 @@
- name: Start or Stop NWL Jenkins Instance - name: Start or Stop NWL Jenkins Instance
hosts: linux hosts: "{{ target }}"
gather_facts: false gather_facts: false
vars: vars:
root_path: "~/nwl-ci" root_path: "~/nwl-ci"