├── Shift_Log └── .gitkeep ├── Shift_Env ├── host_vars │ └── .gitkeep ├── properties.yml ├── tests │ ├── 1-0102_apache_02 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0102_apache_04 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0103_Tomcat_06 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0103_Tomcat_07 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0102_apache_03_01 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0102_apache_03_02 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0104_postgreSQL_03_01 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0104_postgreSQL_03_02 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0001_Base-HW_01 │ │ ├── role_list │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── test_case02 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.31.yml │ │ │ │ └── 192.168.127.41.yml │ │ │ └── properties.yml │ │ ├── test_case03 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.31.yml │ │ │ │ └── 192.168.127.41.yml │ │ │ └── properties.yml │ │ ├── readme.md │ │ └── properties.yml │ ├── 2-1301_ZabbixAgent_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── sh │ │ │ └── pywinrm.py │ ├── 2-1301_ZabbixAgent_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── test_case02 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.141.yml │ │ │ │ └── 192.168.127.151.yml │ │ │ └── properties.yml │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 1-0001_Base-ADVANCED-packages_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── run.sh │ │ ├── properties.yml │ │ └── test_case02 │ │ │ └── properties.yml │ ├── 2-0001_Base-STORAGE-disk-cdrom_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── run.sh │ ├── 2-0001_Base-STORAGE-disk-cdrom_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── properties.yml │ │ ├── test_case02 │ │ │ └── properties.yml │ │ └── run.sh │ ├── 2-0001_Base-ADVANCED_product_hotfix_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── run.sh │ │ └── check.sh │ ├── 2-0001_Base-ADVANCED_product_hotfix_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── run.sh │ │ ├── check.sh │ │ └── properties.yml │ ├── 1-0106_PrivateCA_01 │ │ ├── role_list │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0106_PrivateCA_02 │ │ ├── role_list │ │ └── run.sh │ ├── 2-0001_Base-HW_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ ├── test_case02 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.141.yml │ │ │ │ └── 192.168.127.151.yml │ │ │ └── properties.yml │ │ └── properties.yml │ ├── 2-0001_Base-HW_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── properties.yml │ ├── 2-0001_Base-HW_03 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 1-0105_openJDK_01_01 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0105_openJDK_01_02 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0105_openJDK_02_01 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0105_openJDK_02_02 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0105_openJDK_03_01 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0105_openJDK_03_02 │ │ ├── role_list │ │ ├── properties.yml │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0001_Base-cron_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 1-1301_ZabbixAgent_01 │ │ ├── role_list │ │ └── readme.md │ ├── 1-1301_ZabbixAgent_02 │ │ ├── role_list │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── readme.md │ │ ├── properties.yml │ │ └── run.sh │ ├── 1-1301_ZabbixAgent_03 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ └── run.sh │ ├── 2-0001_Base-NETWORK-eth_01 │ │ ├── role_list │ │ └── readme.md │ ├── 1-0001_Base-ADVANCED-snmp_01 │ │ ├── role_list │ │ └── readme.md │ ├── 1-0001_Base-ADVANCED-snmp_02 │ │ ├── role_list │ │ └── readme.md │ ├── 1-0001_Base-ADVANCED-snmp_03 │ │ ├── role_list │ │ └── readme.md │ ├── 1-0001_Base-ADVANCED-sshd_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ └── properties.yml │ ├── 1-0001_Base-syslog_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 2-0001_Base-ADVANCED_eventlog_01 │ │ ├── role_list │ │ └── readme.md │ ├── 2-0001_Base-ADVANCED_feature_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-ADVANCED_feature_02 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-ADVANCED_registry_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-ADVANCED_service_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-ADVANCED_service_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.151.yml │ │ │ └── 192.168.127.141.yml │ │ └── properties.yml │ ├── 2-0001_Base-ADVANCED_service_03 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.151.yml │ │ │ └── 192.168.127.141.yml │ │ └── properties.yml │ ├── 2-0001_Base-NETWORK-firewall_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-firewall_02 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-ipv6_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-teaming_01 │ │ ├── role_list │ │ └── readme.md │ ├── 1-0001_Base-ADVANCED-timeserver_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ └── properties.yml │ ├── 1-0001_Base-STORAGE_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 2-0001_Base-NETWORK-dns_suffix_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-dns_suffix_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── properties.yml │ ├── 2-0001_Base-STORAGE-directory_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-STORAGE-directory_02 │ │ ├── role_list │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ ├── readme.md │ │ └── properties.yml │ ├── 1-0001_Base-ADVANCED-service_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 1-0001_Base-ADVANCED-timeserver_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 2-0001_Base-NETWORK-name_resolve_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-name_resolve_02 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base-NETWORK-default_gw-static_routing_01 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base_OSCORE_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── test_case02 │ │ │ └── host_vars │ │ │ │ ├── 192.168.127.141.yml │ │ │ │ └── 192.168.127.151.yml │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base_OSCORE_02 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── properties.yml │ ├── 2-0001_Base_OSCORE_03 │ │ ├── role_list │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── properties.yml │ ├── 1-0103_Tomcat_03 │ │ ├── properties.yml │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 2-0001_Base-NETWORK-hostname-domain_01 │ │ ├── role_list │ │ ├── sh │ │ │ └── pywinrm.py │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ ├── test_case02 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.141.yml │ │ │ │ └── 192.168.127.151.yml │ │ │ └── properties.yml │ │ ├── test_case03 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.141.yml │ │ │ │ └── 192.168.127.151.yml │ │ │ └── properties.yml │ │ └── properties.yml │ ├── 1-0001_Base-ID_01 │ │ ├── readme.md │ │ └── role_list │ ├── 1-0001_Base-ID_02 │ │ ├── readme.md │ │ └── role_list │ ├── 1-0001_Base-ID_03 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── role_list │ │ └── properties.yml │ ├── 1-0108_Pgpool-II_test_02 │ │ ├── host_vars │ │ │ └── 192.168.127.31.yml │ │ ├── readme.md │ │ ├── properties.yml │ │ ├── role_list │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0001_Base-ADVANCED-logrotate_01 │ │ ├── role_list │ │ ├── readme.md │ │ ├── test_case03 │ │ │ ├── host_vars │ │ │ │ ├── 192.168.127.41.yml │ │ │ │ └── 192.168.127.31.yml │ │ │ └── properties.yml │ │ ├── test_case02 │ │ │ └── host_vars │ │ │ │ ├── 192.168.127.31.yml │ │ │ │ └── 192.168.127.41.yml │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── 1-0001_Base-NETWORK_02 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── role_list │ │ └── properties.yml │ ├── 1-0001_Base-OSCORE_01 │ │ ├── readme.md │ │ └── role_list │ ├── 1-0001_Base-OSCORE_02 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── role_list │ │ └── properties.yml │ ├── 1-0001_Base-OSCORE_03 │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── readme.md │ │ ├── properties.yml │ │ └── role_list │ ├── 1-0104_postgreSQL_04 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 2-0001_Base_ID_01 │ │ ├── readme.md │ │ ├── role_list │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base_ID_03 │ │ ├── readme.md │ │ ├── role_list │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── properties.yml │ ├── 2-0001_Base_ID_04 │ │ ├── readme.md │ │ ├── role_list │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 2-0001_Base_ID_05 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ ├── role_list │ │ └── properties.yml │ ├── 2-0001_Base_ID_06 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ ├── role_list │ │ └── properties.yml │ ├── 1-0001_Base-NETWORK_01 │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ ├── inventory │ │ └── Serverspec.1.inventory │ ├── 1-0104_postgreSQL_01 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 2-0001_Base_ID_02 │ │ ├── role_list │ │ ├── readme.md │ │ └── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ ├── 1-0104_postgreSQL_02 │ │ ├── check.sh │ │ ├── run.sh │ │ └── role_list │ ├── 1-0108_Pgpool-II_test_01 │ │ ├── readme.md │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0108_Pgpool-II_test_03 │ │ ├── readme.md │ │ ├── role_list │ │ ├── check.sh │ │ └── run.sh │ ├── 1-0108_Pgpool-II_test_04 │ │ ├── readme.md │ │ ├── role_list │ │ ├── check.sh │ │ └── run.sh │ ├── 2-0001_Base-ADVANCED_other_01 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── role_list │ ├── 2-0001_Base-ADVANCED_other_02 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── role_list │ ├── 2-0001_Base-ADVANCED_other_03 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── role_list │ ├── 2-0001_Base-ADVANCED_other_04 │ │ ├── readme.md │ │ ├── host_vars │ │ │ ├── 192.168.127.141.yml │ │ │ └── 192.168.127.151.yml │ │ └── role_list │ ├── 1-0001_Base-ADVANCED-name_resolve_01 │ │ ├── sh │ │ │ └── set_interface.sh │ │ ├── readme.md │ │ └── role_list │ ├── 1-0102_apache_01_01 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0102_apache_01_02 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0102_apache_03_03 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0103_Tomcat_01 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0103_Tomcat_02 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ ├── 1-0001_Base-ADVANCED-name_resolve_02 │ │ ├── readme.md │ │ ├── role_list │ │ ├── host_vars │ │ │ ├── 192.168.127.31.yml │ │ │ └── 192.168.127.41.yml │ │ ├── run.sh │ │ └── properties.yml │ ├── 1-0103_Tomcat_04 │ │ ├── role_list │ │ └── check.sh │ ├── 1-0103_Tomcat_05 │ │ ├── role_list │ │ └── check.sh │ ├── 1-0104_postgreSQL_05 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh │ └── 1-0102_apache_05 │ │ ├── check.sh │ │ ├── role_list │ │ └── run.sh ├── tools │ ├── host_vars │ ├── 1-9901_PreDev.inventory.sample │ ├── 1-9902_PostDev.inventory.sample │ ├── 1-9909_RepoDestroy.inventory.sample │ ├── 1-9910_RepofilePut.inventory.sample │ ├── 1-9911_RepofileRemove.inventory.sample │ ├── 1-9908_RepoUp.inventory.sample │ ├── 2-9901_PreDev.inventory.sample │ └── 2-9902_PostDev.inventory.sample └── files │ └── shift │ └── set_acl.ps1 ├── Ansible ├── host_vars ├── tools │ ├── 2-9901_PreDev │ │ ├── files │ │ │ └── .gitkeep │ │ ├── TargetHostList │ │ ├── 2-9901-01_CreateTmp.yml │ │ ├── PSscripts │ │ │ ├── ShowRemotingForAnsible.ps1 │ │ │ ├── ShowRemotingForAnsible_all.ps1 │ │ │ └── RemoveListener.ps1 │ │ ├── TargetHostList.sample │ │ ├── 2-9901-02_SendFiles.yml │ │ └── var.yml │ ├── 1-9910_RepofilePut │ │ ├── var.yml │ │ └── templates │ │ │ └── shift.repo.j2 │ ├── 1-9908_RepoUp │ │ └── var.yml │ ├── 2-9902_PostDev │ │ ├── 2-9902-01_RemoveTmp.yml │ │ ├── PSscripts │ │ │ ├── RecoverRemotingForAnsible.ps1 │ │ │ └── ShowRemotingForAnsible_all.ps1 │ │ ├── TargetHostList │ │ ├── TargetHostList.sample │ │ └── var.yml │ ├── 1-9901_PreDev │ │ ├── templates │ │ │ └── sudoers.d_file.j2 │ │ ├── 1-9901-07_SudoAuth.yml │ │ ├── 1-9901-02_User.yml │ │ ├── 1-9901-04_TmpDir.yml │ │ └── 1-9901-08_SshConfig.yml │ ├── 1-9909_RepoDestroy │ │ └── var.yml │ └── 1-9902_PostDev │ │ ├── 1-9902-07_SudoAuth.yml │ │ ├── 1-9902-04_TmpDir.yml │ │ ├── 1-9902-02_User.yml │ │ ├── var.yml │ │ └── 1-9902-08_SshConfig.yml ├── roles │ ├── 1-0001_Base │ │ ├── files │ │ ├── tasks │ │ │ ├── Network │ │ │ │ ├── 1-0001-03_Network.yml │ │ │ │ └── 1-0001-02_Interface.yml │ │ │ ├── Base │ │ │ │ ├── ID │ │ │ │ │ ├── 1-0001-13_OSGroup.yml │ │ │ │ │ └── 1-0001-24_OSUser.yml │ │ │ │ └── OSCORE │ │ │ │ │ └── 1-0001-14_Lang.yml │ │ │ ├── Advanced │ │ │ │ └── 1-0001-40_Syslog.yml │ │ │ └── Storage │ │ │ │ └── 1-0001-35_SetDirectory.yml │ │ ├── templates │ │ │ ├── ifcfg_for_RHEL6_master.j2 │ │ │ ├── ifcfg_for_RHEL6_slave.j2 │ │ │ ├── ifcfg_for_RHEL6.j2 │ │ │ └── resolv.conf.j2 │ │ └── vars │ │ │ └── main.yml │ ├── 1-0102_apache │ │ ├── files │ │ ├── handlers │ │ │ └── main.yml │ │ ├── vars │ │ │ └── main.yml │ │ ├── tasks │ │ │ ├── main.yml │ │ │ └── 1-0102-07_post_tasks.yml │ │ └── templates │ │ │ └── uriworkermap.properties.j2 │ ├── 1-0103_Tomcat │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── handlers │ │ │ └── main.yml │ ├── 2-0001_Base │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ └── tasks │ │ │ └── 2-0001-012_UserGroup.yml │ ├── 1-0104_postgreSQL │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ ├── handlers │ │ │ └── main.yml │ │ └── tasks │ │ │ └── 1-0104-05_post_tasks.yml │ ├── 1-0105_openJDK │ │ ├── files │ │ ├── tasks │ │ │ ├── main.yml │ │ │ └── 1-0105-01_install.yml │ │ └── vars │ │ │ └── main.yml │ ├── 1-0106_PrivateCA │ │ ├── files │ │ └── vars │ │ │ └── main.yml │ ├── 1-0108_Pgpool-II │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ ├── handlers │ │ │ └── main.yml │ │ └── tasks │ │ │ ├── 1-0108-01_packages.yml │ │ │ ├── main.yml │ │ │ ├── 1-0108-04_post_tasks.yml │ │ │ └── config_pool_passwd.yml │ ├── 1-1201_HinemosAgent │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── handlers │ │ │ └── main.yml │ ├── 1-1301_ZabbixAgent │ │ ├── files │ │ ├── handlers │ │ │ └── main.yml │ │ ├── vars │ │ │ └── main.yml │ │ └── tasks │ │ │ └── main.yml │ ├── 2-1201_HinemosAgent │ │ ├── files │ │ ├── vars │ │ │ └── main.yml │ │ ├── handlers │ │ │ └── main.yml │ │ └── tasks │ │ │ └── main.yml │ └── 2-1301_ZabbixAgent │ │ ├── files │ │ ├── handlers │ │ └── main.yml │ │ ├── vars │ │ └── main.yml │ │ └── tasks │ │ ├── main.yml │ │ └── 2-1301-01_pre_tasks.yml └── plugins │ └── plugin.py ├── Serverspec ├── properties.yml ├── .rspec └── spec │ ├── 1-0001_Base │ ├── OSCORE │ │ ├── 1-0001-021_OsVersion_spec.rb │ │ ├── 1-0001-025_RunLevel_spec.rb │ │ └── 1-0001-026_Selinux_spec.rb │ └── Network │ │ └── 1-0001-071_Hostname_spec.rb │ ├── 2-0001_Base │ ├── ID │ │ └── 2-0001-012_UserGroup_spec.rb │ ├── OSCORE │ │ ├── 2-0001-024_Timezone_spec.rb │ │ └── 2-0001-021_SystemInfo_spec.rb │ ├── Advanced │ │ ├── 2-0001-101_Hotfix_spec.rb │ │ ├── 2-0001-100_Product_spec.rb │ │ ├── 2-0001-107_PsExecPolicy_spec.rb │ │ └── 2-0001-095_Feature_spec.rb │ └── Network │ │ └── 2-0001-071_Hostname_spec.rb │ └── 1-0106_PrivateCA │ └── 1-0106-06_HashAlgorithm_spec.rb └── README.md /Shift_Log/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/host_vars/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ansible/host_vars: -------------------------------------------------------------------------------- 1 | ../Shift_Env/host_vars/ -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_02/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_04/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_06/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_07/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tools/host_vars: -------------------------------------------------------------------------------- 1 | ../../Ansible/host_vars -------------------------------------------------------------------------------- /Serverspec/properties.yml: -------------------------------------------------------------------------------- 1 | ../Shift_Env/properties.yml -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_01/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_02/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files/ -------------------------------------------------------------------------------- /Ansible/roles/1-0103_Tomcat/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/2-0001_Base/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_01/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_02/properties.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ansible/roles/1-0104_postgreSQL/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/1-0105_openJDK/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files/ -------------------------------------------------------------------------------- /Ansible/roles/1-0106_PrivateCA/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/1-1201_HinemosAgent/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/1-1301_ZabbixAgent/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/2-1201_HinemosAgent/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/roles/2-1301_ZabbixAgent/files: -------------------------------------------------------------------------------- 1 | ../../../Shift_Env/files -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/TargetHostList: -------------------------------------------------------------------------------- 1 | TargetHostList.sample -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/role_list: -------------------------------------------------------------------------------- 1 | 1-0001_Base 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_01/role_list: -------------------------------------------------------------------------------- 1 | 2-1301_ZabbixAgent 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/role_list: -------------------------------------------------------------------------------- 1 | 2-1301_ZabbixAgent 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/role_list: -------------------------------------------------------------------------------- 1 | 1-0001_Base 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_01/role_list: -------------------------------------------------------------------------------- 1 | 2-0001_Base 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/role_list: -------------------------------------------------------------------------------- 1 | 2-0001_Base 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_01/role_list: -------------------------------------------------------------------------------- 1 | 2-0001_Base 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_02/role_list: -------------------------------------------------------------------------------- 1 | 2-0001_Base 2 | -------------------------------------------------------------------------------- /Ansible/tools/1-9910_RepofilePut/var.yml: -------------------------------------------------------------------------------- 1 | l9910_repo_server_ip: "192.168.127.101" 2 | -------------------------------------------------------------------------------- /Ansible/roles/1-0105_openJDK/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-0105-01_install.yml 3 | -------------------------------------------------------------------------------- /Ansible/roles/1-0106_PrivateCA/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | prca_privateca: "{{ PrivateCA }}" 3 | 4 | -------------------------------------------------------------------------------- /Ansible/roles/1-1201_HinemosAgent/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | hinemos_agent: "{{ HinemosAgent }}" 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0106_PrivateCA_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0106_PrivateCA/tasks/main.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0106_PrivateCA_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0106_PrivateCA/tasks/main.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/role_list: -------------------------------------------------------------------------------- 1 | nsible/roles/2-0001_Base/tasks/2-0001-002_Memory.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-002_Memory.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-002_Memory.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-cron_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-12_Crontab.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-1301_ZabbixAgent/tasks/1-1301-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-1301_ZabbixAgent/tasks/1-1301-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-1301_ZabbixAgent/tasks/1-1301-01_install.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-eth_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-072_Interface.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-39_Snmp.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-39_Snmp.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-39_Snmp.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-sshd_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-23_Sshd.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-syslog_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-40_Syslog.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_eventlog_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-105_EventLog.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-095_Feature.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-095_Feature.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_registry_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-106_Registry.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-096_Service.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-096_Service.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-096_Service.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-074_Firewall.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-074_Firewall.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-ipv6_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-077_IPv6Disable.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-teaming_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-075_Teaming.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/files/shift/set_acl.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SHIFT-ware/shift_ware/HEAD/Shift_Env/files/shift/set_acl.ps1 -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-08_Ntp.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-STORAGE_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Storage/1-0001-35_SetDirectory.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-078_DnsSuffix.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-078_DnsSuffix.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-051_Directory.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-051_Directory.yml 2 | -------------------------------------------------------------------------------- /Ansible/tools/1-9908_RepoUp/var.yml: -------------------------------------------------------------------------------- 1 | l9908_remote_tmp_dir: /root/.shift 2 | l9908_repository_dir: /root/.shift/yum_repo 3 | 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-service_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-07_Service.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-08_Ntp.yml 2 | 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-079_NameResolve.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-079_NameResolve.yml 2 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-default_gw-static_routing_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-073_Routing.yml 2 | -------------------------------------------------------------------------------- /Ansible/roles/1-0103_Tomcat/vars/main.yml: -------------------------------------------------------------------------------- 1 | tomc_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | tomc_tomcat: "{{ Tomcat }}" 4 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/vars/main.yml: -------------------------------------------------------------------------------- 1 | pgpool_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | pgpl_pgpool: "{{ Pgpool }}" 4 | -------------------------------------------------------------------------------- /Ansible/roles/2-1201_HinemosAgent/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | hinemos_agent: "{{ HinemosAgent }}" 3 | w1201_hinemosagent_community_permission: 4 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: restart httpd 3 | service: 4 | name: httpd 5 | state: restarted 6 | 7 | -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/vars/main.yml: -------------------------------------------------------------------------------- 1 | apac_apache_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | apac_apache: "{{ apache }}" 4 | 5 | -------------------------------------------------------------------------------- /Ansible/roles/1-0104_postgreSQL/vars/main.yml: -------------------------------------------------------------------------------- 1 | pgsq_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | pgsq_postgresql: "{{ PostgreSQL }}" 4 | -------------------------------------------------------------------------------- /Ansible/roles/1-1301_ZabbixAgent/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: zabbix_service_restart 2 | service: 3 | name=zabbix-agent 4 | state=restarted 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case03/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case03/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | -------------------------------------------------------------------------------- /Ansible/roles/1-0105_openJDK/vars/main.yml: -------------------------------------------------------------------------------- 1 | openjdk_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | openjdk_packages: "{{ openjdk.packages }}" 4 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: pgpool_service_restart 3 | service: 4 | name: pgpool 5 | state: restarted 6 | 7 | -------------------------------------------------------------------------------- /Ansible/roles/1-1301_ZabbixAgent/vars/main.yml: -------------------------------------------------------------------------------- 1 | zabbix_agent_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | zabbix_agent: "{{ ZabbixAgent }}" 4 | -------------------------------------------------------------------------------- /Ansible/roles/2-1301_ZabbixAgent/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: zabbix_service_restart 2 | win_service: 3 | name: "Zabbix Agent" 4 | state: restarted 5 | -------------------------------------------------------------------------------- /Ansible/roles/2-1301_ZabbixAgent/vars/main.yml: -------------------------------------------------------------------------------- 1 | zabbix_agent_tmp_dir: "{{ remote_tmp_dir }}/{{ role_name }}" 2 | 3 | zabbix_agent: "{{ ZabbixAgent }}" 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-025_RecoverOs.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-024_Timezone.yml 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-025_RecoverOs.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-024_Timezone.yml 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-025_RecoverOs.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-024_Timezone.yml 3 | -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/2-9902-01_RemoveTmp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 2-9902-01_RemoveTmp 3 | win_file: > 4 | path='{{ remote_tmp_dir }}' 5 | state=absent 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.7.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.8.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.7.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.8.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.7.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | operating_system: Linux 3 | openjdk: 4 | version: 1.8.0 5 | install_devel: yes 6 | 7 | -------------------------------------------------------------------------------- /Ansible/tools/1-9901_PreDev/templates/sudoers.d_file.j2: -------------------------------------------------------------------------------- 1 | {{ l9901_remote_user.name }} ALL=(ALL) NOPASSWD: ALL 2 | Defaults:{{ l9901_remote_user.name }} !requiretty 3 | 4 | -------------------------------------------------------------------------------- /Ansible/tools/1-9910_RepofilePut/templates/shift.repo.j2: -------------------------------------------------------------------------------- 1 | [shift] 2 | name=Repository for SHIFT ware 3 | baseurl=http://{{ l9910_repo_server_ip }} 4 | enabled=1 5 | gpgcheck=0 6 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/2-9901-01_CreateTmp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 2-9901-01_CreateTmp 3 | win_file: 4 | path: '{{ remote_tmp_dir }}' 5 | state: directory 6 | 7 | -------------------------------------------------------------------------------- /Ansible/tools/1-9909_RepoDestroy/var.yml: -------------------------------------------------------------------------------- 1 | l9909_remote_tmp_dir: "{{ l9908_remote_tmp_dir }}" 2 | l9909_repository_dir: "{{ l9908_repository_dir }}" 3 | l9909_remove_createrepo: no 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | Tomcat: 5 | dummy: a 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-076_Domain.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-071_Hostname.yml 3 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/PSscripts/ShowRemotingForAnsible.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SHIFT-ware/shift_ware/HEAD/Ansible/tools/2-9901_PreDev/PSscripts/ShowRemotingForAnsible.ps1 -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-HW_01 4 | 5 | ## Description 6 | 7 | 1-0001_BaseロールのHW部分のテスト 8 | 9 | ## テスト対象ロール 10 | 1-0001_Base 11 | -------------------------------------------------------------------------------- /Ansible/roles/1-0104_postgreSQL/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: postgresql_service_restart 3 | service: 4 | name: "postgresql-{{ pgsq_postgresql.version }}" 5 | state: restarted 6 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/PSscripts/ShowRemotingForAnsible_all.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SHIFT-ware/shift_ware/HEAD/Ansible/tools/2-9901_PreDev/PSscripts/ShowRemotingForAnsible_all.ps1 -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/PSscripts/RecoverRemotingForAnsible.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SHIFT-ware/shift_ware/HEAD/Ansible/tools/2-9902_PostDev/PSscripts/RecoverRemotingForAnsible.ps1 -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/TargetHostList: -------------------------------------------------------------------------------- 1 | [targethost] 2 | ## example 3 | # 192.168.0.1 4 | # webserver1 5 | 6 | [targethost:vars] 7 | ansible_ssh_port=5986 8 | ansible_connection=winrm 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ID_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのID部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ID_02 4 | 5 | ## Description 6 | 1-0001_BaseロールのID部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ID_03 4 | 5 | ## Description 6 | 1-0001_BaseロールのID部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-cron_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-cron_01 4 | 5 | ## Description 6 | 1-0001_Baseロールのcron部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | Pgpool: 4 | postgresql_version: 9.4 5 | -------------------------------------------------------------------------------- /Ansible/tools/1-9902_PostDev/1-9902-07_SudoAuth.yml: -------------------------------------------------------------------------------- 1 | - name: RevokeSudoAuthToUser 2 | file: > 3 | path="/etc/sudoers.d/shift_tmp" 4 | state=absent 5 | register: ret_1_9902_07_SudoAuth 6 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/TargetHostList.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | ## example 3 | stg-target04 4 | stg-target05 5 | 6 | [targethost:vars] 7 | ansible_ssh_port=5986 8 | ansible_connection=winrm 9 | -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/PSscripts/ShowRemotingForAnsible_all.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SHIFT-ware/shift_ware/HEAD/Ansible/tools/2-9902_PostDev/PSscripts/ShowRemotingForAnsible_all.ps1 -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/TargetHostList.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | ## example 3 | stg-target04 4 | stg-target05 5 | 6 | [targethost:vars] 7 | ansible_ssh_port=5986 8 | ansible_connection=winrm 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-17_Logrotate.yml 2 | Serverspec/spec/1-0001_Base/Advanced/1-0001-094_Logrotate_spec.rb 3 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-OSCORE_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのOSCORE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-OSCORE_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのOSCORE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-OSCORE_02 4 | 5 | ## Description 6 | 1-0001_BaseロールのOSCORE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_03/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | OSCORE: 5 | selinux: 'disabled' 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_03/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | OSCORE: 5 | selinux: 'disabled' 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-OSCORE_03 4 | 5 | ## Description 6 | 1-0001_BaseロールのOSCORE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-syslog_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-syslog_01 4 | 5 | ## Description 6 | 1-0001_Baseロールのsyslog部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_04/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "changed=0" Shift_Log/Ansible.log 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | package: 'zabbix-agent' 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | package: 'zabbix-agent' 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-HW_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのHW部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-HW_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのHW部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-HW_03 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのHW部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_03 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_04/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_04 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_05/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_05 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_06/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_06 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0103_Tomcat/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-0103-01_create_user_and_groups.yml 3 | - include_tasks: 1-0103-02_configure.yml 4 | - include_tasks: 1-0103-03_post_tasks.yml 5 | -------------------------------------------------------------------------------- /Ansible/tools/1-9902_PostDev/1-9902-04_TmpDir.yml: -------------------------------------------------------------------------------- 1 | - name: DeleteTmpDir 2 | file: > 3 | path={{ l9902_remote_tmp_dir.path }} 4 | state=absent 5 | register: ret_1_9902_04_TmpDir 6 | 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-NETWORK_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのNETWORK部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-STORAGE_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-STORAGE_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのSTORAGE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_03/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_06/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_07/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-service_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-OSCORE_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのOSCORE部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-OSCORE_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのOSCORE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-OSCORE_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのOSCORE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-OSCORE_03 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのOSCORE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-1301_ZabbixAgent_01 4 | 5 | ## Description 6 | 7 | 1-1301_ZabbixAgentロールのテスト 8 | 9 | ## テスト対象ロール 10 | - 1-1301_ZabbixAgent 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_05/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | uac: 6 | level: 'high' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_05/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | uac: 6 | level: 'high' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-1301_ZabbixAgent_01 4 | 5 | ## Description 6 | 7 | 2-1301_ZabbixAgentロールのテスト 8 | 9 | ## テスト対象ロール 10 | - 2-1301_ZabbixAgent 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-1301_ZabbixAgent_02 4 | 5 | ## Description 6 | 7 | 2-1301_ZabbixAgentロールのテスト 8 | 9 | ## テスト対象ロール 10 | - 2-1301_ZabbixAgent 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/inventory/Serverspec.1.inventory: -------------------------------------------------------------------------------- 1 | - :name: 192.168.127.31 2 | :roles: 3 | :conn_user: 4 | :conn_password: 5 | - :name: 192.168.127.41 6 | :roles: 7 | :conn_user: 8 | :conn_password: 9 | -------------------------------------------------------------------------------- /Ansible/tools/1-9902_PostDev/1-9902-02_User.yml: -------------------------------------------------------------------------------- 1 | - name: OsUser 2 | user: > 3 | name="{{ l9902_remote_user.name }}" 4 | remove=yes 5 | force=yes 6 | state=absent 7 | register: ret_1_9902_02_User 8 | -------------------------------------------------------------------------------- /Serverspec/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | #--format documentation 3 | --format ServerspecAuditFormatter 4 | --require ./formatters/serverspec_audit_formatter.rb 5 | --require ./spec/spec_helper.rb 6 | --failure-exit-code 0 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-snmp_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-snmp部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-snmp_02 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-snmp部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-snmp_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-snmp_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-snmp部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-sshd_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-sshd_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-sshd部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "NG=0" Shift_Log/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "NG=0" Shift_Log/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "NG=0" Shift_Log/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-1301_ZabbixAgent 4 | 5 | ## Description 6 | 7 | Linux用1-1301_ZabbixAgentロールのテスト 8 | 9 | ## テスト対象ロール 10 | - 1-1301_ZabbixAgent 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-ipv6_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-ipv6_01 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのipv6部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_05/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_06/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | group: 6 | - name: 'Testgroup' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_06/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | group: 6 | - name: 'Testgroup' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_06/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-011_User.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-013_Uac.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9901_PreDev.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_pass=password 3 | 4 | [targethost:vars] 5 | ansible_ssh_port=22 6 | #全台共通の場合はここに記載 7 | #ansible_ssh_pass=password 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "changed=7" 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "changed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "changed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-1301_ZabbixAgent_03 4 | 5 | ## Description 6 | 7 | Linux用1-1301_ZabbixAgentロールのテスト 8 | 9 | ## テスト対象ロール 10 | - 1-1301_ZabbixAgent 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-eth_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-Network-eth_06 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのNetwork-eth部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | timezone: 'Tonga Standard Time' 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | timezone: 'Tonga Standard Time' 6 | 7 | -------------------------------------------------------------------------------- /Ansible/tools/1-9901_PreDev/1-9901-07_SudoAuth.yml: -------------------------------------------------------------------------------- 1 | - name: GrantSudoAuthToUser 2 | template: > 3 | src="sudoers.d_file.j2" 4 | dest="/etc/sudoers.d/shift_tmp" 5 | owner=root 6 | group=root 7 | mode=0440 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0108_Pgpool-II_01 4 | 5 | ## Description 6 | 7 | 1-0108_Pgpool-II設定テスト用 8 | 以下のロールがテスト対象 9 | 10 | - 1-0108_Pgpool-II 11 | 12 | ## caution 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0108_Pgpool-II_01 4 | 5 | ## Description 6 | 7 | 1-0108_Pgpool-II冪等性テスト用 8 | 以下のロールがテスト対象 9 | 10 | - 1-0108_Pgpool-II 11 | 12 | ## caution 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_04/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0108_Pgpool-II_01 4 | 5 | ## Description 6 | 7 | 1-0108_Pgpool-II冪等性テスト用 8 | 以下のロールがテスト対象 9 | 10 | - 1-0108_Pgpool-II 11 | 12 | ## caution 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_other_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_other_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_other_03 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_04/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_other_04 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_01/sh/pywinrm.py: -------------------------------------------------------------------------------- 1 | import winrm 2 | import sys 3 | 4 | args = sys.argv 5 | s = winrm.Session(args[1], auth=('administrator', 'p@ssw0rd')) 6 | r = s.run_cmd(args[2]) 7 | 8 | print r.std_out 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/test_case02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | ZabbixAgent: 4 | service: 5 | state: 'started' 6 | 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/test_case02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | ZabbixAgent: 4 | service: 5 | state: 'started' 6 | 7 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-01_packages.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0108-01_packages - install package 3 | yum: 4 | name: "pgpool-II-pg{{ Pgpool.postgresql_version | replace('.', '') }}" 5 | state: present 6 | -------------------------------------------------------------------------------- /Ansible/tools/1-9901_PreDev/1-9901-02_User.yml: -------------------------------------------------------------------------------- 1 | - name: OsUser 2 | user: > 3 | name="{{ l9901_remote_user.name }}" 4 | uid="{{ l9901_remote_user.uid }}" 5 | group="{{ l9901_remote_user.group }}" 6 | state=present 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_01/sh/set_interface.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | nmcli c s ens192 4 | 5 | nmcli c m ens192 connection.autoconnect yes 6 | nmcli c m ens192 ipv4.method manual ipv4.addresses 10.10.10.10 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-packages_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-packages部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_03/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0108_Pgpool-II_01 4 | 5 | ## Description 6 | 7 | 1-0108_Pgpool-IIタスクスキップテスト用 8 | 以下のロールがテスト対象 9 | 10 | - 1-0108_Pgpool-II 11 | 12 | ## caution 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_eventlog_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_eventlog_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_feature_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_feature_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_registry_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_registry_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_service_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_service_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_03/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_service_03 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-firewall_01 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのfirewall部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-firewall_02 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのfirewall部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Network/1-0001-03_Network.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0001-03_Hostname - change hostname 3 | hostname: name="{{ base_network.hostname }}" 4 | when: 5 | - base_network | has_nested_keys('hostname') 6 | -------------------------------------------------------------------------------- /Ansible/roles/1-1301_ZabbixAgent/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-1301-01_install.yml 3 | when: zabbix_agent is defined 4 | - include_tasks: 1-1301-02_post_tasks.yml 5 | when: zabbix_agent | has_nested_keys("zabbix_host") 6 | -------------------------------------------------------------------------------- /Ansible/roles/2-0001_Base/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | base_BASE: "{{ BASE | default('') }}" 3 | base_STORAGE: "{{ STORAGE | default('') }}" 4 | base_NETWORK: "{{ NETWORK | default('') }}" 5 | base_ADVANCED: "{{ ADVANCED | default('') }}" 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-name_resolve_01 4 | 5 | ## Description 6 | 7 | Linux用Baseロール DNS設定部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 1-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-name_resolve_02 4 | 5 | ## Description 6 | 7 | Linux用Baseロール DNS設定部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 1-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-timeserver_01 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-timeserver部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-timeserver_02 4 | 5 | ## Description 6 | 1-0001_BaseロールのADVANCED-timeserver部分のテスト 7 | 8 | ## テスト対象ロール 9 | - 1-0001_Base 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "failed=0" 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_04/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -e "192.168.127.31" Shift_Log/Ansible.log | grep -e "changed=0" 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | feature: 6 | - name: 'SNMP サービス' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | feature: 6 | - name: 'SNMP サービス' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-dns_suffix_01 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのdns_suffix部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-dns_suffix_02 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのdns_suffix部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-teaming_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-teaming_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのNETWORK-teaming部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: 'C:\temp2' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: 'C:\temp2' 7 | 8 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9902_PostDev.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_pass=password 3 | 4 | 5 | [targethost:vars] 6 | ansible_ssh_port=22 7 | 8 | #全台共通の場合はここに記載 9 | #ansible_ssh_pass=password 10 | 11 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/templates/ifcfg_for_RHEL6_master.j2: -------------------------------------------------------------------------------- 1 | DEVICE={{ item.name }} 2 | TYPE=Ethernet 3 | ONBOOT=yes 4 | NM_CONTROLLED=yes 5 | BOOTPROTO=none 6 | IPV4_FAILURE_FATAL=yes 7 | IPV6INIT=yes 8 | NAME="System {{ item.name }}" 9 | -------------------------------------------------------------------------------- /Ansible/roles/1-1201_HinemosAgent/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-1201-01_install.yml 3 | when: hinemos_agent is defined 4 | - include_tasks: 1-1201-02_post_tasks.yml 5 | when: hinemos_agent | has_nested_keys("hinemos_node") 6 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/2-9901-02_SendFiles.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 2-9901-02_SendFiles 3 | win_copy: 4 | src: 'files/{{ item }}' 5 | dest: '{{ remote_tmp_dir }}/' 6 | with_items: tool_list 7 | when: tool_list is defined 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_03/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ID: 5 | password_policy: 6 | max_days: 10000 7 | min_days: 1 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | NETWORK: 5 | default_gw: 6 | addr: '192.168.127.254' 7 | if: 'eth0' 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | NETWORK: 5 | default_gw: 6 | addr: '192.168.127.254' 7 | if: 'ens161' 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_05/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_06/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_07/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-01_create_user_and_groups.yml 2 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-02_configure.yml 3 | Ansible/roles/1-0103_Tomcat/tasks/1-0103-03_post_tasks.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_product_hotfix_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ADVANCED_product_hotfix_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのADVANCE部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'system' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'system' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'none' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'none' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/sh/pywinrm.py: -------------------------------------------------------------------------------- 1 | import winrm 2 | import sys 3 | 4 | args = sys.argv 5 | s = winrm.Session(args[1], auth=('administrator', 'p@ssw0rd')) 6 | r = s.run_ps(args[2]) 7 | 8 | print r.std_out 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-name_resolve_01 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのname_resolve部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-name_resolve_02 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのname_resolve部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-STORAGE-directory_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのSTORAGE-directory部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-STORAGE-directory_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのSTORAGE-directory部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Ansible/tools/1-9901_PreDev/1-9901-04_TmpDir.yml: -------------------------------------------------------------------------------- 1 | 2 | - name: create temporary dir for shift 3 | file: > 4 | path="{{ l9901_remote_tmp_dir.path }}" 5 | owner="{{ l9901_remote_tmp_dir.owner }}" 6 | mode=755 7 | state=directory 8 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/PSscripts/RemoveListener.ps1: -------------------------------------------------------------------------------- 1 | $selectorset = @{} 2 | $selectorset.Add('Transport', 'HTTPS') 3 | $selectorset.Add('Address', '*') 4 | Remove-WSManInstance -ResourceURI 'winrm/config/Listener'-SelectorSet $selectorset 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 1-0001_Base-ADVANCED-logrotate_01 4 | 5 | ## Description 6 | 7 | 1-0001_BaseロールのADVANCED-logrotate部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 1-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-sshd_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | ADVANCED: 4 | sshd: 5 | permit_root_login: False 6 | password_auth: False 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-sshd_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | ADVANCED: 4 | sshd: 5 | permit_root_login: False 6 | password_auth: False 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-24_OSUser.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-13_OSGroup.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-16_PasswordRules.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-24_OSUser.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-13_OSGroup.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-16_PasswordRules.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_03/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ID: 5 | password_policy: 6 | max_days: 10000 7 | min_days: 1 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-24_OSUser.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-13_OSGroup.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-16_PasswordRules.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | feature: 6 | - name: 'SNMP サービス' 7 | 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_feature_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | feature: 6 | - name: 'SNMP サービス' 7 | 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-STORAGE-disk-cdrom_01 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのSTORAGE-disk-cdrom部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-STORAGE-disk-cdrom_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのSTORAGE-disk-cdrom部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-0108-01_packages.yml 3 | - include_tasks: 1-0108-02_create_user_and_groups.yml 4 | - include_tasks: 1-0108-03_pgpool_config.yml 5 | - include_tasks: 1-0108-04_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'UmRdpService' 7 | state: False 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/test_case02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'auto' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/test_case02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'auto' 8 | 9 | -------------------------------------------------------------------------------- /Ansible/roles/1-1201_HinemosAgent/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: RestartSNMP 2 | win_service: 3 | name: SNMP 4 | state: restarted 5 | 6 | - name: RestartHinemosAgent 7 | win_service: 8 | name: HinemosAgent 9 | state: restarted 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-NETWORK-hostname-domain 4 | 5 | ## Description 6 | 7 | 2-0001_BaseのNETWORK-hostname-domain部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_02/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-ID_02 4 | 5 | ## Description 6 | 7 | 2-0001_BaseロールのID部分のテスト 8 | ※ issuee252 win_userのバグが解消されたらaccount_disabled: Trueにする。 9 | 10 | ## テスト対象ロール 11 | - 2-0001_Base 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-05_Resolv.yml 2 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-04_Hosts.yml 3 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-20_Nsswitch.yml 4 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_05/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | diff Shift_Log/Serverspec_Result_192.168.127.31.csv Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | diff Shift_Log/Serverspec_Result_192.168.127.31.csv Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | diff Shift_Log/Serverspec_Result_192.168.127.31.csv Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv 6 | result01=$? 7 | 8 | exit $result01 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'UmRdpService' 7 | state: False 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'DHCP Client' 7 | start_mode: 'Manual' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | dns_suffix: 6 | primary: 7 | fqdn: 'tistest.local' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | dns_suffix: 6 | primary: 7 | fqdn: 'tistest.local' 8 | 9 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | base_base: "{{ BASE | default('') }}" 3 | 4 | base_storage: "{{ STORAGE | default('') }}" 5 | 6 | base_network: "{{ NETWORK | default('') }}" 7 | 8 | base_advanced: "{{ ADVANCED | default('') }}" 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-05_Resolv.yml 2 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-04_Hosts.yml 3 | Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-20_Nsswitch.yml 4 | 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'DHCP Client' 7 | start_mode: 'Manual' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9909_RepoDestroy.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_user=root ansible_ssh_pass=password 3 | 4 | [targethost:vars] 5 | ansible_ssh_port=22 6 | #全台共通の場合はここに記載 7 | #ansible_ssh_user=root 8 | #ansible_ssh_pass=password 9 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9910_RepofilePut.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_user=root ansible_ssh_pass=password 3 | 4 | [targethost:vars] 5 | ansible_ssh_port=22 6 | #全台共通の場合はここに記載 7 | #ansible_ssh_user=root 8 | #ansible_ssh_pass=password 9 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9911_RepofileRemove.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_user=root ansible_ssh_pass=password 3 | 4 | [targethost:vars] 5 | ansible_ssh_port=22 6 | #全台共通の場合はここに記載 7 | #ansible_ssh_user=root 8 | #ansible_ssh_pass=password 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-default_gw-static_routing_01/readme.md: -------------------------------------------------------------------------------- 1 | Name 2 | ==== 3 | 2-0001_Base-default_gw-static_routing_01 4 | 5 | ## Description 6 | 7 | 2-0001_Baseロールのdefault_gw-static_routing部分のテスト 8 | 9 | ## テスト対象ロール 10 | - 2-0001_Base 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | group: 6 | - name: 'Testgroup' 7 | uac: 8 | level: 'disabled' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | group: 6 | - name: 'Testgroup' 7 | uac: 8 | level: 'disabled' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_05/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | diff Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | exit $result01 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | recover_os: 6 | dumpfile: 7 | type: 'kernel' 8 | overwrite: False 9 | -------------------------------------------------------------------------------- /Shift_Env/tools/1-9908_RepoUp.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_ssh_user=root ansible_ssh_pass=password 3 | 4 | [targethost:vars] 5 | ansible_ssh_port=22 6 | #全台共通の場合はここに記載 7 | #ansible_ssh_user=root 8 | #ansible_ssh_pass=password 9 | 10 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-13_OSGroup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0001-13_OSGroup - modify group 3 | group: 4 | name: '{{ item.name }}' 5 | gid: '{{ item.gid | default(omit) }}' 6 | state: 'present' 7 | with_items: "{{ base_base.ID.user_group }}" 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | dns_suffix: 6 | primary: 7 | change_when_domain_membership_changed: False 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | dns_suffix: 6 | primary: 7 | change_when_domain_membership_changed: False 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/test_case03/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_files: 6 | - path: '/var/log/wtmp2' 7 | - path: '/var/log/btmp2' 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | operating_system: 'Linux' 3 | BASE: 4 | OSCORE: 5 | version: '6.5' 6 | ADVANCED: 7 | name_resolve: 8 | pri_name_resolve: 'files' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | operating_system: 'Linux' 3 | BASE: 4 | OSCORE: 5 | version: '7.1' 6 | ADVANCED: 7 | name_resolve: 8 | pri_name_resolve: 'files' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | OSCORE: 5 | time: 6 | utc: False 7 | kdump: 8 | path: '/var/crash' 9 | service_state: 'stop' 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | OSCORE: 5 | time: 6 | utc: False 7 | kdump: 8 | path: '/var/crash' 9 | service_state: 'stop' 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | recover_os: 6 | dumpfile: 7 | type: 'kernel' 8 | overwrite: False 9 | 10 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/templates/ifcfg_for_RHEL6_slave.j2: -------------------------------------------------------------------------------- 1 | DEVICE={{ item.1.name }} 2 | TYPE=Ethernet 3 | ONBOOT=yes 4 | MASTER={{ item.0.name }} 5 | SLAVE=yes 6 | NM_CONTROLLED=yes 7 | BOOTPROTO=none 8 | IPV4_FAILURE_FATAL=yes 9 | IPV6INIT=yes 10 | NAME="System {{ item.1.name }}" 11 | -------------------------------------------------------------------------------- /Ansible/roles/2-1201_HinemosAgent/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: RestartSNMP 2 | win_service: 3 | name: SNMP 4 | state: restarted 5 | 6 | - name: RestartHinemosAgent 7 | win_service: 8 | name: "{{ w1201_hinemosagent_service_HinemosAgent_name }}" 9 | state: restarted 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/test_case03/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_files: 6 | - path: '/var/log/wtmp2' 7 | - path: '/var/log/btmp2' 8 | 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | Pgpool: 5 | a: 6 | 192.168.127.41: 7 | connection_hostname: '192.168.127.41' 8 | operating_system: 'Linux' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'Appinfo' 7 | state: True 8 | start_mode: 'Auto' 9 | 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'Appinfo' 7 | state: True 8 | start_mode: 'Auto' 9 | 10 | -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 1-0102-01_create_user_and_groups.yml 3 | - include_tasks: 1-0102-04_install_httpd.yml 4 | - include_tasks: 1-0102-05_install_mod_jk.yml 5 | - include_tasks: 1-0102-06_install_vhosts.yml 6 | - include_tasks: 1-0102-07_post_tasks.yml 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-STORAGE_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: '/root/test' 7 | owner_user: 'root' 8 | owner_group: 'root' 9 | permission: 555 10 | 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-STORAGE_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: '/root/test' 7 | owner_user: 'root' 8 | owner_group: 'root' 9 | permission: 555 10 | 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_04/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | group: 8 | - name: 'Testgroup' 9 | uac: 10 | level: 'middle' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_04/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | group: 8 | - name: 'Testgroup' 9 | uac: 10 | level: 'middle' 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/2-1301_ZabbixAgent/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 2-1301-01_pre_tasks.yml 3 | when: zabbix_agent is defined 4 | - include_tasks: 2-1301-02_install.yml 5 | when: zabbix_agent is defined 6 | - include_tasks: 2-1301-03_post_tasks.yml 7 | when: zabbix_agent | has_nested_keys("zabbix_host") 8 | -------------------------------------------------------------------------------- /Ansible/roles/2-1201_HinemosAgent/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: 2-1201-01_pre_tasks.yml 3 | when: hinemos_agent is defined 4 | - include_tasks: 2-1201-02_install.yml 5 | when: hinemos_agent is defined 6 | - include_tasks: 2-1201-03_post_tasks.yml 7 | when: hinemos_agent | has_nested_keys("hinemos_node") 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | echo "----RHEL6の実行結果----" 6 | grep -e "NG=0" Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | echo "----RHEL7の実装はありません...----" 10 | result02=$? 11 | 12 | exit $((result01 || result02)) 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-01_packages.yml 2 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-02_create_user_and_groups.yml 3 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-03_pgpool_config.yml 4 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-04_post_tasks.yml 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-01_packages.yml 2 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-02_create_user_and_groups.yml 3 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-03_pgpool_config.yml 4 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-04_post_tasks.yml 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-01_packages.yml 2 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-02_create_user_and_groups.yml 3 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-03_pgpool_config.yml 4 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-04_post_tasks.yml 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-01_packages.yml 2 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-02_create_user_and_groups.yml 3 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-03_pgpool_config.yml 4 | Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-04_post_tasks.yml 5 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'custom' 8 | size: 9 | min: 4096 10 | max: 4096 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | HW: 5 | memory: 6 | virtualmemory: 7 | type: 'custom' 8 | size: 9 | min: 4096 10 | max: 4096 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/templates/ifcfg_for_RHEL6.j2: -------------------------------------------------------------------------------- 1 | DEVICE={{ item.name }} 2 | TYPE=Ethernet 3 | ONBOOT=yes 4 | NM_CONTROLLED=yes 5 | BOOTPROTO=none 6 | IPADDR={{ item.ip_addr.split("/")[0] }} 7 | PREFIX={{ item.ip_addr.split("/")[1] }} 8 | IPV4_FAILURE_FATAL=yes 9 | IPV6INIT=yes 10 | NAME="System {{ item.name }}" 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0106_PrivateCA_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.41.csv 9 | result02=$? 10 | 11 | exit $((result01 || result02)) 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_03/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | echo "----RHEL6の実行結果----" 6 | cat Shift_Log/Ansible.log | grep -e "changed=0" | grep -e "192.168.127.31" 7 | result01=$? 8 | 9 | echo "----RHEL7の実装はありません...----" 10 | result02=$? 11 | 12 | exit $((result01 || result02)) 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tools/2-9901_PreDev.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_user=Administrator ansible_ssh_pass=p@ssw0rd 3 | 4 | [targethost:vars] 5 | ansible_ssh_port = 5986 6 | ansible_connection = winrm 7 | ansible_winrm_server_cert_validation = ignore 8 | 9 | #全台共通の場合はここに記載 10 | #ansible_ssh_pass=password 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tools/2-9902_PostDev.inventory.sample: -------------------------------------------------------------------------------- 1 | [targethost] 2 | 192.168.127.100 ansible_user=Administrator ansible_ssh_pass=p@ssw0rd 3 | 4 | [targethost:vars] 5 | ansible_ssh_port = 5986 6 | ansible_connection = winrm 7 | ansible_winrm_server_cert_validation = ignore 8 | 9 | #全台共通の場合はここに記載 10 | #ansible_ssh_pass=password 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_03/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | package: 'zabbix-agent' 5 | config: 6 | server: '192.168.127.6' 7 | serveractive: '192.168.127.6' 8 | service: 9 | state: 'started' 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_03/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | package: 'zabbix-agent' 5 | config: 6 | server: '192.168.127.6' 7 | serveractive: '192.168.127.6' 8 | service: 9 | state: 'started' 10 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | exit $result01 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/test_case02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_basic_option: 6 | cycle: 'daily' 7 | rotate_num: 10 8 | create: True 9 | add_date: True 10 | compress: True 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/test_case02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_basic_option: 6 | cycle: 'daily' 7 | rotate_num: 10 8 | create: True 9 | add_date: True 10 | compress: True 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | ZabbixAgent: 5 | package: 'zabbix-agent' 6 | 192.168.127.41: 7 | connection_hostname: '192.168.127.41' 8 | operating_system: 'Linux' 9 | ZabbixAgent: 10 | package: 'zabbix-agent' 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | name_resolve: 6 | dns_server: 7 | nic_name: 'イーサネット' 8 | server: 9 | - ip: '192.168.127.50' 10 | - ip: '127.0.0.1' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | name_resolve: 6 | dns_server: 7 | nic_name: 'イーサネット' 8 | server: 9 | - ip: '192.168.127.50' 10 | - ip: '127.0.0.1' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_04/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | echo "----RHEL6の実行結果----" 6 | diff Shift_Log/Serverspec_Result_192.168.127.31.csv Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | 9 | echo "----RHEL7の実装はありません...----" 10 | result02=$? 11 | 12 | exit $((result01 || result02)) 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'disabled' 8 | error_report: 'disabled' 9 | windows_update: 'disabled' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'disabled' 8 | error_report: 'disabled' 9 | windows_update: 'disabled' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'enabled' 9 | windows_update: 'checkonly' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'enabled' 9 | windows_update: 'checkonly' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'disabled' 9 | windows_update: 'downloadonly' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'disabled' 9 | windows_update: 'downloadonly' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_04/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'disabled' 9 | windows_update: 'autoinstall' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_04/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | organization: 'TIS' 6 | owner: 'TIS' 7 | rdp: 'enabled' 8 | error_report: 'disabled' 9 | windows_update: 'autoinstall' 10 | psexecpolicy: 'RemoteSigned' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | firewall: 6 | domain: 7 | enabled_flag: 'True' 8 | private: 9 | enabled_flag: 'True' 10 | public: 11 | enabled_flag: 'True' 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | firewall: 6 | domain: 7 | enabled_flag: 'True' 8 | private: 9 | enabled_flag: 'True' 10 | public: 11 | enabled_flag: 'True' 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | firewall: 6 | domain: 7 | enabled_flag: 'False' 8 | private: 9 | enabled_flag: 'False' 10 | public: 11 | enabled_flag: 'False' 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target30' 6 | domain: 7 | type: 'workgroup' 8 | name: 'TESTWORKGROUP' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target40' 6 | domain: 7 | type: 'workgroup' 8 | name: 'TESTWORKGROUP' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-service_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'auditd' 7 | state: False 8 | enable: False 9 | - name: 'smartd' 10 | state: True 11 | - name: 'ntpd' 12 | enable: True 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | OSCORE: 6 | selinux: 'disabled' 7 | 192.168.127.41: 8 | connection_hostname: '192.168.127.41' 9 | operating_system: 'Linux' 10 | BASE: 11 | OSCORE: 12 | selinux: 'disabled' 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target300' 6 | domain: 7 | type: 'domain' 8 | name: 'test.test' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target400' 6 | domain: 7 | type: 'domain' 8 | name: 'test.test' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | HW: 6 | cpu_core_sum: 1 7 | 192.168.127.41: 8 | connection_hostname: '192.168.127.41' 9 | operating_system: 'Linux' 10 | BASE: 11 | HW: 12 | cpu_core_sum: 1 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | 16 | exit $((result01)) 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | 16 | exit $((result01)) 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-firewall_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | firewall: 6 | domain: 7 | enabled_flag: 'False' 8 | private: 9 | enabled_flag: 'False' 10 | public: 11 | enabled_flag: 'False' 12 | 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case03/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target3000' 6 | domain: 7 | type: 'workgroup' 8 | name: 'TESTWORKGROUP' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case03/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target4000' 6 | domain: 7 | type: 'workgroup' 8 | name: 'TESTWORKGROUP' 9 | user: 'Administrator' 10 | password: 'p@ssw0rd' 11 | 12 | -------------------------------------------------------------------------------- /Serverspec/spec/1-0001_Base/OSCORE/1-0001-021_OsVersion_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("021-OSversion") do 2 | begin 3 | version = property[:BASE][:OSCORE][:version] 4 | rescue NoMethodError 5 | version = nil 6 | end 7 | 8 | describe ("OSバージョンが#{ version }であること"), :if => version != nil do 9 | it { expect( os[:release] ).to eq version.to_s } 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-service_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | service: 6 | - name: 'firewalld' 7 | state: False 8 | enable: False 9 | - name: 'rescue' 10 | state: True 11 | - name: 'dnsmasq' 12 | enable: True 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Network/1-0001-02_Interface.yml 2 | Ansible/roles/1-0001_Base/tasks/Network/1-0001-03_Network.yml 3 | Ansible/roles/1-0001_Base/tasks/Network/1-0001-22_Route.yml 4 | Ansible/roles/1-0001_Base/tasks/Network/1-0001-38_InterfaceNmcli.yml 5 | Ansible/roles/1-0001_Base/tasks/Network/1-0001-39_Bonding.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | name_resolve: 6 | hosts_records: 7 | - ip: '192.168.127.10' 8 | hostname: 'target10' 9 | - ip: '192.168.127.20' 10 | hostname: 'target20' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-name_resolve_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | name_resolve: 6 | hosts_records: 7 | - ip: '192.168.127.10' 8 | hostname: 'target10' 9 | - ip: '192.168.127.20' 10 | hostname: 'target20' 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/templates/uriworkermap.properties.j2: -------------------------------------------------------------------------------- 1 | # Simple worker configuration file 2 | # Mount the Servlet context to the ajp13 worker 3 | 4 | {% for jkmount in apac_apache.mod_jk.jkmount %} 5 | {% if jkmount.positive %} 6 | {{ jkmount.uri }}={{ jkmount.workers }} 7 | {% else %} 8 | !{{ jkmount.uri }}={{ jkmount.workers }} 9 | {% endif %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /Ansible/roles/1-0105_openJDK/tasks/1-0105-01_install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0105-01_install - install package 3 | yum: 4 | name: "java-{{ openjdk.version }}-openjdk" 5 | state: present 6 | 7 | - name: 1-0105-01_install - install devel package 8 | yum: 9 | name: "java-{{ openjdk.version }}-openjdk-devel" 10 | state: present 11 | when: openjdk.install_devel 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_05/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0102_apache/tasks/1-0102-05_install_mod_jk2.4.yml 2 | Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml 3 | Ansible/roles/1-0102_apache/tasks/1-0102-01_create_user_and_groups.yml 4 | Ansible/roles/1-0102_apache/tasks/1-0102-04_install_httpd2.4.yml 5 | Ansible/roles/1-0102_apache/tasks/1-0102-06_install_vhosts2.4.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_04/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Shift.1/Ansible.log | grep -e "changed=1" 6 | result01=$? 7 | diff Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv Shift_Log/Serverspec_Result_192.168.127.31.csv 8 | result02=$? 9 | 10 | sum=`expr $result01 + $result02` 11 | 12 | exit $sum 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_05/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | grep -e "192.168.127.31" Shift_Log/Shift.1/Ansible.log | grep -e "changed=0" 6 | result01=$? 7 | diff Shift_Log/Shift.2/Serverspec_Result_192.168.127.31.csv Shift_Log/Serverspec_Result_192.168.127.31.csv 8 | result02=$? 9 | 10 | sum=`expr $result01 + $result02` 11 | 12 | exit $sum 13 | -------------------------------------------------------------------------------- /Ansible/tools/2-9902_PostDev/var.yml: -------------------------------------------------------------------------------- 1 | ### ANSIBLE SETTING ### 2 | remote_tmp_dir: 'C:\.shift' 3 | 4 | ### SERVERSPEC SETTING ### 5 | disable_spec_setting: true 6 | 7 | ### HOTFIX SETTING ### 8 | # windows2012用hotfix 9 | remove_hotfix: true 10 | HOTFIX: 11 | ID: "2842230" 12 | FILE: "Windows8-RT-KB2842230-x64" 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_01/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | echo 1 7 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.141.csv 8 | result01=$? 9 | 10 | echo 2 11 | grep -E "NG=0," Shift_Log/Serverspec_Result_192.168.127.151.csv 12 | result02=$? 13 | 14 | 15 | exit $((result01 || result02 )) 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | # Serverspecの結果判定 6 | echo 1 7 | grep -E "OK=0," Shift_Log/Serverspec_Result_192.168.127.141.csv 8 | result01=$? 9 | 10 | echo 2 11 | grep -E "OK=0," Shift_Log/Serverspec_Result_192.168.127.151.csv 12 | result02=$? 13 | 14 | 15 | exit $((result01 || result02 )) 16 | 17 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Advanced/1-0001-40_Syslog.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0001-40_Syslog - set syslog 3 | lineinfile: 4 | dest: /etc/rsyslog.conf 5 | regexp: '^#?{{ item.selector | regex_escape() }}\s+{{ item.output | regex_escape() }}\s*$' 6 | line: '{{ item.selector }} {{ item.output }}' 7 | with_items: "{{ base_advanced.syslog.filters }}" 8 | notify: rsyslog_restart 9 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-cron_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | cron: 6 | packages: 7 | - name: 'crontabs-1.10-33.el6.noarch.rpm' 8 | entry: 9 | - record: '* * * * * /root/root.sh' 10 | - record: '* * * * * /home/test1/test1.sh' 11 | usr: 'shift' 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-syslog_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | syslog: 6 | filters: 7 | - selector: 'local7.*' 8 | output: '/var/log/boot_test.log' 9 | - selector: '*.info;mail.none;authpriv.none;cron.none' 10 | output: '/var/log/messages_test' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-syslog_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | syslog: 6 | filters: 7 | - selector: 'local7.*' 8 | output: '/var/log/boot_test.log' 9 | - selector: '*.info;mail.none;authpriv.none;cron.none' 10 | output: '/var/log/messages_test' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_03_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_05/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-01_create_user_and_groups.yml 2 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-02_postgresql.yml 3 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-03_postgresql_conf.yml 4 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-04_postgresql_replication.yml 5 | Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml 6 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_registry_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | registry: 6 | - key: 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' 7 | value: 8 | - name: 'RegisteredOrganization' 9 | type: 'String' 10 | data: 'TIS' 11 | 12 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_registry_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ADVANCED: 5 | registry: 6 | - key: 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' 7 | value: 8 | - name: 'RegisteredOrganization' 9 | type: 'String' 10 | data: 'TIS' 11 | 12 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Storage/1-0001-35_SetDirectory.yml: -------------------------------------------------------------------------------- 1 | - name: 1-0001-35_SetDirectory - modify directory 2 | file: 3 | state: directory 4 | path: "{{ item.path }}" 5 | owner: "{{ item.owner_user | default(omit) }}" 6 | group: "{{ item.owner_group | default(omit) }}" 7 | mode: "{{ item.permission | default(omit) }}" 8 | with_items: "{{ base_storage.directory }}" 9 | 10 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/ID/2-0001-012_UserGroup_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("012-UserGroup")do 2 | begin 3 | groups = Array(property[:BASE][:ID][:group]) 4 | rescue 5 | groups = [] 6 | end 7 | 8 | groups.each do |user_group| 9 | describe group("#{user_group[:name]}") do 10 | describe("groupが存在すること")do 11 | it { should exist } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | ZabbixAgent: 5 | service: 6 | state: 'started' 7 | 192.168.127.151: 8 | connection_hostname: '192.168.127.151' 9 | operating_system: 'Windows' 10 | ZabbixAgent: 11 | service: 12 | state: 'started' 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-cron_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | cron: 6 | packages: 7 | - name: 'crontabs-1.11-6.20121102git.el7.noarch.rpm' 8 | entry: 9 | - record: '* * * * * /root/root.sh' 10 | - record: '* * * * * /home/test1/test1.sh' 11 | usr: 'shift' 12 | 13 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-098_Rdp.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-102_ErrorReport.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-103_WinUpdate.yml 4 | Ansible/roles/2-0001_Base/tasks/2-0001-104_Owner.yml 5 | Ansible/roles/2-0001_Base/tasks/2-0001-107_PsExecPolicy.yml 6 | Ansible/roles/2-0001_Base/tasks/2-0001-109_Organization.yml 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-098_Rdp.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-102_ErrorReport.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-103_WinUpdate.yml 4 | Ansible/roles/2-0001_Base/tasks/2-0001-104_Owner.yml 5 | Ansible/roles/2-0001_Base/tasks/2-0001-107_PsExecPolicy.yml 6 | Ansible/roles/2-0001_Base/tasks/2-0001-109_Organization.yml 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-098_Rdp.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-102_ErrorReport.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-103_WinUpdate.yml 4 | Ansible/roles/2-0001_Base/tasks/2-0001-104_Owner.yml 5 | Ansible/roles/2-0001_Base/tasks/2-0001-107_PsExecPolicy.yml 6 | Ansible/roles/2-0001_Base/tasks/2-0001-109_Organization.yml 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_other_04/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/2-0001_Base/tasks/2-0001-098_Rdp.yml 2 | Ansible/roles/2-0001_Base/tasks/2-0001-102_ErrorReport.yml 3 | Ansible/roles/2-0001_Base/tasks/2-0001-103_WinUpdate.yml 4 | Ansible/roles/2-0001_Base/tasks/2-0001-104_Owner.yml 5 | Ansible/roles/2-0001_Base/tasks/2-0001-107_PsExecPolicy.yml 6 | Ansible/roles/2-0001_Base/tasks/2-0001-109_Organization.yml 7 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_05/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ID: 6 | uac: 7 | level: 'high' 8 | 192.168.127.151: 9 | connection_hostname: '192.168.127.151' 10 | operating_system: 'Windows' 11 | BASE: 12 | ID: 13 | uac: 14 | level: 'high' 15 | 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | install_path: 'C:\Program Files (x86)\ZabbixAgent' 5 | installer: 'zabbix_agentd.exe' 6 | config: 7 | server: '192.168.127.6' 8 | serveractive: '192.168.127.6' 9 | service: 10 | state: 'stopped' 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-1301_ZabbixAgent_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: '~root/.shift' 3 | ZabbixAgent: 4 | install_path: 'C:\Program Files (x86)\ZabbixAgent' 5 | installer: 'zabbix_agentd.exe' 6 | config: 7 | server: '192.168.127.6' 8 | serveractive: '192.168.127.6' 9 | service: 10 | state: 'stopped' 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_01_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_03_03/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_04/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_01_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0106_PrivateCA_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | echo "----RHEL6の実行結果----" 6 | grep -e "NG=0" Shift_Log/Serverspec_Result_192.168.127.31.csv 7 | result01=$? 8 | grep -e "OK=1" Shift_Log/Serverspec_Result_192.168.127.31.csv 9 | result02=$? 10 | 11 | echo "----RHEL7の実装はありません...----" 12 | result03=$? 13 | 14 | exit $((result01 || result02 || result03)) 15 | 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_03/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | Shift_Bin/Ansible-play.sh run 15 | result02=$? 16 | 17 | exit $((result01 || result02)) 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | OSCORE: 6 | timezone: 'Tonga Standard Time' 7 | 192.168.127.151: 8 | connection_hostname: '192.168.127.151' 9 | operating_system: 'Windows' 10 | BASE: 11 | OSCORE: 12 | timezone: 'Tonga Standard Time' 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_04/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_02_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | exit $((result01 || result02)) 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | STORAGE: 6 | disk: 7 | - number: 0 8 | 192.168.127.151: 9 | connection_hostname: '192.168.127.151' 10 | operating_system: 'Windows' 11 | BASE: 12 | STORAGE: 13 | disk: 14 | - number: 0 15 | 16 | -------------------------------------------------------------------------------- /Ansible/roles/2-1301_ZabbixAgent/tasks/2-1301-01_pre_tasks.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 2-1301-001_pre_tasks - Firewall rule to allow Zabbix Agent on TCP port 3 | win_firewall_rule: 4 | name: Zabbix Agent 5 | localport: "{{ ZabbixAgent.config.listenport }}" 6 | action: allow 7 | direction: in 8 | protocol: tcp 9 | profiles: "{{ ZabbixAgent.firewall_profiles }}" 10 | state: present 11 | enabled: yes 12 | -------------------------------------------------------------------------------- /Ansible/tools/1-9902_PostDev/var.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ansible_ssh_user: root 3 | ansible_become_pass: "{{ ansible_ssh_pass }}" 4 | 5 | l9902_remote_tmp_dir: #削除対象のディレクトリ。ホームディレクトリ以外を指定していた場合用に実装。 6 | path: "{{ l9901_remote_tmp_dir.path }}" 7 | 8 | l9902_local_user: #秘密鍵を削除するローカルユーザ 9 | name: "{{ l9901_local_user.name }}" 10 | 11 | l9902_remote_user: #削除対象のリモートユーザ 12 | name: "{{ l9901_remote_user.name }}" 13 | 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_06/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ID: 6 | group: 7 | - name: 'Testgroup' 8 | 192.168.127.151: 9 | connection_hostname: '192.168.127.151' 10 | operating_system: 'Windows' 11 | BASE: 12 | ID: 13 | group: 14 | - name: 'Testgroup' 15 | 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/test_case02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | recover_os: 6 | display_os_list_time: 30 7 | write_eventlog: True 8 | auto_reboot: True 9 | dumpfile: 10 | type: 'auto' 11 | path: 'C:\Windows\MEMORY.DMP' 12 | overwrite: True 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/test_case02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | recover_os: 6 | display_os_list_time: 30 7 | write_eventlog: True 8 | auto_reboot: True 9 | dumpfile: 10 | type: 'auto' 11 | path: 'C:\Windows\MEMORY.DMP' 12 | overwrite: True 13 | 14 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Network/1-0001-02_Interface.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0001-02_Interface - set nic for rhel6 3 | template: 4 | src: 'ifcfg_for_RHEL6.j2' 5 | dest: '/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}' 6 | follow: no 7 | force: yes 8 | owner: root 9 | group: root 10 | mode: 0644 11 | with_items: "{{ base_network.interface }}" 12 | notify: network_service_restart 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_basic_option: 6 | cycle: 'daily' 7 | rotate_num: 10 8 | create: False 9 | add_date: False 10 | compress: False 11 | logrotate_files: 12 | - path: '/var/log/wtmp' 13 | - path: '/var/log/btmp' 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | logrotate_basic_option: 6 | cycle: 'daily' 7 | rotate_num: 10 8 | create: False 9 | add_date: False 10 | compress: False 11 | logrotate_files: 12 | - path: '/var/log/wtmp' 13 | - path: '/var/log/btmp' 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-ipv6_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | ipv6: 6 | nvspbind_path: 'C:\.shift\nvspbind.exe' 7 | registry: 'disabled' 8 | nic_property: 'disabled' 9 | netsh_command: 10 | isatap_if: 'disabled' 11 | sixtofour_if: 'disabled' 12 | teredo_if: 'disabled' 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-ipv6_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | ipv6: 6 | nvspbind_path: 'C:\.shift\nvspbind.exe' 7 | registry: 'disabled' 8 | nic_property: 'disabled' 9 | netsh_command: 10 | isatap_if: 'disabled' 11 | sixtofour_if: 'disabled' 12 | teredo_if: 'disabled' 13 | 14 | -------------------------------------------------------------------------------- /Serverspec/spec/1-0001_Base/Network/1-0001-071_Hostname_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("071-Hostname") do 2 | begin 3 | hostname = property[:NETWORK][:hostname] 4 | rescue NoMethodError 5 | hostname = nil 6 | end 7 | 8 | describe ("ホスト名が#{ hostname }であること"), :if => hostname != nil do 9 | describe command('uname -n') do 10 | its(:stdout) { should match /^#{ Regexp.escape(hostname) }$/ } 11 | end 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | STORAGE: 6 | directory: 7 | - path: 'C:\temp2' 8 | 192.168.127.151: 9 | connection_hostname: '192.168.127.151' 10 | operating_system: 'Windows' 11 | BASE: 12 | STORAGE: 13 | directory: 14 | - path: 'C:\temp2' 15 | 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | HW: 6 | cpu_hyper_thread: False 7 | mem_size: 1922432 8 | 192.168.127.41: 9 | connection_hostname: '192.168.127.41' 10 | operating_system: 'Linux' 11 | BASE: 12 | HW: 13 | cpu_hyper_thread: False 14 | mem_size: 2048000 15 | 16 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/OSCORE/2-0001-024_Timezone_spec.rb: -------------------------------------------------------------------------------- 1 | describe("024-Timezone")do 2 | begin 3 | timezone = property[:BASE][:OSCORE][:timezone] 4 | rescue 5 | timezone = nil 6 | end 7 | 8 | next if timezone == nil 9 | 10 | describe ("Timezoneが #{ timezone } であること") do 11 | describe command('Write-Host -NoNewline (tzutil /g)')do 12 | its(:stdout) { should match /\A#{ timezone }(\s|\Z)/ } 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-default_gw-static_routing_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | default_gw: '192.168.127.251' 6 | static_routing: 7 | - dest: '192.168.0.0' 8 | mask: '255.255.255.0' 9 | gw: '192.168.127.252' 10 | - dest: '192.168.1.0' 11 | mask: '255.255.255.0' 12 | gw: '192.168.127.253' 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-default_gw-static_routing_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | NETWORK: 5 | default_gw: '192.168.127.251' 6 | static_routing: 7 | - dest: '192.168.0.0' 8 | mask: '255.255.255.0' 9 | gw: '192.168.127.252' 10 | - dest: '192.168.1.0' 11 | mask: '255.255.255.0' 12 | gw: '192.168.127.253' 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_02/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | password: 'p@ssw0rd' 8 | groups: 'Users' 9 | account_disabled: False 10 | user_cannot_change_password: False 11 | password_never_expires: False 12 | uac: 13 | level: 'lua_disabled' 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_02/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | password: 'p@ssw0rd' 8 | groups: 'Users' 9 | account_disabled: False 10 | user_cannot_change_password: False 11 | password_never_expires: False 12 | uac: 13 | level: 'lua_disabled' 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-sshd_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | ADVANCED: 5 | sshd: 6 | permit_root_login: False 7 | password_auth: False 8 | 192.168.127.41: 9 | connection_hostname: '192.168.127.41' 10 | operating_system: 'Linux' 11 | ADVANCED: 12 | sshd: 13 | permit_root_login: False 14 | password_auth: False 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | NETWORK: 6 | default_gw: 7 | addr: '192.168.127.254' 8 | if: 'eth0' 9 | 192.168.127.41: 10 | connection_hostname: '192.168.127.41' 11 | operating_system: 'Linux' 12 | BASE: 13 | NETWORK: 14 | default_gw: 15 | addr: '192.168.127.254' 16 | if: 'ens161' 17 | -------------------------------------------------------------------------------- /Ansible/tools/2-9901_PreDev/var.yml: -------------------------------------------------------------------------------- 1 | ### ANSIBLE SETTING ### 2 | remote_tmp_dir: 'C:\.shift' 3 | 4 | 5 | ### SERVERSPEC SETTING ### 6 | enable_spec_setting: true 7 | tool_list: 8 | - Windows8-RT-KB2842230-x64.msu 9 | - nvspbind.exe 10 | 11 | ### HOTFIX SETTING ### 12 | # windows2012用hotfix 13 | install_hotfix: true 14 | HOTFIX: 15 | ID: "2842230" 16 | FILE: "Windows8-RT-KB2842230-x64" 17 | -------------------------------------------------------------------------------- /Serverspec/spec/1-0001_Base/OSCORE/1-0001-025_RunLevel_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("025-runlevel") do 2 | begin 3 | runlevel = property[:BASE][:OSCORE][:runlevel] 4 | rescue NoMethodError 5 | runlevel = nil 6 | end 7 | 8 | describe ("現在のランレベルが#{runlevel}であること"), :if => runlevel != nil do 9 | describe command('runlevel') do #RHEL7系では推奨ではないが現状は互換性があるので大丈夫。 10 | its(:stdout) { should match /.\s#{ runlevel }/ } 11 | end 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_03/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | sed -i "/\[1-0105_openJDK/a 192.168.127.31 ansible_user=shift ansible_ssh_pass=p@ssw0rd" Shift_Env/Ansible.1.inventory 13 | 14 | Shift_Bin/Ansible-play.sh run 15 | result01=$? 16 | 17 | exit $result01 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_06/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | sed -i "/\[1-0105_openJDK/a 192.168.127.31 ansible_user=shift ansible_ssh_pass=p@ssw0rd" Shift_Env/Ansible.1.inventory 13 | 14 | Shift_Bin/Ansible-play.sh run 15 | result01=$? 16 | 17 | exit $result01 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_07/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | sed -i "/\[1-0105_openJDK/a 192.168.127.31 ansible_user=shift ansible_ssh_pass=p@ssw0rd" Shift_Env/Ansible.1.inventory 13 | 14 | Shift_Bin/Ansible-play.sh run 15 | result01=$? 16 | 17 | exit $result01 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | timezone: 'Tonga Standard Time' 6 | recover_os: 7 | display_os_list_time: 60 8 | write_eventlog: False 9 | auto_reboot: False 10 | dumpfile: 11 | type: 'minimum' 12 | path: 'C:\Windows\MEMORY2.DMP' 13 | overwrite: False 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | OSCORE: 5 | timezone: 'Tonga Standard Time' 6 | recover_os: 7 | display_os_list_time: 60 8 | write_eventlog: False 9 | auto_reboot: False 10 | dumpfile: 11 | type: 'minimum' 12 | path: 'C:\Windows\MEMORY2.DMP' 13 | overwrite: False 14 | 15 | -------------------------------------------------------------------------------- /Serverspec/spec/1-0001_Base/OSCORE/1-0001-026_Selinux_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("026-Selinux") do 2 | begin 3 | selinux_status = property[:BASE][:OSCORE][:selinux] 4 | rescue NoMethodError 5 | selinux_status = nil 6 | end 7 | 8 | describe ("SElinuxが#{selinux_status}であること"), :if => selinux_status != nil do 9 | 10 | matcher = "be_#{selinux_status}" 11 | 12 | describe selinux do 13 | it { should eval "#{matcher}"} 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | HW: 6 | memory: 7 | virtualmemory: 8 | type: 'none' 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | HW: 14 | memory: 15 | virtualmemory: 16 | type: 'none' 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ID_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | ID: 6 | password_policy: 7 | max_days: 10000 8 | min_days: 1 9 | 192.168.127.41: 10 | connection_hostname: '192.168.127.41' 11 | operating_system: 'Linux' 12 | BASE: 13 | ID: 14 | password_policy: 15 | max_days: 10000 16 | min_days: 1 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | HW: 6 | memory: 7 | virtualmemory: 8 | type: 'system' 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | HW: 14 | memory: 15 | virtualmemory: 16 | type: 'system' 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | timeserver: 6 | - server: '192.168.127.1' 7 | prefer: True 8 | ntp_packages: 9 | - name: 'ntp-4.2.6p5-1.el6.x86_64.rpm' 10 | - name: 'libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm' 11 | - name: 'ntpdate-4.2.6p5-1.el6.x86_64.rpm' 12 | ntp_option: 13 | slew: True 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | timeserver: 6 | - server: '192.168.127.1' 7 | prefer: True 8 | ntp_packages: 9 | - name: 'autogen-libopts-5.18-5.el7.x86_64.rpm' 10 | - name: 'ntp-4.2.6p5-19.el7_0.x86_64.rpm' 11 | - name: 'ntpdate-4.2.6p5-19.el7_0.x86_64.rpm' 12 | ntp_option: 13 | slew: True 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_02/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | timeserver: 6 | - server: '192.168.127.1' 7 | prefer: False 8 | ntp_packages: 9 | - name: 'ntp-4.2.6p5-1.el6.x86_64.rpm' 10 | - name: 'libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm' 11 | - name: 'ntpdate-4.2.6p5-1.el6.x86_64.rpm' 12 | ntp_option: 13 | slew: False 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_02/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | ADVANCED: 5 | timeserver: 6 | - server: '192.168.127.1' 7 | prefer: False 8 | ntp_packages: 9 | - name: 'autogen-libopts-5.18-5.el7.x86_64.rpm' 10 | - name: 'ntp-4.2.6p5-19.el7_0.x86_64.rpm' 11 | - name: 'ntpdate-4.2.6p5-19.el7_0.x86_64.rpm' 12 | ntp_option: 13 | slew: False 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Spec-play.sh run 19 | result03=$? 20 | 21 | exit $((result01 || result02 || result03)) 22 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-1301_ZabbixAgent_03/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Ansible-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Spec-play.sh run 19 | result03=$? 20 | 21 | exit $((result01 || result02 || result03)) 22 | -------------------------------------------------------------------------------- /Ansible/roles/1-0102_apache/tasks/1-0102-07_post_tasks.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - meta: flush_handlers 3 | 4 | - name: 1-0102-07_post_tasks - change httpd service state 5 | service: 6 | name: httpd 7 | state: "{{ apac_apache.state }}" 8 | when: apac_apache.state is defined 9 | 10 | - name: 1-0102-07_post_tasks - change auto_starting setting of httpd service 11 | service: 12 | name: httpd 13 | enabled: "{{ apac_apache.enabled }}" 14 | when: apac_apache.enabled is defined 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SHIFT ware 2 | 3 | SHIFT wareはITインフラ構築・運用・保守作業を自動化するためのフレームワークです。Infrastructure as Codeの各技術要素に対する知識がない方でも簡単に利用できることを目指して開発されています。 4 | 5 | まずは以下を参照して、SHIFT wareの世界を体感してください。 6 | * [Get Started](https://github.com/SHIFT-ware/shift_ware/wiki/Get-Started) 7 | 8 | SHIFT wareの概観を知りたい方はトップサイトをご覧になるのもよいかもしれません。 9 | * [トップサイト](https://shift-ware.github.io/ja/) 10 | 11 | SHIFT wareの詳細な使い方やその他の情報はWikiにまとめられています。 12 | * [Wiki](https://github.com/SHIFT-ware/shift_ware/wiki) 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-HW_01/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | HW: 6 | memory: 7 | virtualmemory: 8 | type: 'auto' 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | HW: 14 | memory: 15 | virtualmemory: 16 | type: 'auto' 17 | 18 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/tasks/1-0108-04_post_tasks.yml: -------------------------------------------------------------------------------- 1 | - meta: flush_handlers 2 | 3 | - name: 1-0108-04_post_tasks - change pgpool service state 4 | service: 5 | name: pgpool 6 | state: "{{ pgpl_pgpool.state }}" 7 | when: pgpl_pgpool.state is defined 8 | 9 | - name: 1-0108-04_post_tasks - change auto_starting setting of pgpool service 10 | service: 11 | name: pgpool 12 | enabled: "{{ pgpl_pgpool.enabled }}" 13 | when: pgpl_pgpool.enabled is defined 14 | 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-HW_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | HW: 6 | cpu_core_sum: 4 7 | cpu_hyper_thread: True 8 | mem_size: 3922432 9 | 192.168.127.41: 10 | connection_hostname: '192.168.127.41' 11 | operating_system: 'Linux' 12 | BASE: 13 | HW: 14 | cpu_core_sum: 4 15 | cpu_hyper_thread: True 16 | mem_size: 4048000 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | password: 'p@ssw0rd' 8 | groups: 'Testgroup' 9 | account_disabled: False 10 | user_cannot_change_password: True 11 | password_never_expires: True 12 | group: 13 | - name: 'Testgroup' 14 | uac: 15 | level: 'low' 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | ID: 5 | user: 6 | - name: 'testuser' 7 | password: 'p@ssw0rd' 8 | groups: 'Testgroup' 9 | account_disabled: False 10 | user_cannot_change_password: True 11 | password_never_expires: True 12 | group: 13 | - name: 'Testgroup' 14 | uac: 15 | level: 'low' 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | 12 | # これより下にSHIFT実行部分を記述 13 | Shift_Bin/Spec-play.sh run 14 | result01=$? 15 | 16 | Shift_Bin/Ansible-play.sh run 17 | result02=$? 18 | 19 | Shift_Bin/Spec-play.sh run 20 | result03=$? 21 | 22 | exit $((result01 || result02 || result03)) 23 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ADVANCED: 6 | service: 7 | - name: 'UmRdpService' 8 | state: False 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | ADVANCED: 14 | service: 15 | - name: 'UmRdpService' 16 | state: False 17 | 18 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/Advanced/2-0001-101_Hotfix_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("101_Hotfix")do 2 | begin 3 | hotfixes = Array(property[:ADVANCED][:hotfix]) 4 | rescue 5 | hotfixes = [] 6 | end 7 | 8 | describe command("(Get-Hotfix).HotfixID") do 9 | hotfixes.each do |hotfix| 10 | describe ("Hotfix[#{ hotfix[:id] }] がインストールされていること"), :if => hotfix[:id] != nil do 11 | its(:stdout) { should match /(\A|\R)#{ hotfix[:id] }(\R|\Z)/ } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Serverspec/spec/1-0106_PrivateCA/1-0106-06_HashAlgorithm_spec.rb: -------------------------------------------------------------------------------- 1 | install_path = property[:PrivateCA][:install_path] 2 | ca_cert = property[:PrivateCA][:ca_cert] 3 | pem_file = "#{ install_path }/#{ ca_cert[:pem_filename] }" 4 | hash_algorithm = ca_cert[:hash_algorithm] 5 | 6 | describe ("1-0106-06_HashAlgorithm") do 7 | describe ("check hash algorithm") do 8 | describe ("openssl x509 -in #{ pem_file } -noout -text | grep \"Signature Algorithm: #{ hash_algorithm }WithRSAEncryption\"") 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_service_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ADVANCED: 6 | service: 7 | - name: 'DHCP Client' 8 | start_mode: 'Manual' 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | ADVANCED: 14 | service: 15 | - name: 'DHCP Client' 16 | start_mode: 'Manual' 17 | 18 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/Network/2-0001-071_Hostname_spec.rb: -------------------------------------------------------------------------------- 1 | if property[:NETWORK] != nil then 2 | if property[:NETWORK][:hostname] != nil then 3 | 4 | describe ("071-Hostname") do 5 | 6 | h=property[:NETWORK][:hostname].upcase 7 | 8 | describe ("コンピュータ名が #{ h } であること"), :if => h != nil do 9 | describe command("Write-Host -NoNewline (hostname).ToUpper()") do 10 | its(:stdout) { should eq "#{ h }" } 11 | end 12 | end 13 | 14 | end 15 | 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/OSCORE/2-0001-021_SystemInfo_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("021-SystemInfo") do 2 | begin 3 | os_name = property[:BASE][:OSCORE][:systeminfo][:os_name] 4 | rescue 5 | os_name = nil 6 | end 7 | 8 | next if os_name == nil 9 | 10 | describe ("OSのキャプション(OSバージョン・ライセンス)が#{ os_name }であること") do 11 | describe command("Write-Host -NoNewLine ((Get-WmiObject -Class Win32_OperatingSystem).Caption)") do 12 | its(:stdout) { should match /#{ os_name }/ } 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_01/host_vars/192.168.127.31.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.31' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target31' 6 | interface: 7 | - name: 'eth1' 8 | ip_addr: '10.10.10.10/24' 9 | bonding_interface: 10 | - name: 'bond0' 11 | member_interface: 12 | - name: 'eth2' 13 | - name: 'eth3' 14 | static_routing: 15 | - dest: '10.10.11.0/24' 16 | if: 'eth1' 17 | gw: '10.10.10.254' 18 | 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_01/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-10_Selinux.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-14_Lang.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-27_Kdump.yml 4 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-28_Keyboard.yml 5 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-29_Timezone.yml 6 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-37_SystemRunLevel.yml 7 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-40_Grub.yml 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_02/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-10_Selinux.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-14_Lang.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-27_Kdump.yml 4 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-28_Keyboard.yml 5 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-29_Timezone.yml 6 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-37_SystemRunLevel.yml 7 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-40_Grub.yml 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_03/role_list: -------------------------------------------------------------------------------- 1 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-10_Selinux.yml 2 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-14_Lang.yml 3 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-27_Kdump.yml 4 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-28_Keyboard.yml 5 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-29_Timezone.yml 6 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-37_SystemRunLevel.yml 7 | Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-40_Grub.yml 8 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-ADVANCED_product_hotfix_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ADVANCED: 6 | product: 7 | - name: 'Test' 8 | hotfix: 9 | - id: 'KB' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | ADVANCED: 15 | product: 16 | - name: 'Test' 17 | hotfix: 18 | - id: 'KB' 19 | 20 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_ID_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | ID: 6 | group: 7 | - name: 'Testgroup' 8 | uac: 9 | level: 'disabled' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | ID: 15 | group: 16 | - name: 'Testgroup' 17 | uac: 18 | level: 'disabled' 19 | 20 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-NETWORK_01/host_vars/192.168.127.41.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.41' 2 | remote_tmp_dir: '~root/.shift' 3 | BASE: 4 | NETWORK: 5 | hostname: 'target41' 6 | interface: 7 | - name: 'ens192' 8 | ip_addr: '10.10.10.11/24' 9 | bonding_interface: 10 | - name: 'bond0' 11 | member_interface: 12 | - name: 'ens193' 13 | - name: 'ens224' 14 | static_routing: 15 | - dest: '10.10.11.0/24' 16 | if: 'ens192' 17 | gw: '10.10.10.254' 18 | 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | STORAGE: 6 | disk: 7 | - number: 0 8 | partition: 9 | - drive_letter: 'C' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | STORAGE: 15 | disk: 16 | - number: 0 17 | partition: 18 | - drive_letter: 'C' 19 | 20 | -------------------------------------------------------------------------------- /Ansible/roles/1-0103_Tomcat/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: check_tomcat_service_exists 3 | shell: chkconfig --list tomcat 4 | changed_when: false 5 | failed_when: false 6 | register: check_tomcat_service 7 | 8 | - name: restart_tomcat_service 9 | service: 10 | name: tomcat 11 | state: restarted 12 | when: check_tomcat_service.rc == 0 13 | 14 | - name: restart_tomcat_process 15 | shell: cd {{ tomc_tomcat.install_dir }}/bin && ./shutdown.sh && nohup ./startup.sh 16 | when: check_tomcat_service.rc != 0 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-name_resolve_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | OSCORE: 6 | version: '6.5' 7 | ADVANCED: 8 | name_resolve: 9 | pri_name_resolve: 'files' 10 | 192.168.127.41: 11 | connection_hostname: '192.168.127.41' 12 | operating_system: 'Linux' 13 | BASE: 14 | OSCORE: 15 | version: '7.1' 16 | ADVANCED: 17 | name_resolve: 18 | pri_name_resolve: 'files' 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-dns_suffix_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | NETWORK: 6 | dns_suffix: 7 | primary: 8 | change_when_domain_membership_changed: False 9 | 192.168.127.151: 10 | connection_hostname: '192.168.127.151' 11 | operating_system: 'Windows' 12 | BASE: 13 | NETWORK: 14 | dns_suffix: 15 | primary: 16 | change_when_domain_membership_changed: False 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | cp -rf Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_01/test_case02/properties.yml ./Shift_Env/ 16 | 17 | Shift_Bin/Spec-play.sh run 18 | result02=$? 19 | 20 | 21 | exit $((result01 || result02 )) 22 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | cp -rf Shift_Env/tests/2-0001_Base-STORAGE-disk-cdrom_02/test_case02/properties.yml ./Shift_Env/ 16 | 17 | Shift_Bin/Spec-play.sh run 18 | result02=$? 19 | 20 | 21 | exit $((result01 || result02 )) 22 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-logrotate_01/test_case03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | ADVANCED: 6 | logrotate_files: 7 | - path: '/var/log/wtmp2' 8 | - path: '/var/log/btmp2' 9 | 192.168.127.41: 10 | connection_hostname: '192.168.127.41' 11 | operating_system: 'Linux' 12 | BASE: 13 | ADVANCED: 14 | logrotate_files: 15 | - path: '/var/log/wtmp2' 16 | - path: '/var/log/btmp2' 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Spec-play.sh run 13 | result01=$? 14 | 15 | cp -rf Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/test_case02/properties.yml ./Shift_Env/ 16 | 17 | Shift_Bin/Spec-play.sh run 18 | result02=$? 19 | 20 | exit $((result01 || result02 )) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0108_Pgpool-II_test_04/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | Shift_Bin/Spec-play.sh run 15 | result02=$? 16 | 17 | Shift_Bin/Ansible-play.sh run 18 | result03=$? 19 | Shift_Bin/Spec-play.sh run 20 | result04=$? 21 | 22 | exit $((result01 || result02 || result03 || result04)) 23 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0102_apache_05/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Ansible-play.sh run 19 | result03=$? 20 | 21 | Shift_Bin/Spec-play.sh run 22 | result04=$? 23 | 24 | exit $((result01 || result02 || result03 || result04)) 25 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0106_PrivateCA_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Ansible-play.sh run 19 | result03=$? 20 | 21 | Shift_Bin/Spec-play.sh run 22 | result04=$? 23 | 24 | exit $((result01 || result02 || result03 || result04)) 25 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/Advanced/2-0001-100_Product_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("100_Product") do 2 | begin 3 | products = Array(property[:ADVANCED][:product]) 4 | rescue 5 | products = [] 6 | end 7 | 8 | describe command("(Get-WmiObject -Class Win32_Product).Name") do 9 | products.each do |product| 10 | describe ("製品[#{ product[:name] }] がインストールされていること"), :if => product[:name] != nil do 11 | its(:stdout) { should match /(\A|\R)#{Regexp.escape(product[:name])}\s*(\A|\R)/ } 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0104_postgreSQL_05/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Ansible-play.sh run 19 | result03=$? 20 | 21 | Shift_Bin/Spec-play.sh run 22 | result04=$? 23 | 24 | exit $((result01 || result02 || result03 || result04)) 25 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Ansible-play.sh run 19 | result03=$? 20 | 21 | Shift_Bin/Spec-play.sh run 22 | result04=$? 23 | 24 | exit $((result01 || result02 || result03 || result04)) 25 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0105_openJDK_03_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | Shift_Bin/Ansible-play.sh run 13 | result01=$? 14 | 15 | Shift_Bin/Spec-play.sh run 16 | result02=$? 17 | 18 | Shift_Bin/Ansible-play.sh run 19 | result03=$? 20 | 21 | Shift_Bin/Spec-play.sh run 22 | result04=$? 23 | 24 | exit $((result01 || result02 || result03 || result04)) 25 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base_OSCORE_03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | OSCORE: 6 | recover_os: 7 | dumpfile: 8 | type: 'kernel' 9 | overwrite: False 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | OSCORE: 15 | recover_os: 16 | dumpfile: 17 | type: 'kernel' 18 | overwrite: False 19 | 20 | -------------------------------------------------------------------------------- /Ansible/plugins/plugin.py: -------------------------------------------------------------------------------- 1 | def has_nested_keys(nested_dict, *keys): 2 | from jinja2.runtime import Undefined 3 | if isinstance(nested_dict, Undefined): 4 | return False 5 | 6 | for key in keys: 7 | if not isinstance(nested_dict, dict): 8 | return False 9 | nested_dict = nested_dict.get(key, {}) 10 | return True if nested_dict != {} else False 11 | 12 | 13 | class FilterModule(object): 14 | def filters(self): 15 | return { 16 | 'has_nested_keys': has_nested_keys 17 | } 18 | -------------------------------------------------------------------------------- /Ansible/roles/2-0001_Base/tasks/2-0001-012_UserGroup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 2-0001-012_UserGroup - define empty tmp variable 3 | set_fact: 4 | group: [] 5 | when: not base_BASE | has_nested_keys('ID', 'group') 6 | 7 | - name: 2-0001-012_UserGroup - set tmp variable 8 | set_fact: 9 | group: "{{ base_BASE.ID.group }}" 10 | when: base_BASE | has_nested_keys('ID', 'group') 11 | 12 | - name: 2-0001-012_UserGroup - modify group 13 | win_group: 14 | name: "{{ item.name }}" 15 | state: present 16 | with_items: "{{ group }}" 17 | 18 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | ADVANCED: 6 | packages: 7 | - name: 'openssh' 8 | - name: 'openssl' 9 | version: '1.0.1e-15.el6.x86_64' 10 | 192.168.127.41: 11 | connection_hostname: '192.168.127.41' 12 | operating_system: 'Linux' 13 | BASE: 14 | ADVANCED: 15 | packages: 16 | - name: 'openssh' 17 | - name: 'openssl' 18 | version: '1.0.1e-42.el7.x86_64' 19 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_01/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | sed -i "/\[1-0105_openJDK/a 192.168.127.31 ansible_user=shift ansible_ssh_pass=p@ssw0rd" Shift_Env/Ansible.1.inventory 13 | 14 | Shift_Bin/Ansible-play.sh run 15 | result01=$? 16 | 17 | sleep 30 18 | 19 | Shift_Bin/Spec-play.sh run 20 | result02=$? 21 | 22 | exit $((result01 || result02)) 23 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0103_Tomcat_02/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd ${WORKSPACE}/shift 4 | 5 | PATH=$PATH:$HOME/bin 6 | 7 | export PATH 8 | source ~/Ansible/hacking/env-setup 9 | export PATH=$PATH:$HOME/.rbenv/bin:$HOME/.rbenv/shims 10 | 11 | # これより下にSHIFT実行部分を記述 12 | sed -i "/\[1-0105_openJDK/a 192.168.127.31 ansible_user=shift ansible_ssh_pass=p@ssw0rd" Shift_Env/Ansible.1.inventory 13 | 14 | Shift_Bin/Ansible-play.sh run 15 | result01=$? 16 | 17 | sleep 30 18 | 19 | Shift_Bin/Spec-play.sh run 20 | result02=$? 21 | 22 | exit $((result01 || result02)) 23 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_01/host_vars/192.168.127.141.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.141' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: 'C:\temp' 7 | owner: 'BUILTIN\Administrators' 8 | acl: 9 | - user: 'BUILTIN\Users' 10 | rights: 'Read, Synchronize' 11 | type: 'Allow' 12 | inherit: 'thisfolder, subfolder, file' 13 | - user: 'Guest' 14 | rights: 'FullControl' 15 | type: 'Allow' 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-STORAGE-directory_01/host_vars/192.168.127.151.yml: -------------------------------------------------------------------------------- 1 | connection_hostname: '192.168.127.151' 2 | remote_tmp_dir: 'C:\.shift' 3 | BASE: 4 | STORAGE: 5 | directory: 6 | - path: 'C:\temp' 7 | owner: 'BUILTIN\Administrators' 8 | acl: 9 | - user: 'BUILTIN\Users' 10 | rights: 'Read, Synchronize' 11 | type: 'Allow' 12 | inherit: 'thisfolder, subfolder, file' 13 | - user: 'Guest' 14 | rights: 'FullControl' 15 | type: 'Allow' 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-OSCORE_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | OSCORE: 6 | time: 7 | utc: False 8 | kdump: 9 | path: '/var/crash' 10 | service_state: 'stop' 11 | 192.168.127.41: 12 | connection_hostname: '192.168.127.41' 13 | operating_system: 'Linux' 14 | BASE: 15 | OSCORE: 16 | time: 17 | utc: False 18 | kdump: 19 | path: '/var/crash' 20 | service_state: 'stop' 21 | 22 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/templates/resolv.conf.j2: -------------------------------------------------------------------------------- 1 | {% if base_advanced.name_resolve.name_server is defined %} 2 | {% for server in (base_advanced.name_resolve.name_server | selectattr('server', 'defined') | map(attribute='server') | list | join(',')).split(',') %} 3 | nameserver {{ server }} 4 | {% endfor %} 5 | {% endif %} 6 | 7 | {% if base_advanced.name_resolve.dns_suffix is defined %} 8 | search {{ base_advanced.name_resolve.dns_suffix | selectattr('suffix', 'defined') | map(attribute='suffix') | list | join(' ') | regex_replace(',',' ')}} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /Ansible/tools/1-9901_PreDev/1-9901-08_SshConfig.yml: -------------------------------------------------------------------------------- 1 | - name: sshd_config 2 | lineinfile: > 3 | dest='/etc/ssh/sshd_config' 4 | regexp={{ item.regexp }} 5 | line={{ item.line }} 6 | state=present 7 | notify: 8 | - sshd_service_restart 9 | with_items: 10 | - regexp: '^#?\s*RSAAuthentication\s' 11 | line: 'RSAAuthentication yes' 12 | - regexp: '^#?\s*PubkeyAuthentication\s' 13 | line: 'PubkeyAuthentication yes' 14 | - regexp: '^#?\s*AuthorizedKeysFile\s' 15 | line: 'AuthorizedKeysFile .ssh/authorized_keys' 16 | -------------------------------------------------------------------------------- /Ansible/tools/1-9902_PostDev/1-9902-08_SshConfig.yml: -------------------------------------------------------------------------------- 1 | - name: sshd_config 2 | lineinfile: > 3 | dest='/etc/ssh/sshd_config' 4 | regexp={{ item.regexp }} 5 | line={{ item.line }} 6 | state=present 7 | register: ret_1_9902_08_SshConfig 8 | with_items: 9 | - regexp: '^#?\s*RSAAuthentication\s' 10 | line: '#RSAAuthentication yes' 11 | - regexp: '^#?\s*PubkeyAuthentication\s' 12 | line: '#PubkeyAuthentication yes' 13 | - regexp: '^#?\s*AuthorizedKeysFile\s' 14 | line: '#AuthorizedKeysFile .ssh/authorized_keys' 15 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | NETWORK: 6 | hostname: 'target30' 7 | domain: 8 | type: 'workgroup' 9 | name: 'TESTWORKGROUP' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | NETWORK: 15 | hostname: 'target40' 16 | domain: 17 | type: 'workgroup' 18 | name: 'TESTWORKGROUP' 19 | 20 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | NETWORK: 6 | hostname: 'target300' 7 | domain: 8 | type: 'domain' 9 | name: 'test.test' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | NETWORK: 15 | hostname: 'target400' 16 | domain: 17 | type: 'domain' 18 | name: 'test.test' 19 | 20 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/Advanced/2-0001-107_PsExecPolicy_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("107_PsExecPolicy")do 2 | 3 | begin 4 | psexecpolicy = property[:ADVANCED][:psexecpolicy] 5 | rescue 6 | psexecpolicy = nil 7 | end 8 | 9 | describe ("Powershellの実行ポリシー") do 10 | describe ("が LocalMachine スコープにおいて #{ psexecpolicy } であること"), :if => psexecpolicy != nil do 11 | describe command('Write-Host -NoNewLine (Get-ExecutionPolicy -Scope LocalMachine)') do 12 | its(:stdout) { should eq "#{ psexecpolicy }" } 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-packages_01/test_case02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | ADVANCED: 6 | packages: 7 | - name: 'opensshng' 8 | - name: 'openssl' 9 | version: '1.0.1e-42.el7.x86_64' 10 | 192.168.127.41: 11 | connection_hostname: '192.168.127.41' 12 | operating_system: 'Linux' 13 | BASE: 14 | ADVANCED: 15 | packages: 16 | - name: 'opensshng' 17 | - name: 'openssl' 18 | version: '1.0.1e-15.el6.x86_64' 19 | 20 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Base/OSCORE/1-0001-14_Lang.yml: -------------------------------------------------------------------------------- 1 | - name: 1-0001-14_Lang - change environment "LANG" for rhel6 2 | lineinfile: 3 | dest: /etc/sysconfig/i18n 4 | regexp: '^LANG' 5 | line: "LANG=\"{{ base_base.OSCORE.lang }}\"" 6 | when: 7 | - ansible_distribution_major_version == "6" 8 | 9 | - name: 1-0001-14_Lang - change environment "LANG" for rhel7 10 | lineinfile: 11 | dest: /etc/locale.conf 12 | regexp: '^LANG' 13 | line: "LANG=\"{{ base_base.OSCORE.lang }}\"" 14 | when: 15 | - ansible_distribution_major_version == "7" 16 | -------------------------------------------------------------------------------- /Serverspec/spec/2-0001_Base/Advanced/2-0001-095_Feature_spec.rb: -------------------------------------------------------------------------------- 1 | describe ("095_Feature") do 2 | begin 3 | features = Array(property[:ADVANCED][:feature]) 4 | rescue 5 | features = [] 6 | end 7 | 8 | describe command("(Get-WindowsFeature | Where-Object {$_.Installed -eq $True}).Path") do 9 | features.each do |feature| 10 | describe ("役割と機能[#{ feature[:name] }] がインストールされていること"), :if => feature[:name] != nil do 11 | its(:stdout) { should match /(\A|\R)#{Regexp.escape(feature[:name])}(\R|\Z)/ } 12 | end 13 | end 14 | end 15 | end 16 | 17 | -------------------------------------------------------------------------------- /Shift_Env/tests/1-0001_Base-ADVANCED-timeserver_02/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.31: 2 | connection_hostname: '192.168.127.31' 3 | operating_system: 'Linux' 4 | BASE: 5 | ADVANCED: 6 | timeserver: 7 | - server: '192.168.127.1' 8 | prefer: False 9 | ntp_option: 10 | slew: False 11 | 192.168.127.41: 12 | connection_hostname: '192.168.127.41' 13 | operating_system: 'Linux' 14 | BASE: 15 | ADVANCED: 16 | timeserver: 17 | - server: '192.168.127.1' 18 | prefer: False 19 | ntp_option: 20 | slew: False 21 | 22 | -------------------------------------------------------------------------------- /Ansible/roles/1-0001_Base/tasks/Base/ID/1-0001-24_OSUser.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 1-0001-24_OSUser - modify user 3 | user: 4 | name: '{{ item.name }}' 5 | password: '{{ item.password | password_hash("sha512","salt") if "password" in item else "!!" }}' 6 | uid: '{{ item.uid | default(omit) }}' 7 | group: '{{ item.group | default(omit) }}' 8 | groups: '{{ item.sub_groups | default(omit) }}' 9 | home: '{{ item.home_dir | default(omit)}}' 10 | shell: '{{ item.shell | default(omit) }}' 11 | state: 'present' 12 | with_items: "{{ base_base.ID.user }}" 13 | 14 | -------------------------------------------------------------------------------- /Shift_Env/tests/2-0001_Base-NETWORK-hostname-domain_01/test_case03/properties.yml: -------------------------------------------------------------------------------- 1 | 192.168.127.141: 2 | connection_hostname: '192.168.127.141' 3 | operating_system: 'Windows' 4 | BASE: 5 | NETWORK: 6 | hostname: 'target3000' 7 | domain: 8 | type: 'workgroup' 9 | name: 'TESTWORKGROUP' 10 | 192.168.127.151: 11 | connection_hostname: '192.168.127.151' 12 | operating_system: 'Windows' 13 | BASE: 14 | NETWORK: 15 | hostname: 'target4000' 16 | domain: 17 | type: 'workgroup' 18 | name: 'TESTWORKGROUP' 19 | 20 | -------------------------------------------------------------------------------- /Ansible/roles/1-0104_postgreSQL/tasks/1-0104-05_post_tasks.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - meta: flush_handlers 3 | 4 | - name: 1-0104-05_post_tasks - change postgresql service state 5 | service: 6 | name: "postgresql-{{ pgsq_postgresql.version }}" 7 | state: "{{ pgsq_postgresql.state }}" 8 | when: pgsq_postgresql.state is defined 9 | 10 | - name: 1-0104-05_post_tasks - change auto starting setting of postgresql service 11 | service: 12 | name: "postgresql-{{ pgsq_postgresql.version }}" 13 | enabled: "{{ pgsq_postgresql.enabled }}" 14 | when: pgsq_postgresql.enabled is defined 15 | 16 | -------------------------------------------------------------------------------- /Ansible/roles/1-0108_Pgpool-II/tasks/config_pool_passwd.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: config_pool_passwd - touch pool_passwd 3 | shell: touch /etc/pgpool-II/pool_passwd 4 | args: 5 | creates: /etc/pgpool-II/pool_passwd 6 | 7 | - name: config_pool_passwd - create string to generate pool_passwd entry 8 | set_fact: 9 | md5_str: "{{ item.password }}{{ item.name }}" 10 | 11 | - name: config_pool_passwd - configure pool_passwd 12 | lineinfile: 13 | dest: /etc/pgpool-II/pool_passwd 14 | line: "{{ item.name }}:md5{{ md5_str | hash('md5') }}" 15 | notify: pgpool_service_restart 16 | 17 | --------------------------------------------------------------------------------