전체 글222 [ansible] 앤서블 windows 계정 현황 playbook 개요 ansible을 통해 윈도우즈 계정 현황을 파악할 수있다. 세부내용 gathering_facts를 통해 서버정보 수집 내역을 통해 윈도우 OS별 계정현황을 확인할 수 있다. 주석처리해놓은 name이 printos를 통해 서버 os 정보를 확인할 수 잇음 아래는 windows 2012와 window 2012가 아닌 버전으로 나눠 놨는데 2012는 powershell을 통한 계정확인이 불가능하다. 그래서 cmd를 통한 확인방법과 powershell을 통한 확인 방법을 나눠서 만들어봣다. when 구문에서 "문자" in ansible_distribution 은 문자를 포함 하면 참 ansible_distribution in ["문자1","문자2"]은 문자1이거나 문자2이면 참 --- - name: pri.. 2023. 2. 14. [ansilbe] basic: the specified credentials were rejected by the server 개요 - 앤서블 ansible 플레이븍 실행시 basic: the specified credentials were rejected by the server 에러에 대한 에러를 처리할 수 있다. fatal: [test-seo]: UNREACHABLE! => {"changed": false, "msg": "basic: the specified credentials were rejected by the server", "unreachable": true} 해결방법 - playbook내에 아래 옵션을 추가한다. no_log: false 2023. 2. 13. [ansible] 앤서블 병렬 실행 옵션 개요 - ansible로 실행대상 서버에게 yml 플레이북을 병렬 실행 할 수있다. - 쉘스크립트와 다르게 병렬처리가 가능하다고 하는데 블로그나 강의 영상 어디에서도 정작 어떻게 병렬처리를 하는지 안알려준다(어쩌라는건지... 핵심을 왜 안알려주는겨..) 사용방법 옵션 -f 숫자 : 동시에 yml파일을 실행할 갯수를 뜻한다. 최대갯수는 컴퓨터 사양이나 네트워크 환경에 따라 다르다고 하고 테스트해본 결과 옵션이 아예 없는 것과 있는 것(-f 15)의 실행속도 차이는 가 있었다 서버의 경우 -f 15와 -f 30의 실행완료시간 차이는 크게 차이나지 않았다. 아래 명령어는 15개를 병렬(동시에)로 처리하는 명령어다 ansible-playbook /data/ansible/$job -i /data/ansible/h.. 2023. 2. 12. [redis] rocky8 redis 7.0 설치 개요 rocky8 redis 7.0 설치 방법 세부내용 - rocky8에서 테스트및 구글링 결과 yum으로 딱히 설치할 수 없었다. - 결론은 소스설치 해야한다 - 직접 테스트해본 결과임 ## 다운로드 및 설치 wget https://download.redis.io/releases/redis-7.0.8.tar.gz tar -xvzf redis-7.0.8.tar.gz cd redis-7.0.8 make make install ## /usr/lib/systemd/system/redis.service 에 아래 내역 추가 및 저장 [Unit] Description=Redis In-Memory Data Store After=network.target [Service] User=redis Group=redis Ex.. 2023. 2. 11. [redis] redis DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user. 개요 - 서버:6379 포트로 telnet 통신은 되지만 접근시 아래와 같은 에러 출력 DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CO.. 2023. 2. 10. [ansible] Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in 개요 - ansible playbook 실행시 아래와 같은 오류를 해결할 수 있다. UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p .. 2023. 2. 9. [ansible] Failed to connect to the host via ssh: ssh_exchange_identification: read: Connection reset by peer 개요 - 에러내용 처리 UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh_exchange_identification: read: Connection reset by peer", "unreachable": true} 실제 ansible서버에서 해당 목적지로 ssh 계정명@서버아이피로 접근 시 아래와 같은 에러발생 ssh_exchange_identification: read: Connection reset by peer 해결방법 - /etc/hsots.allow에 아래 코드 입력 sshd: 10.10.10.10 ##ansible서버 아이피 2023. 2. 8. [mysql] lower_case_table_names 테이블 이름 대소문자 개요 - mysql my.cnf 설정에서 테이블 이름이 어떤식으로 저장되는지에 대한 설정에 대한 정의 세부내용 설정방법 - my.cnf에 아래 코드 입력후 서비스 재시작 [mysqld] lower_case_table_names = 0 lower_case_table_names 설정은 MySQL 서버의 테이블 이름에 대한 대소문자 구분 방식을 정의하는 설정 lower_case_table_names = 0: 테이블 이름에 대한 대소문자 구분이 유지되며, 테이블 이름을 지정할 때 입력한 그대로 저장됨 lower_case_table_names = 1: 테이블 이름이 저장될 때 모두 소문자로 변환 lower_case_table_names = 2: 테이블 이름이 저장될 때 모두 대문자로 변환 만약 lower_case.. 2023. 2. 7. [jenkins] 젠킨스 job 권한 제어 개요 - 계정별 JOB 권한을 제어할 수 있다. 설정방법 jenkins 관리 > Configure Global Security > Authorization에서 Role-bales Strategy를 선택해야는데 없다. 플러그인 > Role-based Authoriztion Strategy 설치 젠킨스 관리 > configure global security > authoriztion에서 Role-based Strategy 선택 후 저장 젠킨스관리 > manage and Assighn Roles 선택 > Manage Roles 선택 Global roles > Role to add 를 통해 Role(그룹)을 추가 후 overall에 Read 권한을 추가한다. 추가하지 않으면 프로젝트 자체를 볼수 없다.(필수) .. 2023. 2. 2. [jenkins] 젠킨스 job 대시보드(panel)에 javascrip iframe 추가 formatter html 개요 - 젠킨스 job panel에 iframe을 추가할 수 있다. - job 설명쪽에 html 소스 코드를 넣을 수 있지만 자바스크립트나 와부 페이지 불러오기등은 동작 못하게 되어있음 방법 - 플러그인 설치 : anything-goes-formatter 젠킨스관리 > Configure Global Security 클릭 > Markup Formatter 에서 allows arbitary HTML including javascript(UNSAFE) 지정(플러그인 설치를 하면 보임) job 설명에 iframe 소스코드를 입력 도출 결과 젠킨스 job 설명 javascript 추가 jenkins job javascript jenkins job panel 젠킨스 formatter javascript 2023. 1. 18. 이전 1 ··· 7 8 9 10 11 12 13 ··· 23 다음 반응형