diff --git a/ansible/roles/system-init-9140/tasks/main.yml b/ansible/roles/system-init-9140/tasks/main.yml new file mode 100644 index 00000000..1677be1b --- /dev/null +++ b/ansible/roles/system-init-9140/tasks/main.yml @@ -0,0 +1,125 @@ +--- +- name: "set 90-9000NPBP01R01.rules" + template: + src: "{{ role_path }}/templates/90-9000NPBP01R01.rules.j2" + dest: /usr/lib/udev/rules.d/90-9000NPBP01R01.rules + mode: 0644 + tags: template + +- name: "set enp1s0 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp1s0.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp1s0 + tags: template + +- name: "set enp5s0f0 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp5s0f0.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp5s0f0 + tags: template + +- name: "set enp5s0f1 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp5s0f1.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp5s0f1 + tags: template + +- name: "set enp130s0 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp130s0.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp130s0 + tags: template + +- name: "set enp131s0f0 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp131s0f0.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f0 + tags: template + +- name: "set enp131s0f1 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp131s0f1.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f1 + tags: template + +- name: "set enp131s0f2 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp131s0f2.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f2 + tags: template + +- name: "set enp131s0f3 up " + template: + src: "{{ role_path }}/templates/ifcfg-enp131s0f3.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f3 + tags: template + +- name: "set enp1s2" + template: + src: "{{ role_path }}/templates/ifcfg-enp1s2.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2 + tags: template + +- name: "set enp1s2f1" + template: + src: "{{ role_path }}/templates/ifcfg-enp1s2f1.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2f1 + tags: template + +- name: "set enp1s2f2" + template: + src: "{{ role_path }}/templates/ifcfg-enp1s2f2.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2f2 + tags: template + +- name: "set enp130s2" + template: + src: "{{ role_path }}/templates/ifcfg-enp130s2.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2 + tags: template + +- name: "set enp130s2f1" + template: + src: "{{ role_path }}/templates/ifcfg-enp130s2f1.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f1 + tags: template + +- name: "set enp130s2f2" + template: + src: "{{ role_path }}/templates/ifcfg-enp130s2f2.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f2 + tags: template + +- name: "set enp130s2f3" + template: + src: "{{ role_path }}/templates/ifcfg-enp130s2f3.toml.j2" + dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f3 + tags: template + +- name: "set if-pre-up " + template: + src: "{{ role_path }}/templates/if-pre-up.toml.j2" + dest: /etc/NetworkManager/dispatcher.d/pre-up.d/if-pre-up + mode: 0755 + tags: template + +- name: "set setup.enp131s0f0.ips" + template: + src: "{{ role_path }}/templates/setup.enp131s0f0.ips.toml.j2" + dest: /sbin/setup.enp131s0f0.ips + mode: 0777 + tags: template + +- name: "set setup.enp130s2f1.ips" + template: + src: "{{ role_path }}/templates/setup.enp130s2f1.ips.toml.j2" + dest: /sbin/setup.enp130s2f1.ips + mode: 0777 + tags: template + +- name: "set set-enp1s2-macaddr.sh" + template: + src: "{{ role_path }}/templates/set-enp1s2-macaddr.sh.toml.j2" + dest: /usr/bin/set-enp1s2-macaddr.sh + mode: 0777 + tags: template diff --git a/ansible/roles/system-init/templates/90-9000NPBP01R01.rules.j2 b/ansible/roles/system-init-9140/templates/90-9000NPBP01R01.rules.j2 similarity index 100% rename from ansible/roles/system-init/templates/90-9000NPBP01R01.rules.j2 rename to ansible/roles/system-init-9140/templates/90-9000NPBP01R01.rules.j2 diff --git a/ansible/roles/system-init/templates/if-pre-up.toml.j2 b/ansible/roles/system-init-9140/templates/if-pre-up.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/if-pre-up.toml.j2 rename to ansible/roles/system-init-9140/templates/if-pre-up.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp130s0.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp130s0.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp130s0.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp130s0.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp130s2.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp130s2.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp130s2.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp130s2.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp130s2f1.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp130s2f1.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp130s2f1.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp130s2f1.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp130s2f2.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp130s2f2.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp130s2f2.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp130s2f2.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp130s2f3.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp130s2f3.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp130s2f3.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp130s2f3.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp131s0f0.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp131s0f0.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp131s0f0.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp131s0f0.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp131s0f1.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp131s0f1.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp131s0f1.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp131s0f1.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp131s0f2.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp131s0f2.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp131s0f2.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp131s0f2.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp131s0f3.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp131s0f3.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp131s0f3.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp131s0f3.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp1s0.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp1s0.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp1s0.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp1s0.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp1s2.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp1s2.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp1s2.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp1s2.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp1s2f1.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp1s2f1.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp1s2f1.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp1s2f1.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp1s2f2.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp1s2f2.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp1s2f2.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp1s2f2.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp5s0f0.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp5s0f0.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp5s0f0.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp5s0f0.toml.j2 diff --git a/ansible/roles/system-init/templates/ifcfg-enp5s0f1.toml.j2 b/ansible/roles/system-init-9140/templates/ifcfg-enp5s0f1.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/ifcfg-enp5s0f1.toml.j2 rename to ansible/roles/system-init-9140/templates/ifcfg-enp5s0f1.toml.j2 diff --git a/ansible/roles/system-init/templates/set-enp1s2-macaddr.sh.toml.j2 b/ansible/roles/system-init-9140/templates/set-enp1s2-macaddr.sh.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/set-enp1s2-macaddr.sh.toml.j2 rename to ansible/roles/system-init-9140/templates/set-enp1s2-macaddr.sh.toml.j2 diff --git a/ansible/roles/system-init/templates/setup.enp130s2f1.ips.toml.j2 b/ansible/roles/system-init-9140/templates/setup.enp130s2f1.ips.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/setup.enp130s2f1.ips.toml.j2 rename to ansible/roles/system-init-9140/templates/setup.enp130s2f1.ips.toml.j2 diff --git a/ansible/roles/system-init/templates/setup.enp131s0f0.ips.toml.j2 b/ansible/roles/system-init-9140/templates/setup.enp131s0f0.ips.toml.j2 similarity index 100% rename from ansible/roles/system-init/templates/setup.enp131s0f0.ips.toml.j2 rename to ansible/roles/system-init-9140/templates/setup.enp131s0f0.ips.toml.j2 diff --git a/ansible/roles/system-init/tasks/main.yml b/ansible/roles/system-init/tasks/main.yml index df32a1c3..81ad2423 100644 --- a/ansible/roles/system-init/tasks/main.yml +++ b/ansible/roles/system-init/tasks/main.yml @@ -1,129 +1,4 @@ --- -- name: "set 90-9000NPBP01R01.rules" - template: - src: "{{ role_path }}/templates/90-9000NPBP01R01.rules.j2" - dest: /usr/lib/udev/rules.d/90-9000NPBP01R01.rules - mode: 0644 - tags: template - -- name: "set enp1s0 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp1s0.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp1s0 - tags: template - -- name: "set enp5s0f0 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp5s0f0.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp5s0f0 - tags: template - -- name: "set enp5s0f1 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp5s0f1.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp5s0f1 - tags: template - -- name: "set enp130s0 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp130s0.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp130s0 - tags: template - -- name: "set enp131s0f0 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp131s0f0.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f0 - tags: template - -- name: "set enp131s0f1 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp131s0f1.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f1 - tags: template - -- name: "set enp131s0f2 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp131s0f2.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f2 - tags: template - -- name: "set enp131s0f3 up " - template: - src: "{{ role_path }}/templates/ifcfg-enp131s0f3.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp131s0f3 - tags: template - -- name: "set enp1s2" - template: - src: "{{ role_path }}/templates/ifcfg-enp1s2.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2 - tags: template - -- name: "set enp1s2f1" - template: - src: "{{ role_path }}/templates/ifcfg-enp1s2f1.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2f1 - tags: template - -- name: "set enp1s2f2" - template: - src: "{{ role_path }}/templates/ifcfg-enp1s2f2.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp1s2f2 - tags: template - -- name: "set enp130s2" - template: - src: "{{ role_path }}/templates/ifcfg-enp130s2.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2 - tags: template - -- name: "set enp130s2f1" - template: - src: "{{ role_path }}/templates/ifcfg-enp130s2f1.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f1 - tags: template - -- name: "set enp130s2f2" - template: - src: "{{ role_path }}/templates/ifcfg-enp130s2f2.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f2 - tags: template - -- name: "set enp130s2f3" - template: - src: "{{ role_path }}/templates/ifcfg-enp130s2f3.toml.j2" - dest: /etc/sysconfig/network-scripts/ifcfg-enp130s2f3 - tags: template - -- name: "set if-pre-up " - template: - src: "{{ role_path }}/templates/if-pre-up.toml.j2" - dest: /etc/NetworkManager/dispatcher.d/pre-up.d/if-pre-up - mode: 0755 - tags: template - -- name: "set setup.enp131s0f0.ips" - template: - src: "{{ role_path }}/templates/setup.enp131s0f0.ips.toml.j2" - dest: /sbin/setup.enp131s0f0.ips - mode: 0777 - tags: template - -- name: "set setup.enp130s2f1.ips" - template: - src: "{{ role_path }}/templates/setup.enp130s2f1.ips.toml.j2" - dest: /sbin/setup.enp130s2f1.ips - mode: 0777 - tags: template - -- name: "set set-enp1s2-macaddr.sh" - template: - src: "{{ role_path }}/templates/set-enp1s2-macaddr.sh.toml.j2" - dest: /usr/bin/set-enp1s2-macaddr.sh - mode: 0777 - tags: template - - name: "enable sshd" systemd: name: sshd diff --git a/ansible/tsg_7400_deploy.yml b/ansible/tsg_7400_deploy.yml index 9478ca04..464be33e 100644 --- a/ansible/tsg_7400_deploy.yml +++ b/ansible/tsg_7400_deploy.yml @@ -5,6 +5,7 @@ - install_config/group_vars/rpm_version.yml roles: - {role: tsg-os-provision, tags: tsg-os-provision} + - {role: system-init, tags: system-init} - {role: system-init-7400-mcn0, tags: system-init-7400-mcn0} - hosts: 7400-MCN123-P01R01 @@ -14,4 +15,5 @@ - install_config/group_vars/rpm_version.yml roles: - {role: tsg-os-provision, tags: tsg-os-provision} + - {role: system-init, tags: system-init} - {role: system-init-7400-mcn123, tags: system-init-7400-mcn123} \ No newline at end of file diff --git a/ansible/tsg_9140_deploy.yml b/ansible/tsg_9140_deploy.yml index 6dde2cca..db464d81 100644 --- a/ansible/tsg_9140_deploy.yml +++ b/ansible/tsg_9140_deploy.yml @@ -29,4 +29,5 @@ - {role: exporter, tags: exporter} - {role: docker, tags: docker} - {role: tsg-diagnose, tags: tsg-diagnose} - - {role: system-init, tags: system-init} \ No newline at end of file + - {role: system-init, tags: system-init} + - {role: system-init-9140, tags: system-init-9140} \ No newline at end of file