Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot deploy playbooks using ansible on a Mac #1115

Open
dmaasland opened this issue Nov 8, 2023 · 2 comments
Open

Cannot deploy playbooks using ansible on a Mac #1115

dmaasland opened this issue Nov 8, 2023 · 2 comments
Labels
level/task Subtask issue reporter/community Issue reported by the community type/bug

Comments

@dmaasland
Copy link

Hello,

It seems that deploying of playbooks does not work when running Ansible on a Mac. Something weird happens during the certificate generation where node certificates aren't created. I've narrowed this down to the Mac version of awk not playing nice with the commands in the wazuh-certs-generator.sh script. It'll give warnings like this when run manually:

awk: syntax error at source line 7
 context is
        , >>>  indent+) <<<  "  ";
awk: illegal statement at source line 7
awk: illegal statement at source line 7
sed: 2: "s|^[[:space:]]*#.*||;s| ...": undefined label '1;t;:1;s|^[[:space:]]*$||;t2;p;:2;d'
sed: 2: "s|^\([[:space:]]*\)-[[: ...": unused label '1;s|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(&[a-zA-Z0-9_]*\)\?[[:space:]]*\[[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\(.*\)[[:space:]]*\]|\1\2: \3[\4]\n\1  - \5|;t1'
sed: 2: "s|^\([[:space:]]*\)-[[: ...": unused label '2;s|^\([[:space:]]*\)-[[:space:]]*\[[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\(.*\)[[:space:]]*\]|\1- [\2]\n\1  - \3|;t2'
sed: 2: "s|^\([[:space:]]*\)\([a ...": unused label '1;s|^\([[:space:]]*\)-[[:space:]]*{[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(.*\)[[:space:]]*}|\1- {\2}\n\1  \3: \4|;t1'
sed: 2: "s|^\([[:space:]]*\)\([a ...": unused label '2;s|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(&[a-zA-Z0-9_]*\)\?[[:space:]]*{[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(.*\)[[:space:]]*}|\1\2: \3 {\4}\n\1  \5: \6|;t2'
awk: syntax error at source line 7
 context is
        , >>>  indent+) <<<  "  ";
awk: illegal statement at source line 7
awk: illegal statement at source line 7
sed: 2: "s|^[[:space:]]*#.*||;s| ...": undefined label '1;t;:1;s|^[[:space:]]*$||;t2;p;:2;d'
sed: 2: "s|^\([[:space:]]*\)-[[: ...": unused label '1;s|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(&[a-zA-Z0-9_]*\)\?[[:space:]]*\[[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\(.*\)[[:space:]]*\]|\1\2: \3[\4]\n\1  - \5|;t1'
sed: 2: "s|^\([[:space:]]*\)-[[: ...": unused label '2;s|^\([[:space:]]*\)-[[:space:]]*\[[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\(.*\)[[:space:]]*\]|\1- [\2]\n\1  - \3|;t2'
sed: 2: "s|^\([[:space:]]*\)\([a ...": unused label '1;s|^\([[:space:]]*\)-[[:space:]]*{[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(.*\)[[:space:]]*}|\1- {\2}\n\1  \3: \4|;t1'
sed: 2: "s|^\([[:space:]]*\)\([a ...": unused label '2;s|^\([[:space:]]*\)\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(&[a-zA-Z0-9_]*\)\?[[:space:]]*{[[:space:]]*\(.*\)[[:space:]]*,[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*:[[:space:]]*\(.*\)[[:space:]]*}|\1\2: \3 {\4}\n\1  \5: \6|;t2'

Ansible won't show you this though so it just seems to fail. Running the same command in an ubuntu docker works fine.

@vikman90 vikman90 added reporter/community Issue reported by the community type/bug level/task Subtask issue labels Nov 15, 2023
@vikman90
Copy link
Member

Assigning this issue to @wazuh/cicd.

@mrjson79
Copy link

watching this - have the same issue on mac. Trying to install 4.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Subtask issue reporter/community Issue reported by the community type/bug
Projects
Status: Blocked
Development

No branches or pull requests

3 participants