Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

[devops@work-vm devops-lab]$ ansible web -m user -a "name=bloter password=1qazxsw23edC"

Code Block
linenumberstrue
[WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

web01-vm | CHANGED => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": true,
    "comment": "",
    "create_home": true,
    "group": 1001,
    "home": "/home/bloter",
    "name": "bloter",
    "password": "NOT_LOGGING_PASSWORD",
    "shell": "/bin/bash",
    "state": "present",
    "system": false,
    "uid": 1001
}
web02-vm | CHANGED => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": true,
    "comment": "",
    "create_home": true,
    "group": 1001,
    "home": "/home/bloter",
    "name": "bloter",
    "password": "NOT_LOGGING_PASSWORD",
    "shell": "/bin/bash",
    "state": "present",
    "system": false,
    "uid": 1001
}
web03-vm | CHANGED => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": true,
    "comment": "",
    "create_home": true,
    "group": 1001,
    "home": "/home/bloter",
    "name": "bloter",
    "password": "NOT_LOGGING_PASSWORD",
    "shell": "/bin/bash",
    "state": "present",
    "system": false,
    "uid": 1001
}


Code Block
[devops@work-vm devops-lab]$ ansible web -m shell -a "cat /etc/passwd | grep bloter"
web01-vm | CHANGED | rc=0 >>
bloter:x:1001:1001::/home/bloter:/bin/bash

web02-vm | CHANGED | rc=0 >>
bloter:x:1001:1001::/home/bloter:/bin/bash

web03-vm | CHANGED | rc=0 >>
bloter:x:1001:1001::/home/bloter:/bin/bash


특정PORT Listen확인

Info

[devops@work-vm devops-lab]$ ansible web -m shell -a "netstat -nltp | grep httpd"

Code Block
web01-vm | CHANGED | rc=0 >>
tcp6       0      0 :::80                   :::*                    LISTEN      69884/httpd

web03-vm | CHANGED | rc=0 >>
tcp6       0      0 :::80                   :::*                    LISTEN      68690/httpd

web02-vm | CHANGED | rc=0 >>
tcp6       0      0 :::80                   :::*                    LISTEN      70096/httpd